Click here to Skip to main content
15,887,957 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: No Balloon Tip Pin
Great A'Tuin31-Jan-06 23:39
Great A'Tuin31-Jan-06 23:39 
GeneralRe: No Balloon Tip Pin
Owner drawn31-Jan-06 23:42
Owner drawn31-Jan-06 23:42 
GeneralRe: No Balloon Tip Pin
Owner drawn31-Jan-06 23:50
Owner drawn31-Jan-06 23:50 
GeneralRe: No Balloon Tip Pin
Great A'Tuin1-Feb-06 0:04
Great A'Tuin1-Feb-06 0:04 
QuestionPropertyPages+Sheet Pin
hanno2531-Jan-06 21:39
hanno2531-Jan-06 21:39 
AnswerRe: PropertyPages+Sheet Pin
Rage31-Jan-06 21:43
professionalRage31-Jan-06 21:43 
GeneralRe: PropertyPages+Sheet Pin
hanno2531-Jan-06 21:48
hanno2531-Jan-06 21:48 
GeneralRe: PropertyPages+Sheet Pin
Rage31-Jan-06 23:00
professionalRage31-Jan-06 23:00 

hanno25 wrote:
to send parameters, to give over parameters


OK! I was not sure what you meant.

The idea behind the Property pages is:

You have a property sheet containing property pages.
You set up the property sheet, adding the property pages one by one, then the property sheet is called with a DoModal() from your base dialog. Now to exchange data between the property pages and your base dialog, you do the following:

The data you want to retrieve is saved in each property page in member variables.( I usually save everything in each property page in the OnDestroy() function, which is called when the property page is destroyed.)

Before doing the propsheet.Domodal(), you initialize all member variables of the property pages.
When the user clicks OK, the property sheet object still exist, and so do the property pages. You can then retrieve the data from the prop pages member variables.

A small code snippet:

CPage5Dlg page5;  // Property page
page5.m_EnvList      =m_EnvList;  // Set all member variables
page5.m_psp.dwFlags &=~PSP_HASHELP;
page5.m_AllowMultisession=m_AllowMultisession;
page5.m_AppendProject=m_AppendNewProject;
page5.m_psp.dwFlags| =PSP_USETITLE;
page5.m_psp.dwFlags& =~PSP_HASHELP;
page5.m_psp.pszTitle ="Environment";

CPage3Dlg page3comp; // Property page
page3comp.m_ShowLog=m_ShowCompilerLog;
page3comp.m_ShowComp=m_ShowCompilerWindow;
page3comp.m_CheckInno=m_CheckInno;
page3comp.m_DoComp=true;
page3comp.m_strarrNames.Copy(m_strarrNames);
page3comp.m_strarrOpt.Copy(m_strarrOpt);
page3comp.m_psp.dwFlags|=PSP_USETITLE;
page3comp.m_psp.dwFlags&=~PSP_HASHELP;
page3comp.m_psp.pszTitle="Compiler";

CPropertySheet Hello;  // property sheet

Hello.SetTitle("Settings..."); // sheet settings
Hello.m_psh.dwFlags&=~PSH_HASHELP;
Hello.m_psh.dwFlags|=PSH_NOAPPLYNOW|PSH_USEHICON;
Hello.m_psh.hIcon=m_hIcon;

Hello.AddPage(&page5); // adding the pages
Hello.AddPage(&page3comp);

if (Hello.DoModal()==IDOK)
{
   m_EnvList  = page5.m_EnvList; // Update the settings only if
       m_NamesArr = page3comp.strarrOpt; // user clicked ok.

}


~RaGE();
AnswerRe: PropertyPages+Sheet Pin
PJ Arends1-Feb-06 7:55
professionalPJ Arends1-Feb-06 7:55 
QuestionHow to find Processor serial no? Pin
<color>Aljechin 31-Jan-06 21:35
<color>Aljechin 31-Jan-06 21:35 
AnswerRe: How to find Processor serial no? Pin
Owner drawn31-Jan-06 21:54
Owner drawn31-Jan-06 21:54 
AnswerRe: How to find Processor serial no? Pin
_AnsHUMAN_ 31-Jan-06 22:13
_AnsHUMAN_ 31-Jan-06 22:13 
Questionhello.. Pin
KORCARI31-Jan-06 21:35
KORCARI31-Jan-06 21:35 
AnswerRe: hello.. Pin
_AnsHUMAN_ 31-Jan-06 21:44
_AnsHUMAN_ 31-Jan-06 21:44 
QuestionI still dont know how to move the hole Pin
eivanlo31-Jan-06 21:04
eivanlo31-Jan-06 21:04 
AnswerRe: I still dont know how to move the hole Pin
Stephen Hewitt31-Jan-06 21:37
Stephen Hewitt31-Jan-06 21:37 
Questionascii code for Ctrl+Esc Pin
mysticlol31-Jan-06 20:00
mysticlol31-Jan-06 20:00 
AnswerRe: ascii code for Ctrl+Esc Pin
kakan31-Jan-06 20:47
professionalkakan31-Jan-06 20:47 
AnswerRe: ascii code for Ctrl+Esc Pin
PJ Arends1-Feb-06 8:12
professionalPJ Arends1-Feb-06 8:12 
QuestionRelated to thunderbird extension Pin
baldha rakesh31-Jan-06 18:50
baldha rakesh31-Jan-06 18:50 
QuestionWM_OBJECTSEL Pin
ragavan31-Jan-06 18:47
ragavan31-Jan-06 18:47 
AnswerRe: WM_OBJECTSEL Pin
Stephen Hewitt31-Jan-06 22:08
Stephen Hewitt31-Jan-06 22:08 
GeneralRe: WM_OBJECTSEL Pin
ragavan31-Jan-06 22:53
ragavan31-Jan-06 22:53 
QuestionMemory usage decreases when the application GUI is minimized Pin
techratna31-Jan-06 15:33
techratna31-Jan-06 15:33 
AnswerRe: Memory usage decreases when the application GUI is minimized Pin
Stephen Hewitt31-Jan-06 15:52
Stephen Hewitt31-Jan-06 15:52 

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.