예제 #1
0
파일: scrnsave.c 프로젝트: RPG-7/reactos
static void LaunchConfig(void)
{
    // Only show the dialog if the RegisterDialogClasses function succeeded.
    // This is the same behaviour as MS' scrnsave.lib.
    if( RegisterDialogClasses(hMainInstance) )
        DialogBox(hMainInstance, MAKEINTRESOURCE(DLG_SCRNSAVECONFIGURE), GetForegroundWindow(), (DLGPROC) ScreenSaverConfigureDialog);
}
예제 #2
0
static void LaunchConfig(void)
{
  /* FIXME: should this be called */
  RegisterDialogClasses(hMainInstance);
  /* display configure dialog */
  DialogBox(hMainInstance, MAKEINTRESOURCE(DLG_SCRNSAVECONFIGURE),
            GetForegroundWindow(), (DLGPROC) ScreenSaverConfigureDialog);
}
예제 #3
0
static void doConfig (HWND hwnd)
{
  // RegisterDialogClasses() lets the screensaver register any child control
  // windows needed by the configuration dialog box. If successful, that
  // function returns TRUE.

  if (RegisterDialogClasses (g_hinstance))
  {
    // Display the configuration dialog box, allowing the user to configure
    // the screensaver.

    DialogBoxParam (g_hinstance, MAKEINTRESOURCE(DLG_SCRNSAVECONFIGURE),
            hwnd, (DLGPROC) ScreenSaverConfigureDialog, 0);
  }
}
예제 #4
0
/*
  Register screen saver window class and call user
  supplied hook.
 */
static BOOL RegisterClasses(void)
{
  WNDCLASS cls;

  cls.hCursor = NULL;
  cls.hIcon = LoadIcon(hMainInstance, MAKEINTATOM(ID_APP));
  cls.lpszMenuName = NULL;
  cls.lpszClassName = CLASS_SCRNSAVE;
  cls.hbrBackground = GetStockObject(BLACK_BRUSH);
  cls.hInstance = hMainInstance;
  cls.style = CS_VREDRAW | CS_HREDRAW | CS_SAVEBITS | CS_PARENTDC;
  cls.lpfnWndProc = (WNDPROC) SysScreenSaverProc;
  cls.cbWndExtra = 0;
  cls.cbClsExtra = 0;

  if (!RegisterClass(&cls))
    return FALSE;

  return RegisterDialogClasses(hMainInstance);
}