Click here to Skip to main content
15,910,877 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can't create modeless dialogs Pin
hierro2-Jan-02 22:25
hierro2-Jan-02 22:25 
GeneralRe: Can't create modeless dialogs Pin
hierro2-Jan-02 21:42
hierro2-Jan-02 21:42 
GeneralRe: Can't create modeless dialogs Pin
Philip Patrick2-Jan-02 23:40
professionalPhilip Patrick2-Jan-02 23:40 
GeneralRe: Can't create modeless dialogs Pin
hierro3-Jan-02 0:32
hierro3-Jan-02 0:32 
GeneralRe: Can't create modeless dialogs Pin
Philip Patrick3-Jan-02 0:41
professionalPhilip Patrick3-Jan-02 0:41 
GeneralRe: Can't create modeless dialogs Pin
hierro3-Jan-02 5:14
hierro3-Jan-02 5:14 
GeneralAdding to list box Pin
vin2-Jan-02 20:46
vin2-Jan-02 20:46 
GeneralRe: Adding to list box Pin
Pierre Heler-Caruel2-Jan-02 22:10
Pierre Heler-Caruel2-Jan-02 22:10 
Hi,

there are at least 2 ways to solve your problem:

Assume
o hWndDialog is the Window-handle of your dialog
o IDC_LISTBOX is the Id of the ListBox
o pszStringToAdd is a pointer to the string you want to add

1) You could use GetDlgItem() like this
HWND hWndListBox = GetDlgItem(hWndDialog,IDC_LISTBOX);
if(hWndListBox)
{
// Found the Window-handle of the ListBox
SendMessage(hWndListBox,LB_ADDSTRING,0,(LPARAM)pszStringToAdd);
}
else
{
// Didn't found the Window-handle of the ListBox. Deal with the Error
...
}

2) alternatively, you could use SendDlgItemMessage() like this:
SendDlgItemMessage(hWndDialog,IDC_LISTBOX,LB_ADDSTRING,0,(LPARAM)pszStringToAdd);

HTH

Cheers,

Pierre Heler-Caruel
Generaloops on last message for formatting Pin
LauraKamel2-Jan-02 19:21
LauraKamel2-Jan-02 19:21 
GeneralRe: oops on last message for formatting Pin
Michael Dunn2-Jan-02 20:24
sitebuilderMichael Dunn2-Jan-02 20:24 
Generalformatting output with VC++ Pin
LauraKamel2-Jan-02 19:17
LauraKamel2-Jan-02 19:17 
GeneralReference & Pointer :: C++ Pin
valikac2-Jan-02 17:49
valikac2-Jan-02 17:49 
GeneralRe: Reference & Pointer :: C++ Pin
Christian Graus2-Jan-02 19:02
protectorChristian Graus2-Jan-02 19:02 
GeneralRe: Reference & Pointer :: C++ Pin
Nish Nishant2-Jan-02 19:17
sitebuilderNish Nishant2-Jan-02 19:17 
GeneralRe: Reference & Pointer :: C++ Pin
Christian Graus2-Jan-02 21:34
protectorChristian Graus2-Jan-02 21:34 
GeneralRe: Reference & Pointer :: C++ Pin
Nish Nishant2-Jan-02 22:12
sitebuilderNish Nishant2-Jan-02 22:12 
GeneralRe: Reference & Pointer :: C++ Pin
Nish Nishant2-Jan-02 19:14
sitebuilderNish Nishant2-Jan-02 19:14 
GeneralRe: Reference & Pointer :: C++ Pin
Nish Nishant2-Jan-02 19:16
sitebuilderNish Nishant2-Jan-02 19:16 
GeneralRe: Reference & Pointer :: C++ Pin
valikac2-Jan-02 19:28
valikac2-Jan-02 19:28 
GeneralRe: Reference & Pointer :: C++ Pin
Vimal Earnest3-Jan-02 0:52
Vimal Earnest3-Jan-02 0:52 
GeneralRe: Reference & Pointer :: C++ Pin
valikac3-Jan-02 8:25
valikac3-Jan-02 8:25 
GeneralGDI+ and RoundRect Pin
Andreas Hallberg2-Jan-02 17:03
Andreas Hallberg2-Jan-02 17:03 
GeneralRe: GDI+ and RoundRect Pin
Christian Graus2-Jan-02 17:08
protectorChristian Graus2-Jan-02 17:08 
GeneralRe: GDI+ and RoundRect Pin
Andreas Hallberg2-Jan-02 17:50
Andreas Hallberg2-Jan-02 17:50 
GeneralComplex Multiplication Pin
Roger Wright (new)2-Jan-02 16:09
Roger Wright (new)2-Jan-02 16:09 

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.