News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

tabcontrol problem, child window disappears

Started by Chambao, July 16, 2005, 09:04:05 PM

Previous topic - Next topic

Chambao

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.

;-- 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.

Chambao

This is an Example I downloaded from RadAsm webpage.
when I change a Tab's caption its child window disappears, and i dont know how to fix it.
here is the source code.


[attachment deleted by admin]

diablo2oo2

use this code to create a tab window:

invoke GetModuleHandle,0
invoke CreateDialogParam,eax,ID_DLGTAB,handle,offset TabWndProc,0 ;handle= Handle of Parent Window
mov hTabWnd, eax


you can try this to show the window again after you changed the caption:

invoke ShowWindow,hTabWnd,SW_SHOW

Chambao

I tried it before but it didn't work
someone told me about InvalidateRect and it worked  :U
thank you

Bros

Hello

I think that

invoke UpdateWindow,hTabWnd

should also work....