Click here to Skip to main content
15,909,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SetWindowsHookEx lost when switching appl Pin
luc219-Sep-02 8:58
luc219-Sep-02 8:58 
GeneralChar to bstr Pin
suresh_sathya19-Sep-02 2:40
suresh_sathya19-Sep-02 2:40 
GeneralRe: Char to bstr Pin
Pavel Klocek19-Sep-02 2:53
Pavel Klocek19-Sep-02 2:53 
GeneralRe: Char to bstr Pin
Ranjan Banerji19-Sep-02 5:16
Ranjan Banerji19-Sep-02 5:16 
GeneralRe: Char to bstr Pin
Michael Dunn19-Sep-02 5:47
sitebuilderMichael Dunn19-Sep-02 5:47 
GeneralPropertyPages and TabPages Pin
monrobot1319-Sep-02 2:40
monrobot1319-Sep-02 2:40 
GeneralRe: PropertyPages and TabPages Pin
Pavel Klocek19-Sep-02 2:48
Pavel Klocek19-Sep-02 2:48 
GeneralRe: PropertyPages and TabPages Pin
Joan M19-Sep-02 3:35
professionalJoan M19-Sep-02 3:35 
-> First of all excuse my English

-> My answer:
You can, but you don't have to,

You have to create the property pages (tabs) and the property sheet (tabs recipient) separately.

In order to do that, you must create the property sheet class:

1. Menu insert -> new class.
2. Type the new class name.
3. Select the CPropertySheet base class.

Now you have the property sheet created, but this won't have any tab (property page).

To create pages (PropertyPages) you will have to:

1. Create a dialog resource (a normal dialog)
2. in the dialog properties select:
2.1. (Tab styles) Style = child
2.2. (Tab styles) Border = thin
2.3. (Tab styles) checked Title Bar (the other options in this tab must be unchecked)

3. Doubleclick the dialog (in order to create a new class for it)
3.1. Write the new name of the class.
3.2. Select the CPropertyPage base class.


Now you have created a property page and a property sheet, you can create all the property pages you want. (Surely there will be a limit of property pages, I don’t know it…)

Now you have to insert the property pages to the property sheet.

In order to do that:
Make sure that you have included the header files of the PropertyPages in the header file of the Property Sheet:

<br />
#if !defined(AFX_PSPARAMETRITZACIONS_H__8CB4FA88_5A89_4479_A479_4734680B1775__INCLUDED_)<br />
#define AFX_PSPARAMETRITZACIONS_H__8CB4FA88_5A89_4479_A479_4734680B1775__INCLUDED_<br />
<br />
#if _MSC_VER > 1000<br />
#pragma once<br />
#endif // _MSC_VER > 1000<br />
// PSParametritzacions.h : header file<br />
//<br />
<br />
#include "PPDlgParametritzacions.h"  /* header file of the Property page look at the name (is a good idea to name the files using a convention in order to know which kind of file are you including, working with…)*/<br />
…<br />


And you should add a PropertyPage variable for each PropertyPage that you want to add:

CPropertyPageClassThatYouWillHaveAdded m_CPPCTYHA;

In the constructor of the Property sheet class you should add the PropertyPages:

this->AddPage(&m_CPPCTYHA);

And that’s all…

(Just kidding…)


You will need to call the Property sheet:

In order to do that:

You should include the CMyPropertySheet class (header file) to the header file of from where you want to include the property sheet call.

Add a variable of the type CMyPropertySheet in the same class (dialog or xxx) from where you want to call the property sheet:

CMyPropertySheet m_MyPropertySheet;


(In order to try it you can create a CButton in a dialog) and in its click event you can call

m_MyPropertySheet.DoModal();


Hope this helps...

Its possible that I have done a typing error or that I have missed something, if this don't works, email me (or try it by yourself...).
GeneralRe: PropertyPages and TabPages Pin
monrobot1319-Sep-02 5:49
monrobot1319-Sep-02 5:49 
GeneralRe: PropertyPages and TabPages Pin
Joan M19-Sep-02 6:29
professionalJoan M19-Sep-02 6:29 
GeneralRe: PropertyPages and TabPages Pin
monrobot1319-Sep-02 8:49
monrobot1319-Sep-02 8:49 
Generalcurrency conversion Pin
bobjones219-Sep-02 2:39
bobjones219-Sep-02 2:39 
GeneralRe: currency conversion Pin
Le centriste19-Sep-02 4:04
Le centriste19-Sep-02 4:04 
GeneralInclude a .lib file Pin
Anonymous19-Sep-02 2:33
Anonymous19-Sep-02 2:33 
GeneralRe: Include a .lib file Pin
BlackSmith19-Sep-02 2:41
BlackSmith19-Sep-02 2:41 
GeneralRe: Include a .lib file Pin
User 665819-Sep-02 5:25
User 665819-Sep-02 5:25 
GeneralWant DLL Dialog to behave like Dialog base app Pin
Tony Teveris19-Sep-02 2:14
Tony Teveris19-Sep-02 2:14 
Questionhow to get an edit box to respond to enter Pin
ns19-Sep-02 1:14
ns19-Sep-02 1:14 
AnswerRe: how to get an edit box to respond to enter Pin
Arjan Schouten19-Sep-02 1:40
Arjan Schouten19-Sep-02 1:40 
AnswerRe: how to get an edit box to respond to enter Pin
dabs19-Sep-02 1:55
dabs19-Sep-02 1:55 
GeneralRe: I really need to know this.... Pin
ns19-Sep-02 2:04
ns19-Sep-02 2:04 
GeneralRe: I really need to know this.... Pin
dabs19-Sep-02 2:13
dabs19-Sep-02 2:13 
GeneralRe: I really need to know this.... Pin
ns19-Sep-02 2:27
ns19-Sep-02 2:27 
GeneralRe: I really need to know this.... Pin
Arjan Schouten19-Sep-02 3:23
Arjan Schouten19-Sep-02 3:23 
Generalavoid to close the property sheet when the user press return, handling return key in a ListCtrl... Pin
Joan M19-Sep-02 1:01
professionalJoan M19-Sep-02 1: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.