I define string in below...
test1 db "abcd  ",0    ;the last char is space
test2 db "ab(cd)",0    ;the last char is ")"

I add the strings into Combo Box in XP system. It's displayed "  abcd" & "(ab(cd"".
However in Windows2000, everything is ok.
Why?

It's a bug in XP?

my program:
invoke SendDlgItemMessage,hWnd,IDC_SETSIZE,CB_ADDSTRING,0,addr test1
invoke SendDlgItemMessage,hWnd,IDC_SETSIZE,CB_ADDSTRING,0,addr test2
IDC_SETSIZE is the Combo Box ID..
Posted on 2005-12-15 19:28:38 by firefly2k
Please post the code.
Posted on 2005-12-15 19:59:07 by ti_mo_n
invoke SendDlgItemMessage,hWnd,IDC_SETSIZE,CB_ADDSTRING,0,addr test1
invoke SendDlgItemMessage,hWnd,IDC_SETSIZE,CB_ADDSTRING,0,addr test2

IDC_SETSIZE is the Combo Box ID.
Posted on 2005-12-15 20:21:41 by firefly2k
test1 db "abcd  ",0  ;the last char is space
test2 db "ab(cd),0    ;the last char is ")" <-- there is no quote at the end of the string
Posted on 2005-12-16 00:21:53 by Shoo
Nobody know? :sad: :?:
Posted on 2005-12-22 17:51:50 by firefly2k
yes, in this code there is no error: i just made simple dialog box with single cbbox and fill it exactly with your code - it works proper. in some other place of your code wrong usage of pointers may cause writing in occasional memory location. fortunately it can be area where cbbox data placed in xp and some other in w2k: in other case you should get GPF with it.
Posted on 2005-12-23 02:44:26 by Shoo