Hi, need help again:
This is in the main function, the last statement being the message sending I want to send to my LTEXT.
The construction of my dialog, the last and only LTEXT being the one I want to set text into.Code:case WM_INITDIALOG:{ HWND handle; LRESULT l; handle = NULL; handle = GetDlgItem(hwnd2, ID_S_C); if (handle == NULL){ MessageBox(hwnd2, "handle == NULL", "........", MB_OK); } l = SendMessage(handle, CB_ADDSTRING, (WPARAM) 0, (LPARAM) "Name"); /* LPARAM must be char[] string */ l = SendMessage(handle, CB_SETCURSEL, (WPARAM) 0, (LPARAM) "Name"); l = SendMessage(handle, CB_ADDSTRING, 0, (LPARAM) "Telephone"); l = SendMessage(handle, CB_ADDSTRING, 0, (LPARAM) "Email"); handle = NULL; handle = GetDlgItem(hwnd2, ID_GROUP); l = SendMessage(handle, CB_ADDSTRING, 0, (LPARAM) "All Contacts"); l = SendMessage(handle, CB_SETCURSEL, 0, (LPARAM) "All Contacts"); handle = GetDlgItem(hwnd2, ID_VIEW); l = SendMessage(handle, WM_SETTEXT, 0, (LPARAM) "abc"); }
Thanks in advance.Code:IDD_FILE DIALOGEX DISCARDABLE 0, 17, 259, 300 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION FONT 8, "MS Sans Serif" BEGIN PUSHBUTTON "&Search", ID_SEARCH, 200, 20, 50, 14 COMBOBOX ID_S_C, 13, 20, 40, 100, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP EDITTEXT ID_EDIT_FIELD, 60, 20, 133, 13 PUSHBUTTON "&Add", ID_ADD, 200, 65, 50, 14 PUSHBUTTON "&Edit", ID_EDIT, 200, 82, 50, 14 PUSHBUTTON "&Delete", ID_DELETE, 200, 99, 50, 14 COMBOBOX ID_GROUP, 13, 42, 60, 100, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LISTBOX ID_LIST, 13, 65, 120, 150, LBS_NOTIFY | WS_BORDER | WS_VSCROLL LTEXT ID_VIEW, 13, 220, 230, 70, SS_WHITERECT | WS_BORDER | SS_LEFT END



LinkBack URL
About LinkBacks



