Click here to Skip to main content
15,896,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reverse Triangle Star Pin
enhzflep20-Nov-11 1:57
enhzflep20-Nov-11 1:57 
GeneralRe: Reverse Triangle Star Pin
AREYASB20-Nov-11 21:51
AREYASB20-Nov-11 21:51 
QuestionRe: Reverse Triangle Star Pin
David Crow20-Nov-11 17:14
David Crow20-Nov-11 17:14 
AnswerRe: Reverse Triangle Star Pin
AREYASB20-Nov-11 21:48
AREYASB20-Nov-11 21:48 
QuestionRe: Reverse Triangle Star Pin
David Crow21-Nov-11 4:13
David Crow21-Nov-11 4:13 
QuestionStar Shear Pin
AREYASB18-Nov-11 15:58
AREYASB18-Nov-11 15:58 
QuestionRe: Star Shear Pin
David Crow1-Dec-11 7:43
David Crow1-Dec-11 7:43 
QuestionUnderstanding wndproc, callbacks and threads, win32 c++ Pin
jkirkerx18-Nov-11 6:47
professionaljkirkerx18-Nov-11 6:47 
So I thought I understood the wndproc, in which it loops and listens for WM messages. But I guess if you run a function, the wndproc stops looping until the function stops, and then the wndproc listens again.

So is that where callbacks come into play?. If I run a function, I have to have a callback, that's like a mini wndproc?

Which leads to threads,

If I call a function like downloading a file, I hand off the function process to a new thread, and let that worker do the tasks, and just forget about it until it done or the cancel button is clicked.

Now Threads, I tried this one first.
http://www.codeproject.com/script/Articles/ViewDownloads.aspx?aid=1273[^]

I'm just lost on how to get the tread working, and test it to see if it really works. I'm missing a big piece to this here

CThread ct;
ct.CreateThread;

sleep for awhile
during sleep, I should be able to click my cancel button -> wndproc capture. Pop a message box off.

done - destoy thread.
AnswerRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
David Crow18-Nov-11 7:05
David Crow18-Nov-11 7:05 
GeneralRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
jkirkerx18-Nov-11 7:47
professionaljkirkerx18-Nov-11 7:47 
AnswerRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
Chuck O'Toole18-Nov-11 7:46
Chuck O'Toole18-Nov-11 7:46 
GeneralRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
jkirkerx18-Nov-11 8:04
professionaljkirkerx18-Nov-11 8:04 
AnswerRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
Chuck O'Toole18-Nov-11 10:01
Chuck O'Toole18-Nov-11 10:01 
GeneralRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
enhzflep18-Nov-11 15:27
enhzflep18-Nov-11 15:27 
GeneralRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
Richard MacCutchan18-Nov-11 21:57
mveRichard MacCutchan18-Nov-11 21:57 
AnswerRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
Erudite_Eric18-Nov-11 21:55
Erudite_Eric18-Nov-11 21:55 
GeneralRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
jkirkerx19-Nov-11 7:27
professionaljkirkerx19-Nov-11 7:27 
GeneralRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
Erudite_Eric20-Nov-11 2:10
Erudite_Eric20-Nov-11 2:10 
GeneralRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
jkirkerx20-Nov-11 7:27
professionaljkirkerx20-Nov-11 7:27 
GeneralRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
Erudite_Eric20-Nov-11 23:38
Erudite_Eric20-Nov-11 23:38 
GeneralRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
jkirkerx21-Nov-11 7:18
professionaljkirkerx21-Nov-11 7:18 
GeneralRe: Understanding wndproc, callbacks and threads, win32 c++ Pin
Erudite_Eric21-Nov-11 21:01
Erudite_Eric21-Nov-11 21:01 
QuestionHow to disable context-menu web browser control Pin
belfd18-Nov-11 4:28
belfd18-Nov-11 4:28 
QuestionCapturing screen content behind an open window Pin
ryan218917-Nov-11 10:38
ryan218917-Nov-11 10:38 
AnswerRe: Capturing screen content behind an open window Pin
Richard MacCutchan17-Nov-11 11:12
mveRichard MacCutchan17-Nov-11 11:12 

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.