Click here to Skip to main content
16,004,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Mixing C and C++ code Pin
ForNow10-Aug-07 6:29
ForNow10-Aug-07 6:29 
GeneralRe: Mixing C and C++ code Pin
jhwurmbach10-Aug-07 6:36
jhwurmbach10-Aug-07 6:36 
GeneralRe: Mixing C and C++ code Pin
ForNow10-Aug-07 11:52
ForNow10-Aug-07 11:52 
GeneralRe: Mixing C and C++ code Pin
jhwurmbach12-Aug-07 23:12
jhwurmbach12-Aug-07 23:12 
GeneralRe: Mixing C and C++ code Pin
ForNow13-Aug-07 0:51
ForNow13-Aug-07 0:51 
QuestionAddString() function again Pin
tyagineha9-Aug-07 18:11
tyagineha9-Aug-07 18:11 
AnswerRe: AddString() function again Pin
Nelek9-Aug-07 20:31
protectorNelek9-Aug-07 20:31 
AnswerRe: AddString() function again Pin
jhwurmbach9-Aug-07 22:17
jhwurmbach9-Aug-07 22:17 
tyagineha wrote:
CMyList myobj;
if(myobj.DoModal())
{
myobj.Addition("hye");
}


Called With DoModal(), a dialog is modal (blocking the GUI until it goes away). So DoModal() only returns after your dialog has been closed. IDOK is the return value when the OK-Button was used, IDCANCEL when the cancel button was used.
So you are filling the Listbox only after it has ended.

Add you call to addition between the instantiation of CMyList and the call to DoModal().
You probably will have to store the data in a variable in your derived class, because there is no such thing as a ListBox window you could call AddString() on.
Your class can then handle OnInitDialog() and fill the ListBox after the call to the base class.

All this is made easier by using a CDialog-derived class.
If you do not want to use CDialog, you would have to Create() the listbox yourself.


Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
George Orwell, "Keep the Aspidistra Flying", Opening words

AnswerRe: AddString() function again Pin
Hamid_RT10-Aug-07 1:11
Hamid_RT10-Aug-07 1:11 
QuestionWriteFile and fwrite Pin
George_George9-Aug-07 17:33
George_George9-Aug-07 17:33 
AnswerRe: WriteFile and fwrite Pin
Paresh Chitte9-Aug-07 18:34
Paresh Chitte9-Aug-07 18:34 
GeneralRe: WriteFile and fwrite Pin
George_George9-Aug-07 20:52
George_George9-Aug-07 20:52 
QuestionAbout active console session id Pin
fd01290029-Aug-07 16:24
fd01290029-Aug-07 16:24 
QuestionAbout IDR_MAINFRAME Pin
kellertonil9-Aug-07 14:46
kellertonil9-Aug-07 14:46 
AnswerRe: About IDR_MAINFRAME Pin
jk chan9-Aug-07 15:29
jk chan9-Aug-07 15:29 
Questionabout hooking does anyone know a good tutorial about hooking functions Pin
nah13379-Aug-07 12:18
nah13379-Aug-07 12:18 
AnswerRe: about hooking does anyone know a good tutorial about hooking functions Pin
Abdellatif_El_Khlifi12-Aug-07 16:32
Abdellatif_El_Khlifi12-Aug-07 16:32 
QuestionA discussion on books Pin
tom groezer9-Aug-07 11:02
tom groezer9-Aug-07 11:02 
AnswerRe: A discussion on books Pin
leckey9-Aug-07 14:26
leckey9-Aug-07 14:26 
AnswerRe: A discussion on books Pin
Nelek9-Aug-07 20:26
protectorNelek9-Aug-07 20:26 
GeneralRe: A discussion on books Pin
jhwurmbach9-Aug-07 22:26
jhwurmbach9-Aug-07 22:26 
GeneralRe: A discussion on books Pin
Nelek9-Aug-07 22:33
protectorNelek9-Aug-07 22:33 
GeneralRe: A discussion on books Pin
jhwurmbach9-Aug-07 22:40
jhwurmbach9-Aug-07 22:40 
AnswerRe: A discussion on books Pin
jhwurmbach9-Aug-07 22:23
jhwurmbach9-Aug-07 22:23 
GeneralRe: A discussion on books Pin
Vaclav_10-Aug-07 4:21
Vaclav_10-Aug-07 4:21 

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.