|
You may find this[^] article (specifically the section "Pausing a Thread and Thread Shutdown") helpful.
/ravi
|
|
|
|
|
Unfortunately there is a documented bug having to do with the enum { Error, Running, Shutdown, Timeout } and the workarounds don't work.
Buck
|
|
|
|
|
Yep - Ravi's given you likely the best info you'll find, thanks also of course to 'The Flounder' - you must have logic within your thread that detects some sort of signal from the outside world and then acts on the signal, rather than trusting the OS to terminate the thread for you..
'g'
|
|
|
|
|
Unfortunately there is a documented bug having to do with the enum { Error, Running, Shutdown, Timeout } causing a fatal compiler error C1001 and the workarounds don't work.
Buck
|
|
|
|
|
The worker thread runs in your app's address space so a down-n-dirty method is to have it
periodically check a flag (maybe a bool variable somewhere) and if the flag is set stop doing
the worker thread stuff and exit. Set the flag false at the start, set it to true when the
user clicks cancel.
More elegant and thread safe is using an event. Pretty much the same as a flag except you'd
use WaitForSingleObject() (with a timeout == 0ms) periodically to check if the event has been
set. Create the event reset (non-signalled) at the start and set it when the user clicks
cancel.
Mark
|
|
|
|
|
You haven't given enough information. The pTests->RunTest(); // This may take 20 minutes line calls the function RunTest which is not shown. This code needs to be altered so it's interruptible.
Steve
|
|
|
|
|
Im in a property page and am trying to get a pointer
to the document. For some reason, it keeps giving me
a null pointer. I tried this:
CFrameWnd *pWndParentFrame = GetParentFrame();
CMultiScreenDoc *pDoc = NULL;
if( pWndParentFrame != NULL )
{
pDoc = (CMultiScreenDoc *)pWndParentFrame->GetActiveDocument();
}
and it doesnt work inside the property page. Any other
ideas any one else has will be greatly appreciated.
Sincerely,
Danielle Brina
|
|
|
|
|
If you do a quickwatch on pWndParentFrame in the debugger, is it pointing to the frame window you
are expecting (check its class )? Maybe you're not traversing up the window heirarchy far
enough...
Mark
|
|
|
|
|
|
What does GetMainWnd() return? It should give you a pointer to the main window, which you can then use to call GetActiveDocument() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have an SDI application, with a form view, which has a few property sheets displayed.
When I click on "Open" button from the tool bar, to my surprise, CMyDocument::Serialize(CArchive& ar) is not called, and the title is updated by my selected file name.
How can this happen?!
TIA!
|
|
|
|
|
lucy wrote: How can this happen?!
Probably by writing broken code... like the code you posted yesterday.
led mike
|
|
|
|
|
I don't think I posted any code yesterday.
and I didn't make any changes to CMyDocument, only updated the
CMyDocument::Serialize (),
added code to serialize my member variables to &ar.
|
|
|
|
|
lucy wrote: I don't think I posted any code yesterday.
You are correct. My bad, I confused you with someone else.
lucy wrote: updated the
CMyDocument::Serialize (),
added code to serialize my member variables to &ar.
can you post your ::Serialize() code?
led mike
|
|
|
|
|
sure, I will.
I am not at work today. Caught a cold. I will post the code tomorrow.
Thank you very much!
|
|
|
|
|
I can't link NcFreeNetconProperties.
VS2005's linker returns:
error LNK2019: unresolved external symbol _NcFreeNetconProperties@4
I need to use this call because I earlier involked: GetProperties(NETCON_PROPERTIES **ppProps)
|
|
|
|
|
Besides being deprecated/unsupported according to the PSDK...
It looks like you need to LoadLibrary() NetShell.dll and use GetProcAddress().
There's no link library mentioned in the docs.
Mark
|
|
|
|
|
This worked great. Thank you.
Though this has been deprecated it is still the preferred method if one is using INetConnection. (see http://msdn2.microsoft.com/en-us/library/aa365097.aspx[^]
Do you have any other solution for enabling or disabling a network card on an XP machine?
|
|
|
|
|
I do not!
Thanks for the link - I've never looked in to that internet connection sharing stuff
Mark
|
|
|
|
|
I'm required to add several "{{" , "}}" and | to a CString that is used for a parser. Danged if I can find the proper was to do this.
Thanks for any help.
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
What about Insert() and the concatenation operators?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
CString s;
s.Insert(0,"{");
s.Insert(120,"}");
|
|
|
|
|
This is a bit of a long shot, but does anybody know where I might be able to get a hold of DirectX December 2004 SDK?
I know it can be downloaded from microsoft, but their website refuses to let me do so. It requires a windows validation ( for a freeware SDK??? ) and is accusing me of having an invalid key What happened to all the "windows vista is uncrackable" hype? They still need to check the key and even then get it wrong!!
|
|
|
|
|
Heh
I have a copy I can post for download. Email me if you need it.
Mark
|
|
|
|
|
Hi !!
I want to include Vertical scroll in my dialog box..
What should i do ??
I put directly Vertical Scroll through toolbox..then what next ??
Shah
|
|
|
|