MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / DisplayPropSheet

Function DisplayPropSheet

src/iscguard/iscguard.cpp:807–854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

805
806
807HWND DisplayPropSheet(HWND hParentWnd, HINSTANCE hInst)
808{
809/******************************************************************************
810 *
811 * D i s p l a y P r o p S h e e t
812 *
813 ******************************************************************************
814 *
815 * Input: hParentWnd - Handle to the main window of this application
816 *
817 * Return: Handle to the Property sheet dialog if successful
818 * NULL if error in displaying property sheet
819 *
820 * Description: This function initializes the page(s) of the property sheet,
821 * and then calls the PropertySheet() function to display it.
822 *****************************************************************************/
823 PROPSHEETPAGE PSPages[1];
824 HINSTANCE hInstance = hInst;
825
826 PSPages[0].dwSize = sizeof(PROPSHEETPAGE);
827 PSPages[0].dwFlags = PSP_USETITLE;
828 PSPages[0].hInstance = hInstance;
829 PSPages[0].pszTemplate = MAKEINTRESOURCE(IDD_PROPSHEET);
830 PSPages[0].pszTitle = MAKEINTRESOURCE(IDS_PROP_TITLE);
831 PSPages[0].pfnDlgProc = (DLGPROC) GeneralPage;
832 PSPages[0].pfnCallback = NULL;
833
834 PROPSHEETHEADER PSHdr;
835 PSHdr.dwSize = sizeof(PROPSHEETHEADER);
836 PSHdr.dwFlags = PSH_PROPTITLE | PSH_PROPSHEETPAGE | PSH_USEICONID | PSH_MODELESS | PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP;
837 PSHdr.hwndParent = hParentWnd;
838 PSHdr.hInstance = hInstance;
839 PSHdr.pszIcon = MAKEINTRESOURCE(IDI_IBGUARD);
840 PSHdr.pszCaption = (LPSTR) GUARDIAN_APP_LABEL;
841 PSHdr.nPages = FB_NELEM(PSPages);
842 PSHdr.nStartPage = 0;
843 PSHdr.ppsp = (LPCPROPSHEETPAGE) & PSPages;
844 PSHdr.pfnCallback = NULL;
845
846 hPSDlg = (HWND) PropertySheet(&PSHdr);
847
848 if (hPSDlg == 0 || hPSDlg == (HWND) -1)
849 {
850 gds__log("Create property sheet window failed. Error code %d", GetLastError());
851 hPSDlg = NULL;
852 }
853 return hPSDlg;
854}
855
856
857LRESULT CALLBACK GeneralPage(HWND hDlg, UINT unMsg, WPARAM /*wParam*/, LPARAM lParam)

Callers 1

WindowFuncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected