Click here to Skip to main content
15,949,686 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: About "&" Pin
Cedric Moonen30-Jun-03 22:11
Cedric Moonen30-Jun-03 22:11 
GeneralRe: About "&" Pin
FlyingDancer30-Jun-03 22:26
FlyingDancer30-Jun-03 22:26 
GeneralRe: About "&" Pin
PJ Arends30-Jun-03 22:53
professionalPJ Arends30-Jun-03 22:53 
GeneralRe: About "&" Pin
FlyingDancer30-Jun-03 23:17
FlyingDancer30-Jun-03 23:17 
GeneralUtility Start/Stop Management Service Pin
parths30-Jun-03 21:52
parths30-Jun-03 21:52 
GeneralRe: Utility Start/Stop Management Service Pin
Toni7830-Jun-03 22:03
Toni7830-Jun-03 22:03 
GeneralRe: Utility Start/Stop Management Service Pin
parths30-Jun-03 22:09
parths30-Jun-03 22:09 
GeneralRe: Utility Start/Stop Management Service Pin
Ryan Binns30-Jun-03 22:53
Ryan Binns30-Jun-03 22:53 
PostThreadMessage()/PeekMessage() should work. Messages can not get lost if they're being sent to the correct thread, as long as you specify NULL (or 0 in VB) for the HWND parameter, and PM_REMOVE as the flags parameter. My VB is a bit rusty, but:
If PeekMessage(msg, 0, 0, 0, PM_REMOVE) = True Then
    If msg.message = MY_MESSAGE Then
        ExitProcess 0  ' Exit the process
    End If
End If
Where msg is the MSG structure variable and MY_MESSAGE is the value of the message that you are sending. I can't remember if the PM_REMOVE constant is declared like that, or whether it has a different name. Of course, if a different message is received, then it will need to be processed as well. If PeekMessage() returns False, then a message did not exist.

Hope this helps,

Ryan

Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)

Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

GeneralRe: Utility Start/Stop Management Service Pin
parths30-Jun-03 23:27
parths30-Jun-03 23:27 
GeneralRe: Utility Start/Stop Management Service Pin
Ryan Binns30-Jun-03 23:44
Ryan Binns30-Jun-03 23:44 
GeneralRe: Utility Start/Stop Management Service Pin
parths30-Jun-03 23:58
parths30-Jun-03 23:58 
GeneralRe: Utility Start/Stop Management Service Pin
Ryan Binns1-Jul-03 0:13
Ryan Binns1-Jul-03 0:13 
GeneralAlt+Return == Strange Sound Sfx Pin
Mathias S.30-Jun-03 21:40
Mathias S.30-Jun-03 21:40 
GeneralCreate a dynaset Recordset from an Excel sheet Pin
Andy@30-Jun-03 21:31
Andy@30-Jun-03 21:31 
GeneralRe: Create a dynaset Recordset from an Excel sheet Pin
Olli9-Jul-03 3:42
Olli9-Jul-03 3:42 
GeneralRe: Create a dynaset Recordset from an Excel sheet Pin
Andy@9-Jul-03 4:17
Andy@9-Jul-03 4:17 
Questionhow do i Detect if an external program has finished excuting(shellexec)? Pin
Member 40481330-Jun-03 20:35
Member 40481330-Jun-03 20:35 
AnswerRe: how do i Detect if an external program has finished excuting(shellexec)? Pin
Toni7830-Jun-03 20:44
Toni7830-Jun-03 20:44 
AnswerRe: how do i Detect if an external program has finished excuting(shellexec)? Pin
Rage30-Jun-03 20:48
professionalRage30-Jun-03 20:48 
AnswerRe: how do i Detect if an external program has finished excuting(shellexec)? Pin
cmk30-Jun-03 20:52
cmk30-Jun-03 20:52 
GeneralChecksum Pin
Toni7830-Jun-03 19:27
Toni7830-Jun-03 19:27 
GeneralRe: Checksum Pin
Michael Dunn30-Jun-03 19:52
sitebuilderMichael Dunn30-Jun-03 19:52 
GeneralRe: Checksum Pin
Toni7830-Jun-03 20:04
Toni7830-Jun-03 20:04 
GeneralRe: Checksum Pin
kakan30-Jun-03 20:03
professionalkakan30-Jun-03 20:03 
GeneralRe: Checksum Pin
Toni7830-Jun-03 20:15
Toni7830-Jun-03 20:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.