Solved

Tab Control

Posted on 1998-03-27
2
508 Views
Last Modified: 2013-12-03
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?
0
Comment
Question by:dmag
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 200 total points
ID: 1412352
Try adding WS_CLIPCHILDREN to your tab control's style.

0
 
LVL 1

Author Comment

by:dmag
ID: 1412353
Bingo! Now see my next question...
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question