|
Use BeginWaitCursor() and EndWaitCursor()
Best regards,
Eugene Pustovoyt
|
|
|
|
|
The saving routine returns when the file is saved.
Or are you multithreaded, with saving in a different thread?
|
|
|
|
|
If you're using MFC, just declare CWaitCursor local variable. If you're on bare Win32 API, then use LoadCursor/SetCursor.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
Hi All,
I have an exe file which I need to use in my program.Since the exe is not made by me I need to store the output created by the exe into some text file.Thus to execute this file from my program I'm using this statement into my program:
system("filename.exe parameter>output.txt");
Using a redirection symbol I'm getting the output into the output.txt file as required.What I need is if the executable is unable to produce an output in 5 sec the executable should get terminated.How can I do it in the current scenario.Is there any other way to solve this problems keeping in view the requirements.
Thanks
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
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."
|
|
|
|