Why can't I insert these strings into my combobox? Code: g_hWndFullscreenBox = CreateWindow("combobox", NULL, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED, MENU_WIDTH/2-150+100, 50, 200, 25, g_hWndMenu, (HMENU)ID_RESOLUTIONBOX, g_hInstance, NULL); SendMessage(g_hWndFullscreenBox, CB_INSERTSTRING, ID_FULLSCREEN_YES, (LPARAM)"Yes"); SendMessage(g_hWndFullscreenBox, CB_INSERTSTRING, ID_FULLSCREEN_NO, (LPARAM)"No");
Something like this has usually worked for me Code: SendMessage(g_hWndFullscreenBox, CB_INSERTSTRING, ID_FULLSCREEN_YES, (LPARAM)(LPCTSTR)"Yes"); the wparam parameter is the index pos... what value have you assigned to ID_FULLSCREEN_YES and or ID_FULLSCREEN_NO? You might also try (WPARAM)-1 to see if it inserts the string at the end of list. You can always put a desired string in the edit part by using Code: SendMessage(g_hWndFullscreenBox, CB_SETCURSEL, desired_index, 0);