ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

propsheet.c
Go to the documentation of this file.
00001 /*
00002  * PROJECT:     ReactOS Services
00003  * LICENSE:     GPL - See COPYING in the top level directory
00004  * FILE:        base/applications/mscutils/servman/propsheet.c
00005  * PURPOSE:     Property dialog box message handler
00006  * COPYRIGHT:   Copyright 2006-2007 Ged Murphy <gedmurphy@reactos.org>
00007  *
00008  */
00009 
00010 #include "precomp.h"
00011 
00012 
00013 static VOID
00014 InitPropSheetPage(PROPSHEETPAGE *psp,
00015                   PSERVICEPROPSHEET dlgInfo,
00016                   WORD idDlg,
00017                   DLGPROC DlgProc)
00018 {
00019   ZeroMemory(psp, sizeof(PROPSHEETPAGE));
00020   psp->dwSize = sizeof(PROPSHEETPAGE);
00021   psp->dwFlags = PSP_DEFAULT;
00022   psp->hInstance = hInstance;
00023   psp->pszTemplate = MAKEINTRESOURCE(idDlg);
00024   psp->pfnDlgProc = DlgProc;
00025   psp->lParam = (LPARAM)dlgInfo;
00026 }
00027 
00028 
00029 LONG APIENTRY
00030 OpenPropSheet(PMAIN_WND_INFO Info)
00031 {
00032     PROPSHEETHEADER psh;
00033     PROPSHEETPAGE psp[2];
00034     PSERVICEPROPSHEET pServicePropSheet;
00035     LONG Ret = 0;
00036 
00037     ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
00038     psh.dwSize = sizeof(PROPSHEETHEADER);
00039     psh.dwFlags =  PSH_PROPSHEETPAGE | PSH_PROPTITLE | PSH_USECALLBACK;// | PSH_MODELESS;
00040     psh.hwndParent = Info->hMainWnd;
00041     psh.hInstance = hInstance;
00042     psh.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SM_ICON));
00043     psh.pszCaption = Info->pCurrentService->lpDisplayName;
00044     psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
00045     psh.nStartPage = 0;
00046     psh.ppsp = psp;
00047 
00048 
00049     pServicePropSheet = HeapAlloc(ProcessHeap,
00050                                   0,
00051                                   sizeof(*pServicePropSheet));
00052     if (pServicePropSheet)
00053     {
00054         /* save current service, as it could change while the dialog is open */
00055         pServicePropSheet->pService = Info->pCurrentService;
00056         pServicePropSheet->Info = Info;
00057 
00058         InitPropSheetPage(&psp[0], pServicePropSheet, IDD_DLG_GENERAL, GeneralPageProc);
00059         //InitPropSheetPage(&psp[1], Info, IDD_DLG_GENERAL, LogonPageProc);
00060         //InitPropSheetPage(&psp[2], Info, IDD_DLG_GENERAL, RecoveryPageProc);
00061         InitPropSheetPage(&psp[1], pServicePropSheet, IDD_DLG_DEPEND, DependenciesPageProc);
00062 
00063         Ret = (LONG)(PropertySheet(&psh) != -1);
00064 
00065         HeapFree(ProcessHeap,
00066                  0,
00067                  pServicePropSheet);
00068     }
00069 
00070     return Ret;
00071 }
00072 

Generated on Fri May 25 2012 04:15:19 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.