Hi and thanks for reading this.
I want to initialize a combo box.When I create the dialog, in which the box will be, I send CB_ADDSTRING to the box, but it doesn't works
Here is the code:
I have tried to put the code in the WM_INITDIALOG or WM_CREATE message-handlers of the windows procedure:Code:theWnd=CreateDialog(hInst,MAKEINTRESOURCE(IDD_PROB A),NULL,DlgProc); i=GetLastError(); SendDlgItemMessage(theWnd,IDC_COMBO1,CB_ADDSTRING, 0,(LPARAM) "some text"); ShowWindow(theWnd, SW_SHOW);
....................Code:BOOL CALLBACK DlgProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) { switch(uMsg) { case WM_CREATE: SendDlgItemMessage(hwndDlg,IDC_COMBO1,CB_ADDSTRING,0,(LPARAM) "some text"); break; case WM_INITDIALOG: SendDlgItemMessage(hwndDlg,IDC_COMBO1,CB_ADDSTRING,0,(LPARAM) "some text");
If somebody can tell me where the problem is, please tell me!



LinkBack URL
About LinkBacks



, i know...