|
TerminateProcess()..
try to initiate your exe with CreateProcess..
WUSIWUG
|
|
|
|
|
Hi,
Does anybody know how to change the content of a html-doc before loading in a CHtmlView ? Or is it possible to view a doc from ram (in a CHtmlView) ? Or is there a possibility to prevent access to a temporarily created (and closed) file to other apps ?
tia
widi
|
|
|
|
|
I don't believe it's possible sorry.
However an alternative is to omit the Paint Cycle, then after the Document Complete event has been fired enable the paint validation Alter the DOM via the IHTMLDocument Interfaces.
You could use another method to download the content to a local dir, then use the CHTMLView to navigate to that resource, that will mean you must parse all the HTML yourself and retrieve the resources as well.
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
Now I know why I haven't found something in the docs. Thanks.
-widi
|
|
|
|
|
It IS possible to load HTML document into htmlview from ram - see great article in Internet section ... it's name is something like loading and parsing html document 3rd way or something like that.
It writes HTML from string into IHTMLDocument , you'll get pointer to that by calling CHtmlView::GetHtmlDocument( )
rrrado
|
|
|
|
|
Thanks for your help and sorry for my late replay.
-widi
|
|
|
|
|
Is it impossible to use the CDatabase class without creating a DSN first?
CDatabase db;
db.Open(NULL,FALSE,FALSE,
"DRIVER=MySQL;DATABASE=Nish;"
"SERVER=192.168.1.1;UID=nish;"
"PWD=nish123;PORT=;OPTION=16;STMT=;");
It keeps popping up a dialog box to choose a DSN
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
See Q165866 article "How to Use File DSNs and DSN-less Connections" in MSDN library.
Pavel
Sonork 100.15206
|
|
|
|
|
|
You can create the DSN at runtime and then destroy it. See my reply[^] to another question.
Pavel
Sonork 100.15206
|
|
|
|
|
See Connecting to SQL Server Technical article in MSDN. It has a paragraph DSN-less Connections.
Pavel
Sonork 100.15206
|
|
|
|
|
|
Outch, yes, I know this. Should have read the question more thoroughly
Pavel
Sonork 100.15206
|
|
|
|
|
After executing a query we obtain results in the recordset object. Can any one tell me that how can we know the total number of records in RecordSet object, and how do we retrieve this value ???
|
|
|
|
|
Hi,"what i call to you"
r u tried like this?
int nCount=0;
nCount=RecordsetPointer->GetRecordCount();
anju
|
|
|
|
|
Not worked like that
|
|
|
|
|
hi,
Try like this
//Open the Recordset object by using adOpenStatic CursorType then it gives the record count
pRecordset->Open("myTable",
_variant_t((IDispatch*)pConnection,true),
adOpenStatic, adLockPessimistic,adCmdTable);
long nCount=0;
nCount=pRecordset->GetRecordCount();
CString strRCount;
strRCount.Format("%ld",nCount);
AfxMessageBox(strRCount);
anju
|
|
|
|
|
How do I set a COleDateTime Object which is set to the current time to 5 minutes ahead of the current time.
Taking care of cases like 12th hour, 59 seconds. dates like 31st etc.
|
|
|
|
|
COleDateTime ct = COleDateTime::GetCurrentTime();
COleDateTimeSpan ts(0, 0, 5, 0);
ct += ts;
Pavel
Sonork 100.15206
|
|
|
|
|
#include <stdio.h>
#include <stdlib.h>
int main()
{
int nFibo = 0;
int *FiboArray;
int loop = 0;
printf("How many Fibonacci numbers do you want to see?\n");
scanf("%d", &nFibo);
if (nFibo == 0)
exit(0);
else
{
FiboArray =(int *)malloc(nFibo);
if( FiboArray == NULL )
printf( "Insufficient memory available\n" );
else
{
printf("0 1 ");
FiboArray[0] = 0;
FiboArray[1] = 1;
for (loop = 2; loop < nFibo ;loop ++)
{
FiboArray[loop] = FiboArray[loop-1] + FiboArray[loop-2];
printf("%d ", FiboArray[loop]);
}
printf(" \n");
}
free(FiboArray);
return (0);
}
}
<\p>
//Hi all, This little program gives me a run time error at the line that has free(FiboArray)
Does anyone know what the problem is?
thanks
|
|
|
|
|
two things :
1.
what if nFibo is 1?
FiboArray[1] = 1;
this will write outside the array.
2.
when you use malloc, you have to take into account the size of the objects you are allocating. malloc allocates BYTEs, not objects. so, to allocate nFibo int's, use malloc(nFibo * sizeof(int).
-c
Greenspun's Tenth Rule of Programming:
"Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified bug-ridden slow implementation of half of Common Lisp."
|
|
|
|
|
In addition to Chris' suggestions, you need to allocate nFibo+1 elelents.
FiboArray[0] is element #1
FiboArray[1] is element #2 so minimum allocation is 2 = (nFibo=1) + 1 (like Chris said)
FiboArray[2[ is element #3 so minimum allocation is 3 = (nFibo=2) + 1
& etc.
|
|
|
|
|
The computer user can log on Win2000 as an administrator, while
he should be forbidden to change the system time under windows 2000.
Of course we can carry this point by setting the "User Rights Assignment"
through the "Domain Controller Security Policy" tool, but how can we gain
this end through VC programing?
|
|
|
|
|
Are you asking how to prevent the system administrator from adminstering the system? Why not have the user logon as something other than Administrator? Even if you do this, what keeps the Administrator from simply resetting the right manually? (Or does it not matter).
You can post messages to any window. So if you can get the the gui of the tool you need opened, you can send messages to it and any controls in it. That gives your program control of the tool.
|
|
|
|
|
Thank you for your reply.
I am working for a special system. The user must logon as an administrator, and he can access "command console" only.
How to prevent him from changing the system time then?
|
|
|
|