Page 1 of 1

how to Remove or Clear items of a combo box.

PostPosted: Mon Sep 10, 2007 2:18 pm
by xplorexxx
Hi L. Spiro,

I added some items to a combo box.
How can I remove an item or clear all.

Thanks.

PostPosted: Mon Sep 10, 2007 10:25 pm
by L. Spiro
Code: Select all
SendMessage( hCombo, CB_DELETESTRING, iIndex, 0 ); // Delete an item based off index.

SendMessage( hCombo, CB_RESETCONTENT, 0, 0 ); // Delete everything.



L. Spiro

PostPosted: Wed Sep 12, 2007 5:12 pm
by xplorexxx
CB_DELETESTRING is an undeclared identifier

PostPosted: Wed Sep 12, 2007 5:49 pm
by L. Spiro
Paste this at the top of the file, all or just the one(s) you need:

Code: Select all
#define CB_GETEDITSEL               0x0140
#define CB_LIMITTEXT                0x0141
#define CB_SETEDITSEL               0x0142
#define CB_ADDSTRING                0x0143
#define CB_DELETESTRING             0x0144
#define CB_DIR                      0x0145
#define CB_GETCOUNT                 0x0146
#define CB_GETCURSEL                0x0147
#define CB_GETLBTEXT                0x0148
#define CB_GETLBTEXTLEN             0x0149
#define CB_INSERTSTRING             0x014A
#define CB_RESETCONTENT             0x014B
#define CB_FINDSTRING               0x014C
#define CB_SELECTSTRING             0x014D
#define CB_SETCURSEL                0x014E
#define CB_SHOWDROPDOWN             0x014F
#define CB_GETITEMDATA              0x0150
#define CB_SETITEMDATA              0x0151
#define CB_GETDROPPEDCONTROLRECT    0x0152
#define CB_SETITEMHEIGHT            0x0153
#define CB_GETITEMHEIGHT            0x0154
#define CB_SETEXTENDEDUI            0x0155
#define CB_GETEXTENDEDUI            0x0156
#define CB_GETDROPPEDSTATE          0x0157
#define CB_FINDSTRINGEXACT          0x0158
#define CB_SETLOCALE                0x0159
#define CB_GETLOCALE                0x015A
#define CB_GETTOPINDEX              0x015b
#define CB_SETTOPINDEX              0x015c
#define CB_GETHORIZONTALEXTENT      0x015d
#define CB_SETHORIZONTALEXTENT      0x015e
#define CB_GETDROPPEDWIDTH          0x015f
#define CB_SETDROPPEDWIDTH          0x0160
#define CB_INITSTORAGE              0x0161
#define CB_MULTIPLEADDSTRING        0x0163


You will be able to remove these after downloading the next release.


L. Spiro

PostPosted: Sat Sep 22, 2007 10:59 pm
by L. Spiro
You can now remove these defines as they are enumerated in version 4.0.0.2.


L. Spiro

PostPosted: Mon Sep 24, 2007 8:38 am
by xplorexxx
Thank you.