Click here to Skip to main content
15,918,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralTo Christian Graus & Nish Pin
Karavaev Denis28-Nov-01 7:21
Karavaev Denis28-Nov-01 7:21 
GeneralRe: To Christian Graus & Nish Pin
Chris Losinger28-Nov-01 7:46
professionalChris Losinger28-Nov-01 7:46 
GeneralRe: Who are these guys? Pin
Masaaki Onishi28-Nov-01 9:47
Masaaki Onishi28-Nov-01 9:47 
GeneralRe: Who are these guys? Pin
Karavaev Denis28-Nov-01 17:20
Karavaev Denis28-Nov-01 17:20 
GeneralRe: To Christian Graus & Nish Pin
Karavaev Denis28-Nov-01 17:23
Karavaev Denis28-Nov-01 17:23 
GeneralRe: OK, This is a tricky one! Pin
Masaaki Onishi28-Nov-01 17:34
Masaaki Onishi28-Nov-01 17:34 
GeneralI think, I'm an idiot .... Pin
Karavaev Denis28-Nov-01 17:47
Karavaev Denis28-Nov-01 17:47 
GeneralRe: I think, I'm an idiot .... Pin
Masaaki Onishi28-Nov-01 18:44
Masaaki Onishi28-Nov-01 18:44 
Hello, the codegurus around the world.;)

::SendMessage(::GetDlgItem(m_hWnd, m_list),
LB_ADDSTRING, 0, (LONG) "..");


How did you declare m_list? CString m_list?
GetDlgItem has the second parameter as ID of the control.
So, this should take something like IDC_LIST1.
But, are you sure that you add ListBox (ID: IDC_LIST1) on your dialog box?

Simply copying the code never works unless you have enough knowledge
of both MFC and Win32 program in this case. Cool | :cool:

Or, to be sure, you add ListBox on your dialog box.
This works.
If you declare CListBox m_list;
::SendMessage(m_list.m_hWnd, LB_ADDSTRING, 0, (LONG) "..");
or
m_list.AddString ("..");
or
m_list.SendMessage(LB_ADDSTRING, 0, (LONG)"..");



Please, don't send me your email about your questions directly.
Have a nice day!
Sonork - 100.10571:vcdeveloper Wink | ;)

-Masaaki Onishi-


GeneralRe: I think, I'm an idiot .... Pin
Karavaev Denis28-Nov-01 19:01
Karavaev Denis28-Nov-01 19:01 
GeneralRe: I think, I'm an idiot .... Pin
Nish Nishant28-Nov-01 18:45
sitebuilderNish Nishant28-Nov-01 18:45 
GeneralRe: Ooops, I forgot to say... Pin
Masaaki Onishi29-Nov-01 7:03
Masaaki Onishi29-Nov-01 7:03 
Generalgt Pin
28-Nov-01 5:34
suss28-Nov-01 5:34 
GeneralCFileDialog and CFile::Open Pin
RobJones28-Nov-01 5:23
RobJones28-Nov-01 5:23 
GeneralRe: CFileDialog and CFile::Open Pin
Nish Nishant28-Nov-01 5:26
sitebuilderNish Nishant28-Nov-01 5:26 
GeneralRe: CFileDialog and CFile::Open Pin
RobJones28-Nov-01 5:38
RobJones28-Nov-01 5:38 
GeneralRe: CFileDialog and CFile::Open Pin
RobJones28-Nov-01 6:35
RobJones28-Nov-01 6:35 
GeneralRe: CFileDialog and CFile::Open Pin
RobJones28-Nov-01 9:19
RobJones28-Nov-01 9:19 
GeneralRe: CFileDialog and CFile::Open Pin
28-Nov-01 14:27
suss28-Nov-01 14:27 
GeneralGetDiskFreeSpaceEx Pin
RickyC28-Nov-01 5:22
RickyC28-Nov-01 5:22 
GeneralRe: GetDiskFreeSpaceEx Pin
Jon Hulatt28-Nov-01 5:47
Jon Hulatt28-Nov-01 5:47 
GeneralRe: GetDiskFreeSpaceEx Pin
Nish Nishant28-Nov-01 5:53
sitebuilderNish Nishant28-Nov-01 5:53 
GeneralRe: GetDiskFreeSpaceEx Pin
RickyC28-Nov-01 6:19
RickyC28-Nov-01 6:19 
GeneralRe: GetDiskFreeSpaceEx Pin
Michael Dunn28-Nov-01 8:34
sitebuilderMichael Dunn28-Nov-01 8:34 
GeneralRe: GetDiskFreeSpaceEx Pin
jerry0davis19-Mar-02 0:19
jerry0davis19-Mar-02 0:19 
GeneralRe: GetDiskFreeSpaceEx Pin
Nish Nishant19-Mar-02 0:49
sitebuilderNish Nishant19-Mar-02 0:49 

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.