|
From: Chris S. <CS...@Ai...> - 2003-11-10 22:27:55
|
I note that the ID of your combo box is IDC_OPTIONS, but when you call =
SendDlgItemMessage you use IDC_MY_COMBO. Unless these two are defined =
the same, the function call will apply to another dialog item, and that =
may be what is causing the crash. The lack of the WS_VSCROLL option may =
also be preventing the vertical scroll bars.=20
FYI: I have used this code and know it works:=20
Define the combo box in the .rc file:=20
COMBOBOX IDC_COMBO_BOX5, 335, 280, 30, 60, CBS_HASSTRINGS | =
CBS_DROPDOWNLIST | WS_VSCROLL
Then to add a "N" to the combo box use.=20
SendDlgItemMessage(hwnd, IDC_COMBO_BOX5, CB_ADDSTRING, 0, (LPARAM) =
(LPCTSTR) "N");=20
Let me know how you go.=20
Regards
Chris=20
-----Original Message-----
From: Zodiaq [mailto:zo...@ac...]
Sent: Tuesday, 11 November 2003 3:45 AM
To: Dev...@li...
Subject: [Dev-C++] combobox usage help
Hello all Dev-cpp-users,
I got big problem that I can't pass... in my app I want to use =
combobox,
i.e. in .rc file defined like this:
COMBOBOX IDC_OPTIONS, 15, 80, 100, 11, WS_TABSTOP | =
CBS_DROPDOWNLIST | CBS_HASSTRINGS
i know how to add new string to control but I can't force this control =
to
show contents using dropdown list... when I click only line shows below =
but
nothing else happens - I'm sure I need one more function, but which?? =
When I
try to process CBN_DROPDOWN and in response send:
SendDlgItemMessage( hwnd, IDC_MY_COMBO, CB_SHOWDROPDOWN, TRUE, 0 );
my program just crashes... even tried very simple dialog with 3 =
controls,
but the same happens... help!
--=20
regards, Zodiaq...
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|