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..
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..
Please post the code.
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.
invoke SendDlgItemMessage,hWnd,IDC_SETSIZE,CB_ADDSTRING,0,addr test2
IDC_SETSIZE is the Combo Box ID.
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
test2 db "ab(cd),0 ;the last char is ")" <-- there is no quote at the end of the string
Nobody know? :sad: :?:
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.