![]() |
|
QA: How to use property sheets in full screen mode?
By Lee Vanderlaan, October 18, 2001.
QuestionHow can I make full-screened property sheets in an application for the Pocket PC by using MFC? AnswerFor applications that use windows and dialog boxes, full screen mode is pretty much straight forward. In article Q266244 of the Microsoft Development Network Library full screen mode can be obtained following the methods described. However, the article does not cover property sheets, which is another form of an MFC dialog with tabbed pages. If a property sheet is to be displayed to cover the entire screen, similar code to the dialog box is placed in the OnInitDialog handler of the property sheet. Since CPropertySheet does not inherit from CDialog the MFC framework for Pocket PC does not create an empty command bar that needs to be hidden. This also means the m_bFullScreen and m_pWndEmptyCB member variables do not apply. This is different from the sample code shown in the MSDN article. Although a command bar can be created by doing the following: Where the m_pWndEmptyCB is a member variable of the property sheet derived class. This code should precede the call to the base class in the OnInitDialog handler. The sample code in the MSDN article can then be inserted as indicated in the OnInitDialog handler of the CMfctest2Dlg class. NOTE: The call to SetIcon is not necessary. Once the command bar is no longer used it must be cleaned up by first destroying the command bar window and then deleting the command bar instance. The area of code that is different than the MSDN sample is in regards to the resizing of the window. The sample indicates the following: To resize the property sheet the tab control created by the MFC framework for property sheets must be resized instead. The sample code can then be replaced by the following: SampleYou can download a sample project (21 Kb). References
See the following MSDN article regarding the sample code indicated in the previous section:
You can also read more about different aspects of full screen programming like activization, SIP, etc at: DiscussDiscuss this article. Here you can write your comments and read comments of other developers. |
|||||||||||||||||||||