Add resource for two-soft-key commandbar and put it up. The single item is "Done" for now.

This commit is contained in:
ehouse 2008-02-05 04:57:58 +00:00
parent a05138790c
commit 0913936486
3 changed files with 31 additions and 12 deletions

View file

@ -1692,9 +1692,10 @@ makeCommandBar( HWND hwnd, HINSTANCE hInst )
XP_MEMSET( &mbi, 0, sizeof(mbi) );
mbi.cbSize = sizeof(mbi);
mbi.hwndParent = hwnd;
mbi.nToolBarId = IDM_MENU;
mbi.nToolBarId = IDM_MAIN_MENUBAR;
mbi.hInstRes = hInst;
mbi.dwFlags = SHCMBF_HMENU;
/* Don't set dwFlags if you want the Wince5 two-button softkey menu. */
/* mbi.dwFlags = SHCMBF_HMENU; */
//mbi.dwFlags = SHCMBF_HIDESIPBUTTON; /* eeh added. Why??? */
@ -2066,7 +2067,7 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
draw = ceHandleHintRequest( globals );
break;
case IDM_FILE_EXIT:
case ID_FILE_EXIT:
if ( ceConfirmAndSave( globals ) ) { /* user may cancel... */
DestroyWindow(hWnd);
}

View file

@ -17,6 +17,7 @@
#define IDD_OPTIONSDLG 117
#define IDD_COLORSDLG 118
#define IDD_COLOREDITDLG 119
#define IDM_MAIN_MENUBAR 120
#define IDB_ORIGIN 124
#ifdef XWFEATURE_SEARCHLIMIT
# define IDD_ASKHINTLIMTS 125
@ -150,7 +151,7 @@
#define IDM_FILE_EXIT 40002
#define ID_FILE_EXIT 40002
#define IDM_HELP_ABOUT 40003
#define ID_FILE_ABOUT 40004
#define ID_GAME_GAMEINFO 40005
@ -185,10 +186,11 @@
#define IDS_FILE 40002
#define IDS_GAME 40003
#define IDS_MOVE 40004
#define IDS_MENU 40006
#define IDS_MENU 40005
#define IDS_DONE 40006
// Don't use the numbers after 4005: one string needs not to be there
// to stop the progression in cedict.c
#define IDS_DICTDIRS 40005
#define IDS_DICTDIRS 40007
// Next default values for new objects
//

View file

@ -70,7 +70,9 @@ IDM_MENU MENU DISCARDABLE
BEGIN
POPUP "Menu"
BEGIN
#ifndef _WIN32_WCE
MENUITEM "Turn &done", ID_MOVE_TURNDONE
#endif
MENUITEM "&Juggle", ID_MOVE_JUGGLE
MENUITEM "Fli&p", ID_MOVE_FLIP
MENUITEM "&Trade", ID_MOVE_TRADE
@ -102,7 +104,7 @@ BEGIN
MENUITEM SEPARATOR
MENUITEM "&About", ID_FILE_ABOUT
MENUITEM SEPARATOR
MENUITEM "E&xit", IDM_FILE_EXIT
MENUITEM "E&xit", ID_FILE_EXIT
END
POPUP "&Game"
@ -120,6 +122,18 @@ BEGIN
END
END
// soft key bar described at
// http://msdn2.microsoft.com/en-us/library/aa457781.aspx
IDM_MAIN_MENUBAR RCDATA
BEGIN
IDM_MENU, 2,
I_IMAGENONE, ID_MOVE_TURNDONE, TBSTATE_ENABLED,
TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, IDS_DONE, 0,
NOMENU,
I_IMAGENONE, IDM_MENU, TBSTATE_ENABLED,
TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_MENU, 0,
0 // Use the 0th popup above -- the only one
END
/////////////////////////////////////////////////////////////////////////////
//
@ -651,11 +665,11 @@ END
// Accelerator
//
IDC_XWORDS4 ACCELERATORS DISCARDABLE
BEGIN
"/", IDM_HELP_ABOUT, ASCII, ALT, NOINVERT
VK_F4, IDM_FILE_EXIT, VIRTKEY, ALT, NOINVERT
END
/* IDC_XWORDS4 ACCELERATORS DISCARDABLE */
/* BEGIN */
/* "/", IDM_HELP_ABOUT, ASCII, ALT, NOINVERT */
/* VK_F4, ID_FILE_EXIT, VIRTKEY, ALT, NOINVERT */
/* END */
/////////////////////////////////////////////////////////////////////////////
@ -724,6 +738,8 @@ BEGIN
IDS_FILE "File"
IDS_GAME "Game"
IDS_MOVE "Move"
IDS_MENU "Menu"
IDS_DONE "Done"
#ifdef _WIN32_WCE
IDS_DICTDIRS "\\Program Files\\Crosswords"
IDS_DICTDIRS+1 "\\SD Card\\Crosswords"