CTabCtrl is a Windows user interface control for managing a set of tab windows or tab panes. The class appears in a number of different window frame works such as MFC, WTL, and others.
Questions tagged [ctabctrl]
29 questions
8
votes
1 answer
Which is preferred CTabCtrl vs. CPropertySheet in MFC?
I don't know how to use both of them. So a sample code with pros and cons is perfect. Which one is preferred? Why?

knaser
- 1,421
- 7
- 19
- 16
6
votes
1 answer
How to change CTabCtrl tab colors?
Hello and happy new year, (it is acceptable to say it until Thursday)
I am trying to change the color of the tabs in the CTabCtrl class. I am trying to create my own ReskinCTablCtrl so that I can just call it in separate classes and easily use it…

Kemal Tezer Dilsiz
- 3,739
- 5
- 24
- 43
3
votes
0 answers
Why is CTabCtrl background white, not the colour of the dialog
Within Visual Studio 2017 I created an MFC dialog-based application from scratch. In the dialog editor I dropped a Tab Control on then used Add Variable... to create a data member of type CTabCtrl and added a couple of lines in OnInitDialog() to…

PeteUK
- 1,062
- 12
- 26
3
votes
3 answers
How to use a CTabCtrl in a MFC dialog based application?
I need to do something which i expected to be was simple - create a tab control which has 2 tabs, implying 2 modes of operation for my app. When user clicks on Tab1, he'll be presented with some buttons and textboxes, and when he clicks Tab2, some…

TCSGrad
- 11,898
- 14
- 49
- 70
2
votes
1 answer
How to get extra data from MFC Tab Control (TabCtrl)?
I have created an MFC dialog based application to study tab control. In a tab control it is possible to set application specific data to each tab.
I am trying to understand how to set/retrieve the data for individual tabs of the tab control.
Here is…

Sahil Singh
- 3,352
- 39
- 62
2
votes
3 answers
win32 CTabctrl: Drawing "child" windows in the active tab
I have a resizable dialog that contains a CTabCtrl, the tab control has 4 tabs that when clicked on displays one of four different CTreeCtrls.
I have derived a class from CTabCtrl, which keeps track of its "child" controls like so:
...
class…

push 22
- 1,172
- 3
- 15
- 34
2
votes
1 answer
CTabCtrl SetItemRect?
I want to change the size of the tabs.
We have added a closing cross to our tabs, but it conflicts spaciously with the text of the tab.
So far I have realized the following:
GetItemRect(int i, RECT* rc) gives me the rect. What I really would like…

JOG
- 5,590
- 7
- 34
- 54
1
vote
1 answer
Controlling Inner CTabControl Items with TAB and Arrow Keys
I have an issue Controlling CTabControl Inner tab items with TAB and Arrow keys.
here is my code and a few screenshots:
OnInitDialog() method of the main dialog window:
BOOL PressetsDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
// AUTO…

Alex
- 41
- 5
1
vote
1 answer
classic look of windows tab control in unicode MFC program?
I am working on an MFC dialog based program with CTabCtrl (VS2017, W10). Everything works as expected, apart from the way tabs look (convoluted story, don't ask).
I need them to look like on the right, but when I created a new project with a…

Borek
- 91
- 6
1
vote
1 answer
MFC: How do you Paint a CTabView Background When no tabs exist?
I what to display some text, probably using DrawText() on to the CTabView client area when no tabs exist to explain why they don't exist. However, CTabView::OnPaint() is not called except once at the app startup. Also when all tabs hidden the…

df234987
- 513
- 2
- 13
1
vote
0 answers
ChildWindowFromPoint unable to get button/text hwnd inside a tab dialog - MFC
I am working on how to get the window handle by using the mouse cursor pointing on the window. The problem is I cannot get the button/text which is inside a tab dialog. I used Spy++ to get the hierarchy, there are 3 layers to reach the desired…

Joshua_0101
- 57
- 5
1
vote
0 answers
Setting the bar of a CTabCtrl to transparent
I have a CTabCtrl and I am using WindowsBlinds to skin my computer GUI.
This is a MFC CDialog object.
Is there anything I can do in code so that the grey area renders transparent?
I tried setting the transparent resource property but it did not…

Andrew Truckle
- 17,769
- 16
- 66
- 164
1
vote
1 answer
MFC CListCtrl does not appear after minimise-restore
Let me say at outset that I'm using old technology by today's standards! This happens in MFC on Visual Studio 2005 and running under WinXP. (If it 'aint broke.... ;-) )
I have a dialog based app which has a CTabCtrl with two tabs. Each contains a…

Bordonbert
- 56
- 1
- 5
0
votes
0 answers
How to draw Focus Border to a specific Tab in MFC TabControl
I was trying to Manually Set Focus border to Tabs selected using SetCurSel() API. But While doing so i also wanted to set the Keyboard Focus(Dotted Border Focus around the Tab as shown in Picture). All I could achieve is Tab selection using…

Jishnu Jayakumar
- 11
- 2
0
votes
1 answer
MFC: Adding CListView tab to a CTabView (CBCGPTabView) on request doesn't call CMyListView::OnInitialUpdate()
I have a CMyTabView derived from CBCGPTabView (CTabView) that I want to add tabs to on the fly. The tab being added will be a CMyListView derived from CListView. If I add the tab during CMyTabView::OnCreate() it works fine. If I try to do it via…

user3161924
- 1,849
- 18
- 33