.const
szText1 db 'TEXT1',0
szText2 db 'TEXT2',0
szText3 db 'TEXT3',0
szText4 db 'TEXT4',0
szText5 db 'TEXT5',0


in the _ProcDlgMain

invoke	SendDlgItemMessage,hWnd,IDC_ARRAYLAYOUT,CB_ADDSTRING,0,addr szText1
invoke SendDlgItemMessage,hWnd,IDC_ARRAYLAYOUT,CB_ADDSTRING,0,addr szText2
invoke SendDlgItemMessage,hWnd,IDC_ARRAYLAYOUT,CB_ADDSTRING,0,addr szText3
invoke SendDlgItemMessage,hWnd,IDC_ARRAYLAYOUT,CB_ADDSTRING,0,addr szText4
invoke SendDlgItemMessage,hWnd,IDC_ARRAYLAYOUT,CB_ADDSTRING,0,addr szText5
invoke SendDlgItemMessage,hWnd,IDC_ARRAYLAYOUT,CB_SETCURSEL,0,0


But the sequence of the COMBOBOX of exe file I make is:

TEXT3
TEXT5
TEXT1
TEXT2
TEXT4

Why?Where is the problem?
Posted on 2005-12-14 02:05:59 by Eric4ever
You could use CB_INSERTSTRING, It allows you to specify the position at which the text should be inserted, btw are you using CBS_SORT style for your combo box..?
Posted on 2005-12-14 02:50:36 by lone_samurai5

You could use CB_INSERTSTRING, It allows you to specify the position at which the text should be inserted, btw are you using CBS_SORT style for your combo box..?



Thanks,lone_samurai5  :)

The CBS_SORT style is the point! It's OK now;)
Posted on 2005-12-14 02:58:06 by Eric4ever
in real it is strange behavior ??? here app and screenshot (if depend on os)
===
i mean there is no cbs_sort style used
Attachments:
Posted on 2005-12-14 03:50:28 by Shoo
Same here. The OS always adds the items at the last possible position (if there's no CBS_SORT). what Eric4ever mention is very strange.
Attachments:
Posted on 2005-12-14 12:14:48 by ti_mo_n