|
Nothing was misspelled. He clearly meant DOS.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
OK. It just didn't appear that way to me. We're both talking about this msg[^], right?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
We're both talking about this msg[^], right?
Correct.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
A Solution is to create a remote thread in explorer that just start do the work when it detects a M_QUERYENDSESSION
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
The problem with the WM_QUERYENDSESSION message is that an application can return 0 in response to it and Windows will not shut down.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Exactly what he may need if he want to do some processing and then call the ExitWindow family of API
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
If, during the processing of the WM_QUERYENDSESSION message, a call is made to ExitWindows[Ex]() , does that not re-send the WM_QUERYENDSESSION message?
As I read Alex's original post, he was interested in doing something if Windows was shutting down, not if Windows was asked to be shut down. If work was done during the processing of WM_QUERYENDSESSION , it is not guaranteed that Windows will shut down, thus the processing may be immature.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
You're right
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
so, as i understand Alex's question (or even if it is not his, it's mine ), is there a way to lauch a program which is not executing when windows shuts down (and so don't use memory for nothing - because it is not needed before the loggout) ?
the problem is, when you catch the WM_ENDSESSION , the program must be currently running to catch the event...
TOXCCT >>> GEII power
|
|
|
|
|
Hi world...
What is the most useful way to change language in an application?
I've read we can do that with explicit link for DLL (one DLL for each languages ressource). Example:
- exported from french.dll file:
extern "C" __declspec(dllexport) char* get_text(int id_text);
- int the application:
typedef char* (MY_FUNCTION)(int);
HINSTANCE hInstance;
MY_FUNCTION *pFunction;
VERIFY(hInstance = ::Loadlibrary("c:\\winnt\\system32\\french.dll"));
VERIFY(pFunction = (MY_FUNCTION*) ::GetProcAddress(hInstance, "get_text"));
int id_text = 5427
char* good_translation = (pFunction*)(id_text);
Is that a good solution?
Thanks for your suggestions...
Hello World!!!
from Raphaël
|
|
|
|
|
use string resources in your software.
Don't try it, just do it!
|
|
|
|
|
Hi,
Does anyone know how to draw anti aliased lines and curves using MFC?
I've been playing with CDC::LineTo() and CDC::Pie(), etc but none of them produce the results I was looking for.
Any help would be appreciated.
Thanks,
Crercio O. Silva / DBTools Software
http://www.dbtools.com.br[^]
|
|
|
|
|
i'm not sure if windows would do this for you!
Don't try it, just do it!
|
|
|
|
|
Have a look at the GDI+ routines. It has a SetSmoothingMode() function that antialiase lines and circles.
Here[^]
I Dream of Absolute Zero
|
|
|
|
|
I have a Dialog based application .
I want to post message from this dialog to another class which is alos part of the same application.
Say When I click a button,this dialog posts a message to another class.
How should I achieve this?
how should I know about the class recieve that particular message?
Pls guide me with sample code.
Regards
YKUT
|
|
|
|
|
put that in the first dialog
const unsigned int wm_uiImportDone=RegisterWindowMessage("Import_Done");
give wm_uiImportDone as a pointer to the class
on the class, mae sure to add that to the message map
ON_REGISTERED_MESSAGE(wm_uiImportDone, OnImportDone)
then on the dialog, use:
::PostMessage (m_hWnd, wm_uiImportDone, 0, 0);
when m_hwnd is a pointer to the class that has to be derived from a window to get a message
|
|
|
|
|
Hi,
Let's say I have a CStatic control that is represented by a CString (m_str_status) which I pass to a working thread.
I want the thread to change this status while it works, and of course show it on the dialog....
THE PROBLEM IS --->Even if I pass a pointer to the dialog to the thread, UpdateData function is illegal and will cause an exception.
How do I force the dialog to update itself after I changed the value of the status string ?
Shay
|
|
|
|
|
Several options
1. Send a message to the dialog
2. Call a function of the dialog that takes the new string and update it
3. Signal an event ...
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
post a message to the dialog to indicate the status string change.
It's not a bug, it's an undocumented feature. suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
One of the precautionary don'ts that get repeated when it comes to multi-threaded programming is never, ever, directly interact with a control using another thread.
This nice introductory article explains this[^].
Personally, if I need visual updates via a separate thread, I would post user-defined window messages to the displaying dialog.
I Dream of Absolute Zero
|
|
|
|
|
Someone can tell me where can I download an Icon Collection for my c++ apps ?? I would like them to be cool !!
Thankx !!
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
|
Check these:
http://www.glyfx.com/
http://www.glyfz.com/
http://www.stockicons.com/browse.asp
Not free, but reasonable prices and good looking.
Igor Green
http://www.grigsoft.com/ - files and folders comparison tools
|
|
|
|
|
I sometimes use www.iconbazaar.com
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
hi all,
I am new to DLLs. I have one doubt on dll loading.
if two or more different applications use a same dll. how many instance of the dll will be loaded in memory.
My Question is whether each application will has its own instance of the dll. or just one instance of the dll will be loaded and all applications have its mapping to the single instance.
please clarfy me.
thankyou in advance
Mohamed Hasan S
|
|
|
|