显示多个Property Sheet的演示
来自MSDN
uses Commctrl, lyhTools;
procedure TForm1.Button1Click(Sender: TObject);
var
psp: array [0..1] of PROPSHEETPAGE;
psh: _PROPSHEETHEADER;
begin
psp[0].dwSize := sizeof(PROPSHEETPAGE);
psp[0].dwFlags := PSP_USEICONID or PSP_USETITLE;
psp[0].hInstance := HInstance;
psp[0].pszTemplate := MAKEINTRESOURCE('DLG_1');
psp[0].pszIcon := MAKEINTRESOURCE('ICO_1');
psp[0].pfnDlgProc := @DefDialogProc;
psp[0].pszTitle := MAKEINTRESOURCE('0');
psp[0].lParam := 0;
psp[0].pfnCallback := nil;
psp[1].dwSize := sizeof(PROPSHEETPAGE);
psp[1].dwFlags := PSP_USEICONID or PSP_USETITLE;
psp[1].hInstance := HInstance;
psp[1].pszTemplate := MAKEINTRESOURCE('DLG_2');
psp[1].pszIcon := MAKEINTRESOURCE('ICO_2');
psp[1].pfnDlgProc := @DefDialogProc;
psp[1].pszTitle := MAKEINTRESOURCE('1');
psp[1].lParam := 0;
psp[1].pfnCallback := nil;
psh.dwSize := sizeof(_PROPSHEETHEADER);
psh.dwFlags := PSH_USEICONID or PSH_PROPSHEETPAGE or PSH_MODELESS or PSH_DEFAULT ;
psh.hwndParent := Handle;
psh.hInstance := HInstance;
psh.pszIcon := MAKEINTRESOURCE('ICO_3');
psh.pszCaption := PChar('Cell Properties');
psh.nPages := sizeof(psp) div sizeof(PROPSHEETPAGE);
psh.nStartPage := 0;
psh.ppsp := @psp;
psh.pfnCallback := @DefDialogProc;
PropertySheet(psh);
end;