Click here to Skip to main content
15,915,336 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to interface System to External Hardware Pin
jhorstkamp13-Jul-04 23:24
jhorstkamp13-Jul-04 23:24 
QuestionWhen to use PostQuitMessage ? Pin
Hesham Amin13-Jul-04 19:47
Hesham Amin13-Jul-04 19:47 
AnswerRe: When to use PostQuitMessage ? Pin
ThatsAlok13-Jul-04 20:09
ThatsAlok13-Jul-04 20:09 
AnswerRe: When to use PostQuitMessage ? Pin
User 58385213-Jul-04 20:26
User 58385213-Jul-04 20:26 
GeneralRe: When to use PostQuitMessage ? Pin
Hesham Amin13-Jul-04 20:52
Hesham Amin13-Jul-04 20:52 
GeneralRe: When to use PostQuitMessage ? Pin
ThatsAlok13-Jul-04 22:13
ThatsAlok13-Jul-04 22:13 
GeneralRe: When to use PostQuitMessage ? Pin
User 58385215-Jul-04 13:30
User 58385215-Jul-04 13:30 
AnswerRe: When to use PostQuitMessage ? Pin
Jeff Walton14-Jul-04 12:49
Jeff Walton14-Jul-04 12:49 
Shamelessly ripped from Chris Becke:

PostQuitMessage() is typically called to terminate
a UI thread, and UI threads typically need to be terminated when all the
windows depending on the thread have been destroyed.

In situations when there is one frame or parent window the PostQuitMessage
is placed somewhere in the windows destruction code. Either in a message
handler: WM_DESTROY, WM_NCDESTROY, or in some c++ function that gets called
when the window is destroyed - prehaps even the destructor.

Sometimes you might have a situation where more than one top-level window
can exist on the UI thread. In that case you want to do some refrence
counting or some other system - every WM_CREATE or ctor increases a ref
count, every WM_DESTROY, OnHesDeadJim, or dtor the ref count is decreased.
When it hits zero all windows are dead and PostQuitMEssage is called to
terminate the UI thread.

Basically there are many ways to kill a UI thread, and to a large degree the
method used will cahnge according to the requirements of the class
library(s) used and other enviromental constraints.

Chris Becke

QuestionHow to save GDI+ bmp file as PDF File Format. Pin
pubududilena13-Jul-04 19:40
pubududilena13-Jul-04 19:40 
AnswerRe: How to save GDI+ bmp file as PDF File Format. Pin
Sekar_Mokachandra17-Mar-05 11:40
Sekar_Mokachandra17-Mar-05 11:40 
GeneralC++ class design question - static member Pin
Indrawati13-Jul-04 19:21
Indrawati13-Jul-04 19:21 
GeneralRe: C++ class design question - static member Pin
maxsteel13-Jul-04 22:23
maxsteel13-Jul-04 22:23 
GeneralReading special characters like TM in text file Pin
Arvind Jagtap13-Jul-04 19:10
Arvind Jagtap13-Jul-04 19:10 
GeneralRe: Reading special characters like TM in text file Pin
David Crow14-Jul-04 3:29
David Crow14-Jul-04 3:29 
GeneralRe: Reading special characters like TM in text file Pin
Arvind Jagtap14-Jul-04 4:04
Arvind Jagtap14-Jul-04 4:04 
GeneralRe: Reading special characters like TM in text file Pin
Arvind Jagtap14-Jul-04 4:18
Arvind Jagtap14-Jul-04 4:18 
GeneralRe: Reading special characters like TM in text file Pin
David Crow14-Jul-04 8:51
David Crow14-Jul-04 8:51 
GeneralC++ program Pin
bctuthrcls13-Jul-04 19:01
sussbctuthrcls13-Jul-04 19:01 
GeneralRe: C++ program Pin
Weiye Chen13-Jul-04 19:26
Weiye Chen13-Jul-04 19:26 
GeneralRe: C++ program Pin
ThatsAlok13-Jul-04 20:35
ThatsAlok13-Jul-04 20:35 
GeneralRe: Visual c++ and word automation Pin
Ryan Binns13-Jul-04 18:37
Ryan Binns13-Jul-04 18:37 
GeneralRe: Visual c++ and word automation Pin
tiziacaia13-Jul-04 19:11
tiziacaia13-Jul-04 19:11 
GeneralRe: Visual c++ and word automation Pin
V.13-Jul-04 21:24
professionalV.13-Jul-04 21:24 
GeneralVisual c++ and word automation Pin
tiziacaia13-Jul-04 18:08
tiziacaia13-Jul-04 18:08 
GeneralSimple DLL help needed. (very basic) Pin
Loosehead Len13-Jul-04 17:51
Loosehead Len13-Jul-04 17:51 

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.