hi people
I am using resource files, and I am having some problems with a tabcontrol and its child window.
when I change the tab's caption using TCM_SETITEM the child window disappears.
this is part of my code.
I change it this way
thank you.
I am using resource files, and I am having some problems with a tabcontrol and its child window.
when I change the tab's caption using TCM_SETITEM the child window disappears.
this is part of my code.
;-- WM_INITDIALOG
;-- insertar el primer tab
mov tab.imask, TCIF_TEXT
mov tab.pszText, offset szMessage
mov tab.cchTextMax, sizeof szMessage
call SendDlgItemMessage, handle, ID_TABCONTROL, TCM_INSERTITEM, 0, addr tab
;-- crear dlg del primer tab
call GetDlgItem, handle, ID_TABCONTROL
mov hTabControl, eax
call CreateDialogParam, lparam, ID_DLGTAB, eax, offset TabWndProc, 0
mov hTabWnd, eax
I change it this way
mov tab.imask, TCIF_TEXT
mov tab.pszText, esi ; esi points to new caption
call SendDlgItemMessage, hMainWnd, ID_TABCONTROL, TCM_SETITEM, 0, addr tab
thank you.
This is the Example I downloaded from RadAsm webpage.
You can see what I mean when I change the Tab's caption
You can see what I mean when I change the Tab's caption
add the following
mov tab.imask, TCIF_TEXT
mov tab.pszText, esi ; esi points to new caption
call SendDlgItemMessage, hMainWnd, ID_TABCONTROL, TCM_SETITEM, 0, addr tab
invoke InvalidateRect,hTab,0,TRUE
mov tab.imask, TCIF_TEXT
mov tab.pszText, esi ; esi points to new caption
call SendDlgItemMessage, hMainWnd, ID_TABCONTROL, TCM_SETITEM, 0, addr tab
invoke InvalidateRect,hTab,0,TRUE
thank you, InvalidateRect works well!