Click here to Skip to main content
15,917,321 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PropSheets/Pages - initializing controls Pin
Michael Dunn12-Jul-04 9:10
sitebuilderMichael Dunn12-Jul-04 9:10 
GeneralAccessing Doc in a SDI Application Pin
jerry1211a9-Jul-04 10:26
jerry1211a9-Jul-04 10:26 
GeneralRe: Accessing Doc in a SDI Application Pin
Johan Rosengren10-Jul-04 3:53
Johan Rosengren10-Jul-04 3:53 
GeneralEthernet Message When Network Connection Is Broken Pin
jerry1211a9-Jul-04 10:16
jerry1211a9-Jul-04 10:16 
GeneralRe: Ethernet Message When Network Connection Is Broken Pin
palbano10-Jul-04 9:52
palbano10-Jul-04 9:52 
GeneralTreeCtrl for Folders and Files Pin
Grahamfff9-Jul-04 10:02
Grahamfff9-Jul-04 10:02 
GeneralRe: TreeCtrl for Folders and Files Pin
PJ Arends10-Jul-04 9:41
professionalPJ Arends10-Jul-04 9:41 
GeneralCPropertySheet / Page question Pin
hongheo769-Jul-04 9:21
hongheo769-Jul-04 9:21 
I am struggling with CPropertySheet / CPropertyPage to create a tabbed dialog box.

After creating a project, I Project/Add Component / VisualC++ Component / PropertySheet. Then, I selected a PropertySheet (instead of Wizard) with 3 tabs. The tabs showed up in the project as CMyPropertyPage1, 2, 3.

The CPropertyPage1 (2,3) is :: public CPropertyPage (subclass)

If I look at the header file CPropertyPage1.h, I see soemthing like:
// Dialog Data
//{{AFX_DATA(CMyPropertyPage1)
enum { IDD = IDD_PROPPAGE1 };
// NOTE - ClassWizard will add data members here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_DATA


Now, if I add some controls on any page, and double click on it for the handler code, Visual C++ asks me to create new class. Then, a new class is created based on CDialog. Assume its name is CMyPage1

CMyPage1 is :: public CDialog, and is also bound on the same dialog template:

// Dialog Data
//{{AFX_DATA(CPage1)
enum { IDD = IDD_PROPPAGE1 };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA

So, my question is:

Both CPropertyPage1 and CMyPage1 are refering to the same dialog template (IDD_PROPPAGE1). MyPropertySheet adds the CPropertyPage-typed variables in its constructor. CMyPage processes the handler code.

What is the relationship between CMyPage1 and CPropertyPage1 ? It seems to me that they are 2 parts of each tab. Why the hell do we need to have 2 separate classes that refer to the same thing ?

Thanks a lot for enlightening me.


GeneralRe: CPropertySheet / Page question Pin
PJ Arends10-Jul-04 9:45
professionalPJ Arends10-Jul-04 9:45 
GeneralNon-Blocking I/O From Within a Dialog Pin
pHaze4269-Jul-04 8:31
pHaze4269-Jul-04 8:31 
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
David Crow9-Jul-04 8:40
David Crow9-Jul-04 8:40 
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
pHaze4269-Jul-04 9:06
pHaze4269-Jul-04 9:06 
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
David Crow9-Jul-04 9:12
David Crow9-Jul-04 9:12 
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
palbano9-Jul-04 8:46
palbano9-Jul-04 8:46 
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
pHaze4269-Jul-04 9:30
pHaze4269-Jul-04 9:30 
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
palbano10-Jul-04 8:17
palbano10-Jul-04 8:17 
GeneralRe: Non-Blocking I/O From Within a Dialog Pin
pHaze42612-Jul-04 2:30
pHaze42612-Jul-04 2:30 
GeneralA pointer delimma (requesting help from pointer/dynamic array gurus) Pin
NTense9-Jul-04 7:45
NTense9-Jul-04 7:45 
GeneralRe: A pointer delimma (requesting help from pointer/dynamic array gurus) Pin
palbano9-Jul-04 8:13
palbano9-Jul-04 8:13 
GeneralRe: A pointer delimma (requesting help from pointer/dynamic array gurus) Pin
NTense10-Jul-04 7:22
NTense10-Jul-04 7:22 
GeneralTesting which OS I'm on Pin
Timothy Grabrian9-Jul-04 6:15
professionalTimothy Grabrian9-Jul-04 6:15 
GeneralRe: Testing which OS I'm on Pin
David Crow9-Jul-04 7:01
David Crow9-Jul-04 7:01 
GeneralRe: Testing which OS I'm on Pin
palbano9-Jul-04 7:04
palbano9-Jul-04 7:04 
GeneralRe: Testing which OS I'm on Pin
jmkhael9-Jul-04 7:05
jmkhael9-Jul-04 7:05 
GeneralRe: Testing which OS I'm on Pin
Michael Dunn9-Jul-04 10:05
sitebuilderMichael Dunn9-Jul-04 10:05 

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.