Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 326
  • Last Modified:

Adding button to a modeless propertysheet


After recieving help I now manage to open my modeless propertysheet (thank you), so my next question is how can I add buttons i.e CLOSE and CANCEL to the sheet that stays visible while changing propertypages?

Of course I can put two extra buttons in each propertypage with the name CLOSE and CANCEL, but I thought about using an extra modeless window added inside my CMiniFrameWindow.

Present idea:

1)Construct a CMiniFrameWnd from the CMainFrame.
2)In the CMiniFrameWnd I construct a Propertysheet ( new CSetUpSheet)

3)Create my modeless dialog with the two buttons CLOSE and CANCEL.
4) Append it

Around point (3) the problem starts, since I'm a novice in using and UNDERSTANDING MFC I change the pointers by random until it works (not always though...). If someone knows the philosophy behind how to use the constructor of the dialog and the Create (where to use which pointer...) and how to add the dialog in my case so it gets modeless I would be very happy.

Thank you in advance.
0
parmesan
Asked:
parmesan
1 Solution
 
naveenkohliCommented:
What i would suggest is that u create ur property sheet inside a modeless dialog box. In the dialog box u can have your buttons. To hold your propert sheet make use of picture control. You can assign the ID of that picture control to your CPropertySheet. And then follow the normal procedure of adding the propety pages to this sheet. If you want, i can send you example code for this.
0
 
parmesanAuthor Commented:
Adjusted points to 40
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now