flat assembler
Message board for the users of flat assembler.
Index
> Windows > Combobox how change text on sel item ? |
| Author |
|
|
Roman 05 Sep 2026, 18:43
I created combobox and do couple CB_ADDSTRING "name1".
I get three items with text "name1". I want select some item and rename. How do this ? |
|||
|
|
Roman 06 Sep 2026, 02:57
bitRAKE thanks.
Main goal get name from another combobox or edit. Code: ;this work good tmpBufr db 80 dup(0) macro comboRenameTxt c { local .jj invoke SendMessage,[c],CB_GETCURSEL,dword 0,0 cmp eax, CB_ERR je .jj mov ebx,eax invoke SendMessage,[ComboName], WM_GETTEXT,64 ,tmpBufr invoke SendMessage,[c],CB_DELETESTRING,ebx,0 invoke SendMessage,[c],CB_INSERTSTRING,ebx,tmpBufr invoke SendMessage, [c], CB_SETCURSEL, ebx, 0 .jj: } |
|||
|
|
Roman 06 Sep 2026, 04:27
How get CB_DIR ?
And i not found DDL_READONLY value. |
|||
|
|
bitRAKE 06 Sep 2026, 05:24
Code: CB_DIR = 0x0145 ; Directory Drop List (DDL_) flags used by CB_DIR (ComboBox), LB_DIR (ListBox) DDL_READWRITE = 0x0000 ; includes files with no additional attributes DDL_READONLY = 0x0001 DDL_HIDDEN = 0x0002 DDL_SYSTEM = 0x0004 DDL_DIRECTORY = 0x0010 DDL_ARCHIVE = 0x0020 DDL_DRIVES = 0x4000 ; includes mapped drives DDL_EXCLUSIVE = 0x8000 ; only includes files with the specified attributes section '.data' data readable writeable szSearchPattern db 'C:\Windows\*.dll', 0 section '.text' code readable executable ; ... ; Populate combobox with read-only files and archives matching the pattern invoke SendMessage, [hComboBox], CB_DIR, DDL_READONLY or DDL_ARCHIVE, szSearchPattern cmp eax, CB_ERR je .error_invalid_path ; -1, path was invalid or no files were found cmp eax, CB_ERRSPACE je .error_out_of_memory ; -2, insufficient memory to store the strings ; if successful, eax contains the zero-based index of the last item added. |
|||
|
|
Roman 06 Sep 2026, 05:47
Thanks.
|
|||
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2026, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.