Solved

Tab Control

Posted on 1998-03-27
2
502 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
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 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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now