dmag
asked on
Tab Control
I've created a tab control this way:
hwndTab = CreateWindow(
WC_TABCONTROL, "",
WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE,
0, 0, rcClient.right, rcClient.bottom,
hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE), NULL
);
And I'm changing the text of the tab this way:
TCITEM t;
t.mask = TCIF_TEXT;
t.pszText = buffer;
t.cchTextMax = strlen(buffer);
TabCtrl_SetItem(gTABhwnd, 1, &t);
The problem is that the tab control redraws itself when I change the tab caption, causing flicker as I redraw the controls on the tab. Is there any way to avoid this? (i.e. change the text without flicker.) Like not having the control or the window erase the background?
hwndTab = CreateWindow(
WC_TABCONTROL, "",
WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE,
0, 0, rcClient.right, rcClient.bottom,
hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE), NULL
);
And I'm changing the text of the tab this way:
TCITEM t;
t.mask = TCIF_TEXT;
t.pszText = buffer;
t.cchTextMax = strlen(buffer);
TabCtrl_SetItem(gTABhwnd, 1, &t);
The problem is that the tab control redraws itself when I change the tab caption, causing flicker as I redraw the controls on the tab. Is there any way to avoid this? (i.e. change the text without flicker.) Like not having the control or the window erase the background?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER