RE: Re[2]: [Dev-C++] combobox usage help
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Chris S. <CS...@Ai...> - 2003-11-11 07:58:35
|
Zodiaq,=20 The last compulsory parameter of the COMBOBOX statement is the height of = the combobox when you click the pulldown. You currently have it set to = 11, which means it'll only expand to one line when you pulldown.=20 I changed it to=20 COMBOBOX IDC_OPTIONS_X, 15, 80, 100, 60 and it works. =09 Chris=20 -----Original Message----- From: Zodiaq [mailto:zo...@ac...] Sent: Tuesday, 11 November 2003 10:43 AM To: Chris Sroka Subject: Re[2]: [Dev-C++] combobox usage help Hello Chris and all Dev-C++ users, Monday, November 10, 2003, 11:27:51 PM, Chris wrote as follows: CS> I note that the ID of your combo box is IDC_OPTIONS, but when you CS> call SendDlgItemMessage you use IDC_MY_COMBO. Unless these two are CS> defined the same, the function call will apply to another dialog = item, No, I just typed examples how I use controls, without worrying about = real names... CS> and that may be what is causing the crash. The lack of the = WS_VSCROLL CS> option may also be preventing the vertical scroll bars.=20 Added WS_VSCROLL, no change... CS> FYI: I have used this code and know it works:=20 CS> Define the combo box in the .rc file:=20 CS> COMBOBOX IDC_COMBO_BOX5, 335, 280, 30, 60, CS> CBS_HASSTRINGS | CBS_DROPDOWNLIST | WS_VSCROLL CS> Then to add a "N" to the combo box use.=20 CS> SendDlgItemMessage(hwnd, IDC_COMBO_BOX5, CB_ADDSTRING, 0, (LPARAM) = (LPCTSTR) "N"); CS> Let me know how you go.=20 Couldn't make it... could you look at example and tell where I go = wrong?? Thanks for help and waiting for reply... --=20 regards, Zodiaq |