My ComboBox is with editable Edit, on OK I want to copy the text if it got changed... I get all the right signals in all the right places but can't copy the text?
this is all I can find to do and it doesn't work:
invoke SendMessage, hCombo, CB_SETEDITSEL, 0, -1
invoke OpenClipboard, hCombo
invoke SendMessage, hCombo, WM_COPY , 0, 0
invoke GetClipboardData, CF_TEXT
invoke MessageBox,NULL,eax,eax,MB_DEFBUTTON1
invoke CloseClipboard
any hope for me?
thanx,
DC
I got it with this:
mov ax, -1
shl eax, 16
mov ax, 0
invoke SendMessage, hCombo, CB_SETEDITSEL, 0, eax
invoke SendMessage, hCombo, WM_COPY , 0, 0
invoke OpenClipboard, hCombo
invoke GetClipboardData, CF_TEXT
invoke MessageBox,NULL,eax,eax,MB_DEFBUTTON1
invoke CloseClipboard
it seems like it should be more straight forward tho??
try
invoke SendMessage, hCombo, WM_GETTEXT, sizeof somebuffer, ADDR somebuffer
invoke MessageBox,NULL,ADDR somebuffer,0,MB_DEFBUTTON1
thanx arafel,
sometimes it aint so straight forward, well that solution was, but knowing you could use WM_ messages instead of CB_ messages wasn't
later,
DC