Link to home
Start Free TrialLog in
Avatar of dmag
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?
ASKER CERTIFIED SOLUTION
Avatar of Tommy Hui
Tommy Hui

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dmag
dmag

ASKER

Bingo! Now see my next question...