Click here to Skip to main content
15,918,967 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHooking a driver to check application Pin
Fareed Rizkalla12-Aug-10 10:11
Fareed Rizkalla12-Aug-10 10:11 
QuestionInvalidate() Error CDialog Pin
mohit`1212-Aug-10 6:24
mohit`1212-Aug-10 6:24 
AnswerRe: Invalidate() Error CDialog Pin
Niklas L12-Aug-10 7:50
Niklas L12-Aug-10 7:50 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1213-Aug-10 4:53
mohit`1213-Aug-10 4:53 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1213-Aug-10 7:11
mohit`1213-Aug-10 7:11 
GeneralRe: Invalidate() Error CDialog Pin
Niklas L13-Aug-10 21:10
Niklas L13-Aug-10 21:10 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1215-Aug-10 10:38
mohit`1215-Aug-10 10:38 
GeneralRe: Invalidate() Error CDialog Pin
Niklas L15-Aug-10 22:28
Niklas L15-Aug-10 22:28 
I assume you have something like the following:

1. A form view or dialog that contains your tab control, say FormDlg.
2. A tab control class, either a CTabCtrl or a class derived from that.
3. This tab control contains a few tabs, where each should display a child dialog of type tab_one or derived from tab_one.

First, you either add a tab control in the resource editor and hook it up to a member variable of your FormDlg class, m_tabs. Or you create a tab control dynamically in FormDlg using CTabCtrl::Create().

Now every time you insert a new tab using CTabCtrl::InsetItem(), you also create a child dialog of type tab_one, using tab_one::Create(). You can also chose to create all these child dialogs when the tab control is first created, if the control has a fixed set of tabs. Make sure you position the child dialog relative your tab controls client area. It's a bit tricky, since the client area also includes the actual tabs at the top (stupid design I know) but you can get the hight if the tabs and adjust your display rectangle.

If the tab control is self contained, you keep those dialogs as members of your tab control derived class, otherwise they can be members of your FormDlg.

Now, displaying the proper child dialog is just a matter of responding the the TCN_SELCHANGE message and call tab_one::ShowWindow(SW_SHOW) for the activated tab, and ShowWindow(SW_HIDE) for the others.

GeneralRe: Invalidate() Error CDialog Pin
mohit`1216-Aug-10 3:30
mohit`1216-Aug-10 3:30 
GeneralRe: Invalidate() Error CDialog Pin
Niklas L16-Aug-10 9:15
Niklas L16-Aug-10 9:15 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1216-Aug-10 9:32
mohit`1216-Aug-10 9:32 
GeneralRe: Invalidate() Error CDialog Pin
Niklas L16-Aug-10 10:22
Niklas L16-Aug-10 10:22 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1216-Aug-10 18:14
mohit`1216-Aug-10 18:14 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1217-Aug-10 9:11
mohit`1217-Aug-10 9:11 
GeneralRe: Invalidate() Error CDialog Pin
Niklas L17-Aug-10 10:33
Niklas L17-Aug-10 10:33 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1218-Aug-10 5:34
mohit`1218-Aug-10 5:34 
GeneralRe: Invalidate() Error CDialog Pin
Niklas L19-Aug-10 10:05
Niklas L19-Aug-10 10:05 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1220-Aug-10 6:27
mohit`1220-Aug-10 6:27 
GeneralRe: Invalidate() Error CDialog Pin
Niklas L20-Aug-10 9:25
Niklas L20-Aug-10 9:25 
AnswerRe: Invalidate() Error CDialog Pin
KarstenK12-Aug-10 21:44
mveKarstenK12-Aug-10 21:44 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1213-Aug-10 6:09
mohit`1213-Aug-10 6:09 
GeneralRe: Invalidate() Error CDialog Pin
KarstenK15-Aug-10 22:13
mveKarstenK15-Aug-10 22:13 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1216-Aug-10 3:31
mohit`1216-Aug-10 3:31 
GeneralRe: Invalidate() Error CDialog Pin
KarstenK16-Aug-10 3:37
mveKarstenK16-Aug-10 3:37 
GeneralRe: Invalidate() Error CDialog Pin
mohit`1216-Aug-10 6:01
mohit`1216-Aug-10 6:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.