|
As far as I know rtf files are opened by default by Word and I want to open by default with my app.
|
|
|
|
|
Then you simply need to change the default file association.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
If you created the application using AppWizard, it's already been done. If not, check out CWinApp::RegisterShellFileTypes() .
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
is there any way to run exe at shutdown, any registry key ?.
my app should check some things when windows exits.
there is no reason to keep it during whole session in memory.
|
|
|
|
|
no "usual" way
Don't try it, just do it!
|
|
|
|
|
See if the WM_ENDSESSION message is of any help.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
it does, although application should be whole time in memory.
not a big deal, dos times are over and we have enough memory
|
|
|
|
|
Alex HexR wrote:
...although application should be whole time in memory.
Which is not what you indicated in your original post. "There is no reason to keep it during whole session in memory" is not the same as "although application should be whole time in memory."
Alex HexR wrote:
not a big deal, dos times are over and we have enough memory
This make no sense whatsoever. What does DOS and enough memory have to do with your post or my reply? You wanted to know when Windows was shutting down so that you could check some things. WM_ENDSESSION is the message you'll need to handle to know that Windows is shutting down.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
DavidCrow wrote:
dos times are over
"dos" -> "those", methinks.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I'm unclear on your intent here as none of my posts in this thread mentioned anything about "dos times are over."
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I was referring to Alex's post. I think he meant "those times are over", where as you interpreted his misspelling as having to do with DOS.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
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!
|
|
|
|