-
November 8th, 2009, 12:54 PM
#1
[RESOLVED] Property Sheets Modal
Hi guys,
Being new to the Win32 API scene, I've finally managed to create a tab control property sheet. My property sheet, however, is showing as modeless and not modal as I want it to. I've tried msdn and searching this website as well as google but to no avail. What should I do to make my Property Sheet modal?
If you need to see any code, please let me know.
Thanks.
-
November 9th, 2009, 10:31 AM
#2
Re: Property Sheets Modal
Posting code, just in case
memset(m_psp, 0, sizeof(m_psp));
memset(&m_PropSheet, 0, sizeof(m_PropSheet));
m_psp[0].dwSize = sizeof(PROPSHEETPAGE);
m_psp[0].dwFlags = PSP_DEFAULT | PSP_USETITLE;
m_psp[0].hInstance = zhInstance;
m_psp[0].pszTemplate = (LPCSTR)IDD_PROPPAGE1;
m_psp[0].pszTitle = "Properties 1";
m_psp[0].pfnDlgProc = (DLGPROC)PortP1DlgProc;
m_psp[0].pfnCallback = (LPFNPSPCALLBACK)PortP1DlgProc;
CreatePropertySheetPage(&m_psp[0]);
m_psp[1].dwSize = sizeof(PROPSHEETPAGE);
m_psp[1].dwFlags = PSP_USETITLE;
m_psp[1].hInstance = zhInstance;
m_psp[1].pszTemplate = (LPCSTR)IDD_PROPPAGE2;
m_psp[1].pszTitle = "Properties 2";
m_psp[1].pfnDlgProc = (DLGPROC)PortP2DlgProc;
m_psp[1].pfnCallback = (LPFNPSPCALLBACK)PortP2DlgProc;
CreatePropertySheetPage(&m_psp[1]);
m_PropSheet.dwSize = sizeof(PROPSHEETHEADER);
m_PropSheet.dwFlags = PSH_PROPSHEETPAGE | PSH_NOCONTEXTHELP;
m_PropSheet.hInstance = zhInstance;
m_PropSheet.pszCaption = (LPSTR) "Properties";
m_PropSheet.nPages = 2;
m_PropSheet.nStartPage = 0;
m_PropSheet.ppsp = (LPCPROPSHEETPAGE)m_psp;
m_PropSheet.pfnCallback = (PFNPROPSHEETCALLBACK)sheetProp;
calling it with
PropertySheet(&m_PropSheet);
-
November 9th, 2009, 10:42 AM
#3
Re: Property Sheets Modal
Oh, just found out. Of course having to specify the property sheets parent is required for it to be modal.
m_PropSheet.hwndParent = hWndMain;
Solved
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|