mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
Almost completed dialog layouts contributed by Ian McLean.
svn path=/trunk/; revision=3282
This commit is contained in:
parent
45d7740d94
commit
48266252bf
5 changed files with 325 additions and 101 deletions
|
@ -24,6 +24,7 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
|
|
||||||
|
#include "resource.h"
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -199,12 +200,20 @@ void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
|
||||||
DrawButtonText(hdc, &offset_button_rect, buffer, CLR_BTN_WHITE);
|
DrawButtonText(hdc, &offset_button_rect, buffer, CLR_BTN_WHITE);
|
||||||
DrawButtonText(hdc, &button_rect, buffer, CLR_BTN_DGREY);
|
DrawButtonText(hdc, &button_rect, buffer, CLR_BTN_DGREY);
|
||||||
} else {
|
} else {
|
||||||
DrawButtonText(hdc, &button_rect, buffer, text_colour);
|
if (lpDrawItemStruct->CtlID >= ID_RED_START && lpDrawItemStruct->CtlID <= ID_RED_FINISH) {
|
||||||
|
DrawButtonText(hdc, &button_rect, buffer, RGB(255,0,0));
|
||||||
|
} else
|
||||||
|
if (lpDrawItemStruct->CtlID >= ID_PURPLE_START && lpDrawItemStruct->CtlID <= ID_PURPLE_FINISH) {
|
||||||
|
DrawButtonText(hdc, &button_rect, buffer, RGB(0,128,128));
|
||||||
|
} else
|
||||||
|
if (lpDrawItemStruct->CtlID >= ID_BLUE_START && lpDrawItemStruct->CtlID <= ID_BLUE_FINISH) {
|
||||||
|
DrawButtonText(hdc, &button_rect, buffer, RGB(0,0,255));
|
||||||
|
} else {
|
||||||
|
DrawButtonText(hdc, &button_rect, buffer, text_colour);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state & ODS_FOCUS) {
|
if (state & ODS_FOCUS) {
|
||||||
DrawFocusRect(lpDrawItemStruct->hDC, (LPRECT)&focus_rect);
|
DrawFocusRect(lpDrawItemStruct->hDC, (LPRECT)&focus_rect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -117,81 +117,211 @@ END
|
||||||
// Dialog
|
// Dialog
|
||||||
//
|
//
|
||||||
|
|
||||||
IDD_STANDARD DIALOG DISCARDABLE 0, 0, 207, 160
|
IDD_STANDARD DIALOG DISCARDABLE 0, 0, 170, 126
|
||||||
STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
|
||||||
|
WS_SYSMENU
|
||||||
CAPTION "ReactOS Calculator"
|
CAPTION "ReactOS Calculator"
|
||||||
MENU IDR_CALC_STANDARD
|
MENU IDR_CALC_STANDARD
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL "1",IDC_BUTTON1,"Button",BS_OWNERDRAW | WS_TABSTOP,47,99,
|
CONTROL "M+",IDC_MPLUS,"Button",BS_OWNERDRAW,5,106,
|
||||||
19,17
|
23,16
|
||||||
CONTROL "2",IDC_BUTTON2,"Button",BS_OWNERDRAW | WS_TABSTOP,69,99,
|
CONTROL "MS",IDC_MS,"Button",BS_OWNERDRAW,5,85,23,
|
||||||
19,17
|
16
|
||||||
EDITTEXT IDC_EDIT1,7,7,193,15,ES_RIGHT | ES_AUTOHSCROLL |
|
CONTROL "MR",IDC_MR,"Button",BS_OWNERDRAW,5,65,23,
|
||||||
ES_WANTRETURN
|
16
|
||||||
|
CONTROL "MC",IDC_MC,"Button",BS_OWNERDRAW,5,45,23,
|
||||||
|
16
|
||||||
|
CONTROL "0",IDC_0,"Button",BS_OWNERDRAW,37,106,23,
|
||||||
|
16
|
||||||
|
CONTROL "1",IDC_1,"Button",BS_OWNERDRAW,37,85,23,16
|
||||||
|
CONTROL "4",IDC_4,"Button",BS_OWNERDRAW,37,65,23,16
|
||||||
|
CONTROL "7",IDC_7,"Button",BS_OWNERDRAW,37,45,23,16
|
||||||
|
CONTROL "+/-",IDC_PLUSMINUS,"Button",BS_OWNERDRAW,
|
||||||
|
63,106,23,16
|
||||||
|
CONTROL "2",IDC_2,"Button",BS_OWNERDRAW,63,85,23,16
|
||||||
|
CONTROL "5",IDC_5,"Button",BS_OWNERDRAW,63,65,23,16
|
||||||
|
CONTROL "8",IDC_8,"Button",BS_OWNERDRAW,63,45,23,16
|
||||||
|
CONTROL ".",IDC_DECPOINT,"Button",BS_OWNERDRAW,89,
|
||||||
|
106,23,16
|
||||||
|
CONTROL "3",IDC_3,"Button",BS_OWNERDRAW,89,85,23,16
|
||||||
|
CONTROL "6",IDC_6,"Button",BS_OWNERDRAW,89,65,23,16
|
||||||
|
CONTROL "9",IDC_9,"Button",BS_OWNERDRAW,89,45,23,16
|
||||||
|
CONTROL "+",IDC_PLUS,"Button",BS_OWNERDRAW,115,106,
|
||||||
|
23,16
|
||||||
|
CONTROL "-",IDC_MINUS,"Button",BS_OWNERDRAW,115,85,
|
||||||
|
23,16
|
||||||
|
CONTROL "*",IDC_MULTIPLY,"Button",BS_OWNERDRAW,115,
|
||||||
|
65,23,16
|
||||||
|
CONTROL "/",IDC_DIVIDE,"Button",BS_OWNERDRAW,115,45,
|
||||||
|
23,16
|
||||||
|
CONTROL "=",IDC_EQUALS,"Button",BS_OWNERDRAW,142,
|
||||||
|
106,23,16
|
||||||
|
CONTROL "1/x",IDC_INVERT,"Button",BS_OWNERDRAW,142,
|
||||||
|
85,23,16
|
||||||
|
CONTROL "%",IDC_PERCENT,"Button",BS_OWNERDRAW,142,
|
||||||
|
65,23,16
|
||||||
|
CONTROL "sqrt",IDC_SQRT,"Button",BS_OWNERDRAW,142,
|
||||||
|
45,23,16
|
||||||
|
CONTROL "C",IDC_CLEAR,"Button",BS_OWNERDRAW,126,23,
|
||||||
|
39,16
|
||||||
|
CONTROL "CE",IDC_CE,"Button",BS_OWNERDRAW,83,23,39,
|
||||||
|
16
|
||||||
|
CONTROL "Backspace",IDC_BSPACE,"Button",BS_OWNERDRAW,38,23,41,16
|
||||||
|
CTEXT "M",IDC_MEMTEXT,7,23,19,16,SS_CENTERIMAGE | SS_SUNKEN
|
||||||
|
EDITTEXT IDC_RESULT,7,0,157,15,ES_RIGHT | ES_AUTOHSCROLL
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_SCIENTIFIC DIALOG DISCARDABLE 0, 0, 325, 156
|
IDD_SCIENTIFIC DIALOG DISCARDABLE 0, 0, 313, 161
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "ReactOS Scientific Calculator"
|
CAPTION "ReactOS Scientific Calculator"
|
||||||
MENU IDR_CALC_SCIENTIFIC
|
MENU IDR_CALC_SCIENTIFIC
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL "1",IDC_BUTTON1,"Button",BS_OWNERDRAW | WS_TABSTOP,47,99,
|
CONTROL "M+",IDC_MPLUS,"Button",BS_OWNERDRAW,122,
|
||||||
19,17
|
121,23,16
|
||||||
CONTROL "2",IDC_BUTTON2,"Button",BS_OWNERDRAW | WS_TABSTOP,69,99,
|
CONTROL "MS",IDC_MS,"Button",BS_OWNERDRAW,122,101,
|
||||||
19,17
|
23,16
|
||||||
EDITTEXT IDC_EDIT1,7,7,310,15,ES_RIGHT | ES_AUTOHSCROLL |
|
CONTROL "MR",IDC_MR,"Button",BS_OWNERDRAW,122,81,23,
|
||||||
ES_WANTRETURN
|
16
|
||||||
|
CONTROL "MC",IDC_MC,"Button",BS_OWNERDRAW,122,61,23,
|
||||||
|
16
|
||||||
|
CONTROL "0",IDC_0,"Button",BS_OWNERDRAW,156,121,23,
|
||||||
|
16
|
||||||
|
CONTROL "1",IDC_1,"Button",BS_OWNERDRAW,156,101,23,
|
||||||
|
16
|
||||||
|
CONTROL "4",IDC_4,"Button",BS_OWNERDRAW,156,81,23,
|
||||||
|
16
|
||||||
|
CONTROL "7",IDC_7,"Button",BS_OWNERDRAW,156,61,23,
|
||||||
|
16
|
||||||
|
CONTROL "+/-",IDC_PLUSMINUS,"Button",BS_OWNERDRAW,
|
||||||
|
182,121,23,16
|
||||||
|
CONTROL "2",IDC_2,"Button",BS_OWNERDRAW,182,101,23,
|
||||||
|
16
|
||||||
|
CONTROL "5",IDC_5,"Button",BS_OWNERDRAW,182,81,23,
|
||||||
|
16
|
||||||
|
CONTROL "8",IDC_8,"Button",BS_OWNERDRAW,182,61,23,
|
||||||
|
16
|
||||||
|
CONTROL ".",IDC_DECPOINT,"Button",BS_OWNERDRAW,208,
|
||||||
|
121,23,16
|
||||||
|
CONTROL "3",IDC_3,"Button",BS_OWNERDRAW,208,101,23,
|
||||||
|
16
|
||||||
|
CONTROL "6",IDC_6,"Button",BS_OWNERDRAW,208,81,23,
|
||||||
|
16
|
||||||
|
CONTROL "9",IDC_9,"Button",BS_OWNERDRAW,208,61,23,
|
||||||
|
16
|
||||||
|
CONTROL "+",IDC_PLUS,"Button",BS_OWNERDRAW,234,121,
|
||||||
|
23,16
|
||||||
|
CONTROL "-",IDC_MINUS,"Button",BS_OWNERDRAW,234,101,
|
||||||
|
23,16
|
||||||
|
CONTROL "*",IDC_MULTIPLY,"Button",BS_OWNERDRAW,234,
|
||||||
|
81,23,16
|
||||||
|
CONTROL "/",IDC_DIVIDE,"Button",BS_OWNERDRAW,234,61,
|
||||||
|
23,16
|
||||||
|
CONTROL "=",IDC_EQUALS,"Button",BS_OWNERDRAW,260,
|
||||||
|
121,23,16
|
||||||
|
CONTROL "Lsh",IDC_LSH,"Button",BS_OWNERDRAW,260,101,
|
||||||
|
23,16
|
||||||
|
CONTROL "Or",IDC_OR,"Button",BS_OWNERDRAW,260,81,23,
|
||||||
|
16
|
||||||
|
CONTROL "Mod",IDC_MOD,"Button",BS_OWNERDRAW,260,61,
|
||||||
|
23,16
|
||||||
|
CONTROL "C",IDC_CLEAR,"Button",BS_OWNERDRAW,268,38,
|
||||||
|
41,16
|
||||||
|
CONTROL "CE",IDC_CE,"Button",BS_OWNERDRAW,224,38,40,
|
||||||
|
16
|
||||||
|
CONTROL "Backspace",IDC_BSPACE,"Button",BS_OWNERDRAW,178,38,42,16
|
||||||
|
CTEXT "M",IDC_MEMTEXT,123,38,19,16,SS_CENTERIMAGE | SS_SUNKEN
|
||||||
|
CONTROL "Int",IDC_INT,"Button",BS_OWNERDRAW,286,121,
|
||||||
|
23,16
|
||||||
|
CONTROL "Not",IDC_NOT,"Button",BS_OWNERDRAW,286,101,
|
||||||
|
23,16
|
||||||
|
CONTROL "Xor",IDC_XOR,"Button",BS_OWNERDRAW,286,81,
|
||||||
|
23,16
|
||||||
|
CONTROL "And",IDC_AND,"Button",BS_OWNERDRAW,286,61,
|
||||||
|
23,16
|
||||||
|
CONTROL "pi",IDC_PI,"Button",BS_OWNERDRAW,122,142,
|
||||||
|
23,16
|
||||||
|
CONTROL "A",IDC_A,"Button",BS_OWNERDRAW,156,142,23,
|
||||||
|
16
|
||||||
|
CONTROL "B",IDC_B,"Button",BS_OWNERDRAW,182,142,23,
|
||||||
|
16
|
||||||
|
CONTROL "C",IDC_C,"Button",BS_OWNERDRAW,208,142,23,
|
||||||
|
16
|
||||||
|
CONTROL "D",IDC_D,"Button",BS_OWNERDRAW,234,142,23,
|
||||||
|
16
|
||||||
|
CONTROL "E",IDC_E,"Button",BS_OWNERDRAW,260,142,23,
|
||||||
|
16
|
||||||
|
CONTROL "F",IDC_F,"Button",BS_OWNERDRAW,286,142,23,
|
||||||
|
16
|
||||||
|
CONTROL "cos",IDC_COS,"Button",BS_OWNERDRAW,37,121,
|
||||||
|
23,16
|
||||||
|
CONTROL "sin",IDC_SIN,"Button",BS_OWNERDRAW,37,101,
|
||||||
|
23,16
|
||||||
|
CONTROL "dms",IDC_DMS,"Button",BS_OWNERDRAW,37,81,
|
||||||
|
23,16
|
||||||
|
CONTROL "F-E",IDC_FE,"Button",BS_OWNERDRAW,37,61,23,
|
||||||
|
16
|
||||||
|
CONTROL "x^3",IDC_CUBE,"Button",BS_OWNERDRAW,63,121,
|
||||||
|
23,16
|
||||||
|
CONTROL "x^y",IDC_POWER,"Button",BS_OWNERDRAW,63,
|
||||||
|
101,23,16
|
||||||
|
CONTROL "Exp",IDC_EXP,"Button",BS_OWNERDRAW,63,81,
|
||||||
|
23,16
|
||||||
|
CONTROL "(",IDC_OPENBKT,"Button",BS_OWNERDRAW,63,61,
|
||||||
|
23,16
|
||||||
|
CONTROL "n!",IDC_BANG,"Button",BS_OWNERDRAW,89,121,
|
||||||
|
23,16
|
||||||
|
CONTROL "log",IDC_LOG,"Button",BS_OWNERDRAW,89,101,
|
||||||
|
23,16
|
||||||
|
CONTROL "ln",IDC_LN,"Button",BS_OWNERDRAW,89,81,23,
|
||||||
|
16
|
||||||
|
CONTROL ")",IDC_CLOSEBK,"Button",BS_OWNERDRAW,89,61,
|
||||||
|
23,16
|
||||||
|
CONTROL "tan",IDC_TAN,"Button",BS_OWNERDRAW,37,142,
|
||||||
|
23,16
|
||||||
|
CONTROL "x^2",IDC_SQUARE,"Button",BS_OWNERDRAW,63,
|
||||||
|
142,23,16
|
||||||
|
CONTROL "1/x",IDC_INVERT,"Button",BS_OWNERDRAW,89,
|
||||||
|
142,23,16
|
||||||
|
CONTROL "s",IDC_S,"Button",BS_OWNERDRAW,4,121,23,16
|
||||||
|
CONTROL "Sum",IDC_SUM,"Button",BS_OWNERDRAW,4,101,
|
||||||
|
23,16
|
||||||
|
CONTROL "Ave",IDC_AVE,"Button",BS_OWNERDRAW,4,81,23,
|
||||||
|
16
|
||||||
|
CONTROL "Sta",IDC_STA,"Button",BS_OWNERDRAW,4,61,23,
|
||||||
|
16
|
||||||
|
CONTROL "Dat",IDC_DAT,"Button",BS_OWNERDRAW,4,142,
|
||||||
|
23,16
|
||||||
|
CTEXT "9",IDC_BKTTEXT,91,38,19,16,SS_CENTERIMAGE | SS_SUNKEN
|
||||||
|
GROUPBOX "",IDC_INVHYP,6,34,80,22,WS_GROUP
|
||||||
|
CONTROL "Inv",IDC_INV,"Button",BS_AUTOCHECKBOX,9,42,26,10
|
||||||
|
CONTROL "Hyp",IDC_HYP,"Button",BS_AUTOCHECKBOX,47,41,29,10
|
||||||
|
GROUPBOX "",IDC_BASE,6,13,141,22,WS_GROUP
|
||||||
|
CONTROL "Hex",IDC_HEX,"Button",BS_AUTORADIOBUTTON,8,21,29,10
|
||||||
|
CONTROL "Dec",IDC_DEC,"Button",BS_AUTORADIOBUTTON,42,21,29,10
|
||||||
|
CONTROL "Oct",IDC_OCT,"Button",BS_AUTORADIOBUTTON,76,21,27,10
|
||||||
|
CONTROL "Bin",IDC_BIN,"Button",BS_AUTORADIOBUTTON,109,21,26,10
|
||||||
|
GROUPBOX "",IDC_UNITS,150,13,160,22,WS_GROUP
|
||||||
|
CONTROL "Degrees",IDC_DEGREES,"Button",BS_AUTORADIOBUTTON,152,21,
|
||||||
|
43,10
|
||||||
|
CONTROL "Radians",IDC_RADIANS,"Button",BS_AUTORADIOBUTTON,204,21,
|
||||||
|
42,10
|
||||||
|
CONTROL "Grads",IDC_GRADS,"Button",BS_AUTORADIOBUTTON,255,21,35,
|
||||||
|
10
|
||||||
|
EDITTEXT IDC_RESULT,6,0,303,15,ES_RIGHT | ES_AUTOHSCROLL
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
#ifndef _MAC
|
||||||
//
|
|
||||||
// DESIGNINFO
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
GUIDELINES DESIGNINFO DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
IDD_STANDARD, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 200
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 153
|
|
||||||
END
|
|
||||||
END
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Accelerator
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
IDR_ACCELERATOR ACCELERATORS DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
VK_F2, ID_VIEW_DEGREES, VIRTKEY, NOINVERT
|
|
||||||
VK_F3, ID_VIEW_RADIANS, VIRTKEY, NOINVERT
|
|
||||||
VK_F4, ID_VIEW_GRADS, VIRTKEY, NOINVERT
|
|
||||||
VK_F5, ID_VIEW_HEX, VIRTKEY, NOINVERT
|
|
||||||
VK_F6, ID_VIEW_DECIMAL, VIRTKEY, NOINVERT
|
|
||||||
VK_F7, ID_VIEW_OCTAL, VIRTKEY, NOINVERT
|
|
||||||
VK_F8, ID_VIEW_BINARY, VIRTKEY, NOINVERT
|
|
||||||
END
|
|
||||||
#endif // _MSC_VER
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Version
|
// Version
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
(1) VERSIONINFO
|
||||||
FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
|
FILEVERSION 0,0,19,147
|
||||||
PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD
|
PRODUCTVERSION 0,0,19,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -207,7 +337,7 @@ BEGIN
|
||||||
BLOCK "040904b0"
|
BLOCK "040904b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Comments", "Absolutely no warranties whatsoever - Use at your own risk\0"
|
VALUE "Comments", "Absolutely no warranties whatsoever - Use at your own risk\0"
|
||||||
VALUE "CompanyName", RES_STR_COMPANY_NAME
|
VALUE "CompanyName", "ReactOS Development Team\0"
|
||||||
VALUE "FileDescription", "ReactOS Calculator by Robert Dickenson\0"
|
VALUE "FileDescription", "ReactOS Calculator by Robert Dickenson\0"
|
||||||
VALUE "FileVersion", "1, 0, 0, 1\0"
|
VALUE "FileVersion", "1, 0, 0, 1\0"
|
||||||
VALUE "InternalName", "calc\0"
|
VALUE "InternalName", "calc\0"
|
||||||
|
@ -215,8 +345,8 @@ BEGIN
|
||||||
VALUE "LegalTrademarks", "\0"
|
VALUE "LegalTrademarks", "\0"
|
||||||
VALUE "OriginalFilename", "calc.exe\0"
|
VALUE "OriginalFilename", "calc.exe\0"
|
||||||
VALUE "PrivateBuild", "\0"
|
VALUE "PrivateBuild", "\0"
|
||||||
VALUE "ProductName", RES_STR_PRODUCT_NAME
|
VALUE "ProductName", "ReactOS Operating System\0"
|
||||||
VALUE "ProductVersion", RES_STR_PRODUCT_VERSION
|
VALUE "ProductVersion", "0.0.19\0"
|
||||||
VALUE "SpecialBuild", "Non-versioned Development Beta Release\0"
|
VALUE "SpecialBuild", "Non-versioned Development Beta Release\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -226,6 +356,8 @@ BEGIN
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
#endif // !_MAC
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
@ -236,8 +368,7 @@ STRINGTABLE DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
IDS_APP_TITLE "ReactOS Calculator"
|
IDS_APP_TITLE "ReactOS Calculator"
|
||||||
IDS_APP_REG_KEY "\\Calculator"
|
IDS_APP_REG_KEY "\\Calculator"
|
||||||
IDS_APP_REG_PATH RES_STR_ROSAPP_REGISTRY_ROOT
|
IDS_APP_REG_PATH "Software\\ReactWare"
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // English (Australia) resources
|
#endif // English (Australia) resources
|
||||||
|
|
|
@ -65,12 +65,12 @@ BOOL OnCreate(HWND hWnd)
|
||||||
|
|
||||||
void OnEditCopy(void)
|
void OnEditCopy(void)
|
||||||
{
|
{
|
||||||
SendMessage(GetDlgItem(hDlgWnd, IDC_EDIT1), WM_COMMAND, MAKELONG(ID_EDIT_COPY, 0), 0);
|
SendMessage(GetDlgItem(hDlgWnd, IDC_RESULT), WM_COMMAND, MAKELONG(ID_EDIT_COPY, 0), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnEditPaste(void)
|
void OnEditPaste(void)
|
||||||
{
|
{
|
||||||
SendMessage(GetDlgItem(hDlgWnd, IDC_EDIT1), WM_COMMAND, MAKELONG(ID_EDIT_PASTE, 0), 0);
|
SendMessage(GetDlgItem(hDlgWnd, IDC_RESULT), WM_COMMAND, MAKELONG(ID_EDIT_PASTE, 0), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnViewStandard(void)
|
void OnViewStandard(void)
|
||||||
|
|
|
@ -2,44 +2,128 @@
|
||||||
// Microsoft Developer Studio generated include file.
|
// Microsoft Developer Studio generated include file.
|
||||||
// Used by calc.rc
|
// Used by calc.rc
|
||||||
//
|
//
|
||||||
#define ID_MENU_EDIT 0
|
#define ID_MENU_EDIT 0
|
||||||
#define ID_MENU_VIEW 1
|
#define ID_MENU_VIEW 1
|
||||||
#define ID_MENU_HELP 2
|
#define ID_MENU_HELP 2
|
||||||
#define IDD_STANDARD 101
|
#define IDD_STANDARD 101
|
||||||
#define IDD_SCIENTIFIC 102
|
#define IDD_SCIENTIFIC 102
|
||||||
#define IDR_CALC_STANDARD 103
|
#define IDR_CALC_STANDARD 103
|
||||||
#define IDR_CALC_SCIENTIFIC 104
|
#define IDR_CALC_SCIENTIFIC 104
|
||||||
#define IDS_APP_TITLE 105
|
#define IDS_APP_TITLE 105
|
||||||
#define IDR_ACCELERATOR 106
|
#define IDR_ACCELERATOR 106
|
||||||
#define IDS_APP_REG_KEY 107
|
#define IDS_APP_REG_KEY 107
|
||||||
#define IDS_APP_REG_PATH 108
|
#define IDS_APP_REG_PATH 108
|
||||||
|
|
||||||
|
#define ID_EDIT_COPY 0xE122
|
||||||
|
#define ID_EDIT_PASTE 0xE125
|
||||||
|
|
||||||
|
#define ID_BLUE_START 1000
|
||||||
|
#define IDC_0 1000
|
||||||
|
#define IDC_1 1001
|
||||||
|
#define IDC_3 1002
|
||||||
|
#define IDC_2 1003
|
||||||
|
#define IDC_4 1004
|
||||||
|
#define IDC_5 1005
|
||||||
|
#define IDC_6 1006
|
||||||
|
#define IDC_7 1007
|
||||||
|
#define IDC_8 1008
|
||||||
|
#define IDC_9 1009
|
||||||
|
#define IDC_A 1010
|
||||||
|
#define IDC_B 1011
|
||||||
|
#define IDC_C 1012
|
||||||
|
#define IDC_D 1013
|
||||||
|
#define IDC_E 1014
|
||||||
|
#define IDC_F 1015
|
||||||
|
#define IDC_PLUSMINUS 1020
|
||||||
|
#define IDC_DECPOINT 1021
|
||||||
|
#define IDC_PERCENT 1022
|
||||||
|
#define IDC_SQRT 1023
|
||||||
|
#define IDC_PI 1024
|
||||||
|
#define IDC_S 1025
|
||||||
|
#define IDC_SUM 1026
|
||||||
|
#define IDC_AVE 1027
|
||||||
|
#define IDC_STA 1028
|
||||||
|
#define IDC_DAT 1029
|
||||||
|
#define ID_BLUE_FINISH 1029
|
||||||
|
|
||||||
|
#define ID_RED_START 1036
|
||||||
|
#define IDC_PLUS 1036
|
||||||
|
#define IDC_MINUS 1037
|
||||||
|
#define IDC_MULTIPLY 1038
|
||||||
|
#define IDC_DIVIDE 1039
|
||||||
|
#define IDC_MPLUS 1040
|
||||||
|
#define IDC_MS 1041
|
||||||
|
#define IDC_MR 1042
|
||||||
|
#define IDC_MC 1043
|
||||||
|
#define IDC_EQUALS 1046
|
||||||
|
#define IDC_LSH 1047
|
||||||
|
#define IDC_OR 1048
|
||||||
|
#define IDC_MOD 1049
|
||||||
|
#define IDC_CLEAR 1050
|
||||||
|
#define IDC_CE 1051
|
||||||
|
#define IDC_BSPACE 1052
|
||||||
|
#define IDC_INT 1053
|
||||||
|
#define IDC_NOT 1054
|
||||||
|
#define IDC_XOR 1055
|
||||||
|
#define IDC_AND 1056
|
||||||
|
#define ID_RED_FINISH 1056
|
||||||
|
|
||||||
|
#define ID_PURPLE_START 1057
|
||||||
|
#define IDC_COS 1058
|
||||||
|
#define IDC_SIN 1059
|
||||||
|
#define IDC_DMS 1060
|
||||||
|
#define IDC_FE 1061
|
||||||
|
#define IDC_CUBE 1062
|
||||||
|
#define IDC_POWER 1063
|
||||||
|
#define IDC_EXP 1064
|
||||||
|
#define IDC_OPENBKT 1065
|
||||||
|
#define IDC_BANG 1066
|
||||||
|
#define IDC_LOG 1067
|
||||||
|
#define IDC_LN 1068
|
||||||
|
#define IDC_CLOSEBK 1069
|
||||||
|
#define IDC_TAN 1070
|
||||||
|
#define IDC_SQUARE 1071
|
||||||
|
#define IDC_INVERT 1072
|
||||||
|
#define ID_PURPLE_FINISH 1072
|
||||||
|
|
||||||
|
#define IDC_INV 1078
|
||||||
|
#define IDC_HYP 1079
|
||||||
|
#define IDC_HEX 1080
|
||||||
|
#define IDC_DEC 1081
|
||||||
|
#define IDC_OCT 1082
|
||||||
|
#define IDC_BIN 1083
|
||||||
|
#define IDC_DEGREES 1084
|
||||||
|
#define IDC_RADIANS 1085
|
||||||
|
#define IDC_GRADS 1086
|
||||||
|
#define IDC_RESULT 1087
|
||||||
|
|
||||||
|
#define IDC_MEMTEXT 1090
|
||||||
|
#define IDC_UNITS 1091
|
||||||
|
#define IDC_BASE 1092
|
||||||
|
#define IDC_INVHYP 1093
|
||||||
|
#define IDC_BKTTEXT 1094
|
||||||
|
|
||||||
|
#define ID_VIEW_STANDARD 40003
|
||||||
|
#define ID_VIEW_SCIENTIFIC 40004
|
||||||
|
#define ID_VIEW_DIGIT_GROUPING 40005
|
||||||
|
#define ID_VIEW_HEX 40006
|
||||||
|
#define ID_VIEW_DECIMAL 40007
|
||||||
|
#define ID_VIEW_OCTAL 40008
|
||||||
|
#define ID_VIEW_BINARY 40009
|
||||||
|
#define ID_VIEW_DEGREES 40010
|
||||||
|
#define ID_VIEW_RADIANS 40011
|
||||||
|
#define ID_VIEW_GRADS 40012
|
||||||
|
#define ID_HELP_TOPICS 40013
|
||||||
|
#define ID_HELP_ABOUT 40014
|
||||||
|
|
||||||
#define IDC_BUTTON1 1000
|
|
||||||
#define IDC_BUTTON2 1001
|
|
||||||
#define IDC_EDIT1 1002
|
|
||||||
#define ID_VIEW_STANDARD 40003
|
|
||||||
#define ID_VIEW_SCIENTIFIC 40004
|
|
||||||
#define ID_VIEW_DIGIT_GROUPING 40005
|
|
||||||
#define ID_VIEW_HEX 40006
|
|
||||||
#define ID_VIEW_DECIMAL 40007
|
|
||||||
#define ID_VIEW_OCTAL 40008
|
|
||||||
#define ID_VIEW_BINARY 40009
|
|
||||||
#define ID_VIEW_DEGREES 40010
|
|
||||||
#define ID_VIEW_RADIANS 40011
|
|
||||||
#define ID_VIEW_GRADS 40012
|
|
||||||
#define ID_HELP_TOPICS 40013
|
|
||||||
#define ID_HELP_ABOUT 40014
|
|
||||||
#define ID_EDIT_COPY 0xE122
|
|
||||||
#define ID_EDIT_PASTE 0xE125
|
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 109
|
#define _APS_NEXT_RESOURCE_VALUE 109
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40015
|
#define _APS_NEXT_COMMAND_VALUE 40015
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1003
|
#define _APS_NEXT_CONTROL_VALUE 1095
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
|
|
||||||
static BOOL CheckResult(LONG error)
|
BOOL CheckResult(LONG error)
|
||||||
{
|
{
|
||||||
if (error != ERROR_SUCCESS) {
|
if (error != ERROR_SUCCESS) {
|
||||||
PTSTR msg;
|
PTSTR msg;
|
||||||
|
@ -56,7 +56,7 @@ static BOOL CreateRegistryPath(LPTSTR szRegPath, int nMaxLen)
|
||||||
szRegPath[nLength] = _T('\\');
|
szRegPath[nLength] = _T('\\');
|
||||||
|
|
||||||
// walk the registry path string creating the tree if required
|
// walk the registry path string creating the tree if required
|
||||||
while (pRegPath = _tcschr(pRegPath, _T('\\'))) {
|
while ((pRegPath = _tcschr(pRegPath, _T('\\')))) {
|
||||||
LONG result;
|
LONG result;
|
||||||
HKEY hKey = NULL;
|
HKEY hKey = NULL;
|
||||||
*pRegPath = _T('\0');
|
*pRegPath = _T('\0');
|
||||||
|
|
Loading…
Reference in a new issue