Dialog Box style key function. You can push space key to boot.
This commit is contained in:
parent
9281a845a8
commit
a3c99d2662
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: main.c,v 1.36 2000/04/01 02:37:23 takemura Exp $ */
|
||||
/* $NetBSD: main.c,v 1.37 2000/04/12 15:07:34 takemura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 Shin Takemura.
|
||||
|
@ -59,7 +59,7 @@
|
|||
*/
|
||||
TCHAR *version_string =
|
||||
TEXT("PocketBSD boot loader\r\n")
|
||||
TEXT("Version 1.12.1 2000.04.01\r\n")
|
||||
TEXT("Version 1.13.0 2000.04.12\r\n")
|
||||
#if ( _WIN32_WCE < 200 )
|
||||
TEXT("Compiled for WinCE 1.01\r\n")
|
||||
#else
|
||||
|
@ -392,17 +392,19 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
|||
/*
|
||||
* Main Window
|
||||
*/
|
||||
hWndMain = CreateWindow(szAppName, // Class
|
||||
szTitle, // Title
|
||||
WS_VISIBLE, // Style
|
||||
CW_USEDEFAULT, // x-position
|
||||
CW_USEDEFAULT, // y-position
|
||||
CW_USEDEFAULT, // x-size
|
||||
CW_USEDEFAULT, // y-size
|
||||
NULL, // Parent handle
|
||||
NULL, // Menu handle
|
||||
hInstance, // Instance handle
|
||||
NULL); // Creation
|
||||
#define WS_EX_CONTROLPARENT 0x00010000L
|
||||
hWndMain = CreateWindowEx(WS_EX_CONTROLPARENT,
|
||||
szAppName,
|
||||
szTitle,
|
||||
WS_VISIBLE,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
NULL,
|
||||
NULL,
|
||||
hInstance,
|
||||
NULL);
|
||||
|
||||
GetClientRect(hWndMain, &rect);
|
||||
if (rect.right < rect.bottom) {
|
||||
|
@ -420,6 +422,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
|||
MAKEINTRESOURCE(IDD_MAIN_640X240),
|
||||
CommandBar_Height(hWndCB));
|
||||
}
|
||||
SetFocus(GetDlgItem(hWndMain, IDC_BOOT));
|
||||
|
||||
/*
|
||||
* load preferences
|
||||
|
@ -501,7 +504,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
|||
}
|
||||
SendDlgItemMessage(hWndMain, IDC_FBSELECT, CB_SETCURSEL,
|
||||
pref.setting_idx, (LPARAM)NULL);
|
||||
|
||||
/*
|
||||
* Check box, 'Pause before boot'
|
||||
*/
|
||||
|
@ -519,10 +521,15 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
|||
*/
|
||||
ShowWindow(hWndMain, SW_SHOW);
|
||||
UpdateWindow(hWndMain);
|
||||
while ( GetMessage(&msg, NULL, 0, 0) != FALSE ) {
|
||||
while (GetMessage(&msg, NULL, 0, 0)) {
|
||||
#if ( 200 <= _WIN32_WCE )
|
||||
if (hWndMain == 0 || !IsDialogMessage(hWndMain, &msg))
|
||||
#endif
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
return(msg.wParam);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -78,22 +78,23 @@ BEGIN
|
|||
COMBOBOX IDC_FBSELECT,55,36,75,109,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "...",IDC_FBSETTING,130,40,10,8
|
||||
PUSHBUTTON "Boot",IDC_BOOT,51,114,45,12
|
||||
EDITTEXT IDC_OPTIONS,55,51,85,12,ES_AUTOHSCROLL | NOT WS_BORDER,
|
||||
WS_EX_CLIENTEDGE
|
||||
RTEXT "Kernel name:",IDC_STATIC,0,25,52,8
|
||||
RTEXT "Frame Buffer:",IDC_STATIC,0,40,52,8
|
||||
RTEXT "Options:",IDC_STATIC,0,55,52,8
|
||||
LTEXT "Welcome to PocketBSD!",IDC_STATIC,5,5,120,10
|
||||
CONTROL "Pause before boot",IDC_PAUSE,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,30,70,95,10
|
||||
EDITTEXT IDC_STATUS,5,150,135,10,ES_AUTOHSCROLL | ES_READONLY
|
||||
CONTROL "Load debug info.",IDC_DEBUG,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,30,80,95,10
|
||||
CONTROL "Serial port on",IDC_COMM,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,30,90,95,10
|
||||
CONTROL "Reverse Video",IDC_REVERSEVIDEO,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,30,100,96,9
|
||||
PUSHBUTTON "&Boot",IDC_BOOT,51,114,45,12
|
||||
EDITTEXT IDC_STATUS,5,150,135,10,ES_AUTOHSCROLL | ES_READONLY |
|
||||
NOT WS_TABSTOP
|
||||
LTEXT "Welcome to PocketBSD!",IDC_STATIC,5,5,120,10
|
||||
RTEXT "Kernel name:",IDC_STATIC,0,25,52,8
|
||||
RTEXT "Frame Buffer:",IDC_STATIC,0,40,52,8
|
||||
RTEXT "Options:",IDC_STATIC,0,55,52,8
|
||||
END
|
||||
|
||||
IDD_MAIN_640X240 DIALOGEX 0, 0, 240, 120
|
||||
|
@ -105,22 +106,23 @@ BEGIN
|
|||
COMBOBOX IDC_FBSELECT,105,36,75,70,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "...",IDC_FBSETTING,180,40,10,8
|
||||
PUSHBUTTON "Boot",IDC_BOOT,100,90,45,12
|
||||
EDITTEXT IDC_OPTIONS,105,51,85,12,ES_AUTOHSCROLL | NOT WS_BORDER,
|
||||
WS_EX_CLIENTEDGE
|
||||
RTEXT "Kernel name:",IDC_STATIC,50,25,52,8
|
||||
RTEXT "Frame Buffer:",IDC_STATIC,50,40,52,8
|
||||
RTEXT "Options:",IDC_STATIC,50,55,52,8
|
||||
LTEXT "Welcome to PocketBSD!",IDC_STATIC,20,6,120,10
|
||||
CONTROL "Pause before boot",IDC_PAUSE,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,50,66,80,10
|
||||
EDITTEXT IDC_STATUS,5,105,230,10,ES_AUTOHSCROLL | ES_READONLY
|
||||
CONTROL "Load debug info.",IDC_DEBUG,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,135,66,80,10
|
||||
CONTROL "Serial port on",IDC_COMM,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,50,78,64,10
|
||||
CONTROL "Reverse Video",IDC_REVERSEVIDEO,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,135,78,80,10
|
||||
PUSHBUTTON "&Boot",IDC_BOOT,100,90,45,12
|
||||
RTEXT "Kernel name:",IDC_STATIC,50,25,52,8
|
||||
RTEXT "Frame Buffer:",IDC_STATIC,50,40,52,8
|
||||
RTEXT "Options:",IDC_STATIC,50,55,52,8
|
||||
LTEXT "Welcome to PocketBSD!",IDC_STATIC,20,6,120,10
|
||||
EDITTEXT IDC_STATUS,5,105,230,10,ES_AUTOHSCROLL | ES_READONLY |
|
||||
NOT WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 137, 119
|
||||
|
|
Loading…
Reference in New Issue