CPropertySheet stuff
-
I have a CPropertySheet-derived class (with no associated dialog template). In the constructor, I call AddPage() for the three CPropertyPage-derived classes (Thin/Child templates). I've tried a number of things, but I can't seem to get any of the propertysheet buttons displayed. What am I missing? ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends
-
I have a CPropertySheet-derived class (with no associated dialog template). In the constructor, I call AddPage() for the three CPropertyPage-derived classes (Thin/Child templates). I've tried a number of things, but I can't seem to get any of the propertysheet buttons displayed. What am I missing? ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends
Hi, John! Nice to see you back on the forum. John Simmons / outlaw programmer wrote: I've tried a number of things, but I can't seem to get any of the propertysheet buttons displayed. To what buttons are you referring? Are these from your dialog template?
-
Hi, John! Nice to see you back on the forum. John Simmons / outlaw programmer wrote: I've tried a number of things, but I can't seem to get any of the propertysheet buttons displayed. To what buttons are you referring? Are these from your dialog template?
João Paulo Figueira wrote: Hi, John! Nice to see you back on the forum. I've always been here. :) Recently, I've been converting code from other projects to work in our PPC2K project. We have a common code base that is shared between apps that run on the Windows desktop, and apps that run on CE 2.12 proprietary embedded devices that don't have a (Windows) user interface. The problem has been that some of the compiler definitions are defined in such a way as to assume that if the program is being written for CE, then there is no user interface (not true for our PPC2K project), or that if MFC is being used, it must be a desktop Windows project (again, not true in our current case). Needless to say, this project has turned out to be the very bane of my miserable existance. Add to that, we're shoe-horning STL into the project, there's just plain strange legacy code, and my total lack of familiarity with the idea behind what I'm working on, and you can probably guess that I've been fairly hard to live with recently. Anyway, I'm temporarily working on some of the interface stuff once again. João Paulo Figueira wrote: To what buttons are you referring? Are these from your dialog template? You know, the buttons that always show up on a propertysheet under VC6, especially when you don't need them - Okay, Cancel, and Apply (and I don't need apply, but I do need cancel). I've even gone back to the basics of using property sheets to see where I could have gone wrong, and I can't see anything wrong with what I've done. ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends
-
João Paulo Figueira wrote: Hi, John! Nice to see you back on the forum. I've always been here. :) Recently, I've been converting code from other projects to work in our PPC2K project. We have a common code base that is shared between apps that run on the Windows desktop, and apps that run on CE 2.12 proprietary embedded devices that don't have a (Windows) user interface. The problem has been that some of the compiler definitions are defined in such a way as to assume that if the program is being written for CE, then there is no user interface (not true for our PPC2K project), or that if MFC is being used, it must be a desktop Windows project (again, not true in our current case). Needless to say, this project has turned out to be the very bane of my miserable existance. Add to that, we're shoe-horning STL into the project, there's just plain strange legacy code, and my total lack of familiarity with the idea behind what I'm working on, and you can probably guess that I've been fairly hard to live with recently. Anyway, I'm temporarily working on some of the interface stuff once again. João Paulo Figueira wrote: To what buttons are you referring? Are these from your dialog template? You know, the buttons that always show up on a propertysheet under VC6, especially when you don't need them - Okay, Cancel, and Apply (and I don't need apply, but I do need cancel). I've even gone back to the basics of using property sheets to see where I could have gone wrong, and I can't see anything wrong with what I've done. ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends
John Simmons / outlaw programmer wrote: Okay, Cancel, and Apply As far as I know the Pocket PC 2002, you only get the top left-hand-corner ok button. I'm not sure about the Pocket PC 2000, but I've seen dialogs with both the ok and the close (X) box. By using this button you would effectively cancel the dialog. I've recently came up with a solution, although it is not a standard one: insert a command bar in the dialog / property sheet and place the ok and cancel buttons there (graphic buttons). To do this, have a look at these articles: A File Open Dialog for the PocketPC 2002[^] Property sheet callbacks in the Pocket PC 2002[^] The first shows how to put ok and cancel buttons on the dialog's command bar, and the second shows how to put a command bar in a property sheet. Hope these help.
-
John Simmons / outlaw programmer wrote: Okay, Cancel, and Apply As far as I know the Pocket PC 2002, you only get the top left-hand-corner ok button. I'm not sure about the Pocket PC 2000, but I've seen dialogs with both the ok and the close (X) box. By using this button you would effectively cancel the dialog. I've recently came up with a solution, although it is not a standard one: insert a command bar in the dialog / property sheet and place the ok and cancel buttons there (graphic buttons). To do this, have a look at these articles: A File Open Dialog for the PocketPC 2002[^] Property sheet callbacks in the Pocket PC 2002[^] The first shows how to put ok and cancel buttons on the dialog's command bar, and the second shows how to put a command bar in a property sheet. Hope these help.
-
John Simmons / outlaw programmer wrote: Okay, Cancel, and Apply As far as I know the Pocket PC 2002, you only get the top left-hand-corner ok button. I'm not sure about the Pocket PC 2000, but I've seen dialogs with both the ok and the close (X) box. By using this button you would effectively cancel the dialog. I've recently came up with a solution, although it is not a standard one: insert a command bar in the dialog / property sheet and place the ok and cancel buttons there (graphic buttons). To do this, have a look at these articles: A File Open Dialog for the PocketPC 2002[^] Property sheet callbacks in the Pocket PC 2002[^] The first shows how to put ok and cancel buttons on the dialog's command bar, and the second shows how to put a command bar in a property sheet. Hope these help.
The callback article is cool, and I used the concept in our code. In fact, I think the commandbar thing is a better solution than putting the "OK" and "Cancel" buttons in the titlebar at the top of the screen. However, I'd like to remove the "OK" button from the titlebar if it's possible. Got any ideas? ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends
-
The callback article is cool, and I used the concept in our code. In fact, I think the commandbar thing is a better solution than putting the "OK" and "Cancel" buttons in the titlebar at the top of the screen. However, I'd like to remove the "OK" button from the titlebar if it's possible. Got any ideas? ------- signature starts "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 Please review the Legal Disclaimer in my bio. ------- signature ends
Use this:
//
// Hide the OK button
//
ModifyStyle(0, WS_NONAVDONEBUTTON, SWP_NOSIZE);
SHDoneButton(m_hWnd, SHDB_HIDE);This can go in the
OnInitDialog
of yourCPropertySheet
. -
Use this:
//
// Hide the OK button
//
ModifyStyle(0, WS_NONAVDONEBUTTON, SWP_NOSIZE);
SHDoneButton(m_hWnd, SHDB_HIDE);This can go in the
OnInitDialog
of yourCPropertySheet
.