Click here to Skip to main content
15,886,026 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MoveWindow dynamically - how to determine the destination? Pin
Albert Holguin27-Jun-11 15:14
professionalAlbert Holguin27-Jun-11 15:14 
Questionlocalizing MFC feature pack (VS 2008) resources. Pin
kle8vi27-Jun-11 1:09
kle8vi27-Jun-11 1:09 
QuestionError while using A_StringFromGUID2 Pin
Pranit Kothari26-Jun-11 23:01
Pranit Kothari26-Jun-11 23:01 
AnswerRe: Error while using A_StringFromGUID2 Pin
Iain Clarke, Warrior Programmer26-Jun-11 23:19
Iain Clarke, Warrior Programmer26-Jun-11 23:19 
QuestionSetting Focus to a Dialog on Clicking it. [modified] Pin
pix_programmer26-Jun-11 22:48
pix_programmer26-Jun-11 22:48 
AnswerRe: Setting Focus to a Dialog on Clicking it. Pin
Iain Clarke, Warrior Programmer26-Jun-11 23:11
Iain Clarke, Warrior Programmer26-Jun-11 23:11 
GeneralRe: Setting Focus to a Dialog on Clicking it. Pin
pix_programmer26-Jun-11 23:18
pix_programmer26-Jun-11 23:18 
GeneralRe: Setting Focus to a Dialog on Clicking it. Pin
Iain Clarke, Warrior Programmer26-Jun-11 23:29
Iain Clarke, Warrior Programmer26-Jun-11 23:29 
You showed two pieces of code. Only one has "Ptr" in it. Look up SetFocus on msdn for more information on that member function. The name is a bit of a give away though.

The second piece of code you showed implied you have threads creating dialogs. My points about threads and TerminateThread applied to all windows programs, not just the bits you shows.

Just in case I misunderstood your question, when I used "Event" above, I meant Win32's event synchronisation objects, created by
CreateEvent win32 function.

If you've not heard of them (and mutexes [*], and semaphores) then you really should not be creating windows outside the main thread. I may sound harsh, but I simply mean you should not be using them *yet*. Do some reading, play with some programs, understand the ideas, then go wild.

Read
http://www.flounder.com/uithreads.htm[^] and have a browse through flounder's other articles. I don't agree with everything he says, but the vast majority of it is spot-on.

Iain.

[*] mutices?
I am one of "those foreigners coming over here and stealing our jobs". Yay me!

AnswerRe: Setting Focus to a Dialog on Clicking it. Pin
d358207727-Jun-11 0:53
d358207727-Jun-11 0:53 
GeneralRe: Setting Focus to a Dialog on Clicking it. Pin
pix_programmer27-Jun-11 2:05
pix_programmer27-Jun-11 2:05 
QuestionON_COMMAND not working on mfc Pin
Mohibur Rashid26-Jun-11 5:28
professionalMohibur Rashid26-Jun-11 5:28 
AnswerRe: ON_COMMAND not working on mfc Pin
Richard MacCutchan26-Jun-11 6:04
mveRichard MacCutchan26-Jun-11 6:04 
GeneralRe: ON_COMMAND not working on mfc Pin
Mohibur Rashid26-Jun-11 12:32
professionalMohibur Rashid26-Jun-11 12:32 
GeneralRe: ON_COMMAND not working on mfc Pin
Richard MacCutchan26-Jun-11 21:23
mveRichard MacCutchan26-Jun-11 21:23 
GeneralRe: ON_COMMAND not working on mfc Pin
Mohibur Rashid26-Jun-11 21:28
professionalMohibur Rashid26-Jun-11 21:28 
GeneralRe: ON_COMMAND not working on mfc Pin
Iain Clarke, Warrior Programmer26-Jun-11 22:01
Iain Clarke, Warrior Programmer26-Jun-11 22:01 
GeneralRe: ON_COMMAND not working on mfc Pin
Richard MacCutchan26-Jun-11 22:48
mveRichard MacCutchan26-Jun-11 22:48 
GeneralRe: ON_COMMAND not working on mfc Pin
Iain Clarke, Warrior Programmer26-Jun-11 23:00
Iain Clarke, Warrior Programmer26-Jun-11 23:00 
GeneralRe: ON_COMMAND not working on mfc Pin
Mohibur Rashid26-Jun-11 22:49
professionalMohibur Rashid26-Jun-11 22:49 
GeneralRe: ON_COMMAND not working on mfc Pin
Iain Clarke, Warrior Programmer26-Jun-11 22:59
Iain Clarke, Warrior Programmer26-Jun-11 22:59 
GeneralRe: ON_COMMAND not working on mfc Pin
Mohibur Rashid26-Jun-11 23:18
professionalMohibur Rashid26-Jun-11 23:18 
GeneralRe: ON_COMMAND not working on mfc Pin
Iain Clarke, Warrior Programmer26-Jun-11 23:35
Iain Clarke, Warrior Programmer26-Jun-11 23:35 
GeneralRe: ON_COMMAND not working on mfc Pin
Mohibur Rashid26-Jun-11 23:50
professionalMohibur Rashid26-Jun-11 23:50 
GeneralRe: ON_COMMAND not working on mfc Pin
Iain Clarke, Warrior Programmer26-Jun-11 22:08
Iain Clarke, Warrior Programmer26-Jun-11 22:08 
AnswerRe: ON_COMMAND not working on mfc Pin
Mark Salsbery26-Jun-11 6:22
Mark Salsbery26-Jun-11 6:22 

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.