Click here to Skip to main content
15,913,722 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Combo Box Problem Pin
mvworld21-Nov-01 14:47
mvworld21-Nov-01 14:47 
GeneralRe: Combo Box Problem Pin
Masaaki Onishi21-Nov-01 15:05
Masaaki Onishi21-Nov-01 15:05 
GeneralRe: Combo Box Problem Pin
mvworld21-Nov-01 15:13
mvworld21-Nov-01 15:13 
GeneralRe: WM_INITDIALOG Pin
Masaaki Onishi21-Nov-01 17:33
Masaaki Onishi21-Nov-01 17:33 
GeneralRe: Combo Box Problem Pin
Sidney Chong21-Nov-01 15:21
Sidney Chong21-Nov-01 15:21 
GeneralRe: Combo Box Problem Pin
mvworld21-Nov-01 15:49
mvworld21-Nov-01 15:49 
GeneralRe: Combo Box Problem Pin
Sidney Chong21-Nov-01 16:46
Sidney Chong21-Nov-01 16:46 
GeneralRe: Combo Box Problem Pin
Michael Dunn21-Nov-01 17:47
sitebuilderMichael Dunn21-Nov-01 17:47 
The other replies have been hit-and-miss, so I'll summarize here.

You're confusing the dialog C++ object with the dialog window. The window does not get created until you call DoModal(). There is no dialog, and thus no controls to manipulate, before the DoModal() call.

The proper way is to override OnInitDialog() in your dialog's C++ class. At the time WM_INITDIALOG is sent, the window and all child controls have been created, but not yet shown. So at that time, it's fine to set up the controls.

--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
Heart | [heart] your Green Alien | [Alien] with Good Stuff | [The good stuff] and Beer | [beer]
Sonork ID - 100.10414 AcidHelm
GeneralRe: Combo Box Problem Pin
luckylourson21-Nov-01 22:07
luckylourson21-Nov-01 22:07 
GeneralRe: Hum, a little different! Pin
Masaaki Onishi22-Nov-01 4:36
Masaaki Onishi22-Nov-01 4:36 
QuestionChanging the font in a Combo Box? Pin
Chambers21-Nov-01 9:51
Chambers21-Nov-01 9:51 
AnswerRe: Changing the font in a Combo Box? Pin
Nemanja Trifunovic21-Nov-01 10:06
Nemanja Trifunovic21-Nov-01 10:06 
GeneralRe: Changing the font in a Combo Box? Pin
Chambers21-Nov-01 12:50
Chambers21-Nov-01 12:50 
GeneralRe: Changing the font in a Combo Box? Pin
Derek Waters21-Nov-01 12:55
Derek Waters21-Nov-01 12:55 
GeneralRe: Changing the font in a Combo Box? Pin
Chambers22-Nov-01 1:33
Chambers22-Nov-01 1:33 
GeneralRe: Changing the font in a Combo Box? Pin
22-Nov-01 1:46
suss22-Nov-01 1:46 
GeneralTowers of Hanoi Pin
Zach21-Nov-01 9:45
Zach21-Nov-01 9:45 
GeneralRe: Towers of Hanoi Pin
Christian Graus21-Nov-01 10:18
protectorChristian Graus21-Nov-01 10:18 
GeneralRe: Towers of Hanoi Pin
Rick York21-Nov-01 11:25
mveRick York21-Nov-01 11:25 
GeneralRe: Towers of Hanoi Pin
Andrew Peace21-Nov-01 14:37
Andrew Peace21-Nov-01 14:37 
GeneralWeird Problem Pin
Peter Liddle21-Nov-01 8:50
Peter Liddle21-Nov-01 8:50 
GeneralRe: Weird Problem Pin
Christian Graus21-Nov-01 8:58
protectorChristian Graus21-Nov-01 8:58 
GeneralRe: Weird Problem Pin
Peter Liddle21-Nov-01 11:32
Peter Liddle21-Nov-01 11:32 
GeneralRe: Weird Problem Pin
Christian Graus21-Nov-01 11:46
protectorChristian Graus21-Nov-01 11:46 
GeneralRe: Weird Problem Pin
Peter Liddle21-Nov-01 13:16
Peter Liddle21-Nov-01 13:16 

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.