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

C / C++ / MFC

 
GeneralRe: Hacking into system Dlls Pin
Rassman22-Nov-01 2:16
Rassman22-Nov-01 2:16 
GeneralCombo Box Problem Pin
mvworld21-Nov-01 14:23
mvworld21-Nov-01 14:23 
GeneralRe: Combo Box Problem Pin
Sidney Chong21-Nov-01 14:42
Sidney Chong21-Nov-01 14:42 
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 
Well, here's the problem... the control hasn't been created yet! MFC's UI classes are really wrappers around the Win32 equivalents. Having constructed the class does not imply that the corresponding controls have been created. So what you want to do is the following:

(1) create a data member (a string or an array of strings maybe?) in your child dialog to hold the data thats going into the combo box.
(2) set this data member after you have created the child dialog but before the call to DoModal (DUH!)
(3) override OnInitDialog of the child dialog (or OnCreate if its not a dialog) to pass this data into the combo box using AddString or InsertString, whichever you prefer.

--update--
Oh bugger, Masaaki beat me to it..... Poke tongue | ;-P my link sux! Mad | :mad:
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 
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 

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.