Solved

Tab Control

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

713 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