Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // WindowsProject3.cpp : Defines the entry point for the application.
- //
- #include "stdafx.h"
- #include "WindowsProject3.h"
- #define MAX_LOADSTRING 100
- // Global Variables:
- HINSTANCE hInst; // current instance
- WCHAR szTitle[MAX_LOADSTRING]; // The title bar text
- WCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name
- // Forward declarations of functions included in this code module:
- ATOM MyRegisterClass(HINSTANCE hInstance);
- BOOL InitInstance(HINSTANCE, int);
- LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
- INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
- INT_PTR CALLBACK Calc(HWND, UINT, WPARAM, LPARAM);
- int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
- _In_opt_ HINSTANCE hPrevInstance,
- _In_ LPWSTR lpCmdLine,
- _In_ int nCmdShow)
- {
- UNREFERENCED_PARAMETER(hPrevInstance);
- UNREFERENCED_PARAMETER(lpCmdLine);
- // TODO: Place code here.
- // Initialize global strings
- LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
- LoadStringW(hInstance, IDC_WINDOWSPROJECT3, szWindowClass, MAX_LOADSTRING);
- MyRegisterClass(hInstance);
- // Perform application initialization:
- if (!InitInstance(hInstance, nCmdShow))
- {
- return FALSE;
- }
- HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WINDOWSPROJECT3));
- MSG msg;
- // Main message loop:
- while (GetMessage(&msg, nullptr, 0, 0))
- {
- if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- }
- return (int)msg.wParam;
- }
- //
- // FUNCTION: MyRegisterClass()
- //
- // PURPOSE: Registers the window class.
- //
- ATOM MyRegisterClass(HINSTANCE hInstance)
- {
- WNDCLASSEXW wcex;
- wcex.cbSize = sizeof(WNDCLASSEX);
- wcex.style = CS_HREDRAW | CS_VREDRAW;
- wcex.lpfnWndProc = WndProc;
- wcex.cbClsExtra = 0;
- wcex.cbWndExtra = 0;
- wcex.hInstance = hInstance;
- wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WINDOWSPROJECT3));
- wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
- wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
- wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_WINDOWSPROJECT3);
- wcex.lpszClassName = szWindowClass;
- wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
- return RegisterClassExW(&wcex);
- }
- //
- // FUNCTION: InitInstance(HINSTANCE, int)
- //
- // PURPOSE: Saves instance handle and creates main window
- //
- // COMMENTS:
- //
- // In this function, we save the instance handle in a global variable and
- // create and display the main program window.
- //
- BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
- {
- hInst = hInstance; // Store instance handle in our global variable
- HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
- CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);
- if (!hWnd)
- {
- return FALSE;
- }
- ShowWindow(hWnd, nCmdShow);
- UpdateWindow(hWnd);
- return TRUE;
- }
- //
- // FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM)
- //
- // PURPOSE: Processes messages for the main window.
- //
- // WM_COMMAND - process the application menu
- // WM_PAINT - Paint the main window
- // WM_DESTROY - post a quit message and return
- //
- //
- LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
- {
- HMENU hRightMenu;
- hRightMenu = CreatePopupMenu();
- switch (message)
- {
- case WM_COMMAND:
- {
- int wmId = LOWORD(wParam);
- // Parse the menu selections:
- switch (wmId)
- {
- case IDM_ABOUT:
- DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
- break;
- case IDM_EXIT:
- DestroyWindow(hWnd);
- break;
- /* Roles Sub-menu Events Handling */
- case ID_ROLES_USER: {
- auto status_user = GetMenuState(GetMenu(hWnd), ID_ROLES_USER, MF_BYCOMMAND) & MF_CHECKED;
- auto status_admin = GetMenuState(GetMenu(hWnd), ID_ROLES_ADMIN, MF_BYCOMMAND) & MF_CHECKED;
- /*! Get the sub-menu */
- hRightMenu = GetSubMenu(hRightMenu, 0);
- if (status_user) {
- /*! Gray-out the Update & Calc items in Actions */
- EnableMenuItem(GetMenu(hWnd), ID_ACTION_UPDATE, FALSE);
- EnableMenuItem(GetMenu(hWnd), ID_ACTION_CALC, FALSE);
- /*! Check button */
- CheckMenuItem(GetMenu(hWnd), ID_ROLES_ADMIN, MF_BYCOMMAND | (status_admin ? MF_UNCHECKED : MF_CHECKED));
- CheckMenuItem(hRightMenu, 1, MF_BYPOSITION | (status_admin ? MF_UNCHECKED : MF_CHECKED));
- CheckMenuItem(GetMenu(hWnd), ID_ROLES_USER, MF_BYCOMMAND | MF_UNCHECKED);
- CheckMenuItem(hRightMenu, 0, MF_BYPOSITION | MF_UNCHECKED);
- }
- else {
- /*! Enable the Update & Calc items in Actions */
- EnableMenuItem(GetMenu(hWnd), ID_ACTION_UPDATE, TRUE);
- EnableMenuItem(GetMenu(hWnd), ID_ACTION_CALC, TRUE);
- /*! Check button */
- CheckMenuItem(GetMenu(hWnd), ID_ROLES_ADMIN, MF_BYCOMMAND | MF_UNCHECKED);
- CheckMenuItem(hRightMenu, 1, MF_BYPOSITION | MF_UNCHECKED);
- CheckMenuItem(GetMenu(hWnd), ID_ROLES_USER, MF_BYCOMMAND | MF_CHECKED);
- CheckMenuItem(hRightMenu, 0, MF_BYPOSITION | MF_CHECKED);
- }
- break;
- }
- case ID_ROLES_ADMIN: {
- /*! Get Menu Items' States */
- auto status_user = GetMenuState(GetMenu(hWnd), ID_ROLES_USER, MF_BYCOMMAND) & MF_CHECKED;
- auto status_admin = GetMenuState(GetMenu(hWnd), ID_ROLES_ADMIN, MF_BYCOMMAND) & MF_CHECKED;
- if (status_admin) {
- /*! Enable the Update & Calc items in Actions */
- EnableMenuItem(GetMenu(hWnd), ID_ACTION_UPDATE, TRUE);
- EnableMenuItem(GetMenu(hWnd), ID_ACTION_CALC, TRUE);
- /*! Check button */
- CheckMenuItem(GetMenu(hWnd), ID_ROLES_USER, MF_BYCOMMAND | (status_user ? MF_UNCHECKED : MF_CHECKED));
- CheckMenuItem(hRightMenu, 0, MF_BYPOSITION | (status_user ? MF_UNCHECKED : MF_CHECKED));
- CheckMenuItem(GetMenu(hWnd), ID_ROLES_ADMIN, MF_BYCOMMAND | MF_UNCHECKED);
- CheckMenuItem(hRightMenu, ID_ROLES_ADMIN, MF_BYPOSITION | MF_UNCHECKED);
- }
- else {
- /*! Gray-out the Update & Calc items in Actions */
- EnableMenuItem(GetMenu(hWnd), ID_ACTION_UPDATE, FALSE);
- EnableMenuItem(GetMenu(hWnd), ID_ACTION_CALC, FALSE);
- /*! Check button */
- CheckMenuItem(GetMenu(hWnd), ID_ROLES_USER, MF_BYCOMMAND | MF_UNCHECKED);
- CheckMenuItem(hRightMenu, ID_ROLES_USER, MF_BYPOSITION | MF_UNCHECKED);
- /*! With Right Click Menu */
- CheckMenuItem(GetMenu(hWnd), ID_ROLES_ADMIN, MF_BYCOMMAND | MF_CHECKED);
- CheckMenuItem(hRightMenu, ID_ROLES_ADMIN, MF_BYPOSITION | MF_CHECKED);
- }
- break;
- }
- /*! Adding new role, named 'Special Role' */
- case ID_ROLES_NEW:
- {
- auto hMainMenu = GetMenu(hWnd);
- if (GetMenuState(hMainMenu, ID_ROLES_SPECIAL, MF_BYCOMMAND) == -1) {
- MENUITEMINFO mii;
- ZeroMemory(&mii, sizeof(MENUITEMINFO));
- mii.cbSize = sizeof(MENUITEMINFO);
- mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
- mii.fState = MFS_ENABLED;
- mii.fType = MFT_STRING;
- mii.wID = ID_ROLES_SPECIAL;
- mii.dwTypeData = const_cast<LPWSTR>(L"Special Role");
- auto mHandler = MessageBoxW(hWnd, L"Are you sure?", L"WARNING", MB_YESNO | MB_ICONWARNING);
- if (mHandler == IDYES) {
- MessageBoxW(hWnd, L"The 'Special Role' has been created successfully!!", L"INFORMATION", MB_OK | MB_ICONINFORMATION);
- InsertMenuItem(hMainMenu, ID_ROLES_USER + 1, FALSE, &mii);
- }
- else
- MessageBoxW(hWnd, L"Unexpected error occurred!\nThe role has not been added!", L"ERROR", MB_OK | MB_ICONERROR);
- }
- else {
- MessageBoxW(hWnd, L"The 'Special Role' was already created!", L"ERROR", MB_OK | MB_ICONERROR);
- }
- break;
- }
- /*! Deleting the 'Old Role' menu item*/
- case ID_ROLES_DELETE: {
- if (DeleteMenu(GetMenu(hWnd), ID_ROLES_OLDROLE, MF_BYCOMMAND))
- MessageBoxW(hWnd, L"Successfully deleted 'Old Role' !", L"INFORMATION", MB_OK | MB_ICONINFORMATION);
- else
- MessageBoxW(hWnd, L"The role has already been deleted!", L"ERROR", MB_OK | MB_ICONERROR);
- break;
- }
- /*! Right-click Menu Events Handling */
- case ID_POPUP_END: {
- MessageBoxW(hWnd, L"Goodbye!", L"Goodbye!", MB_OK | MB_ICONINFORMATION);
- SendMessage(hWnd, WM_CLOSE, wParam, lParam);
- break;
- }
- /*! Accelerator Handling*/
- case IDM_HOTKEY: {
- auto status_user = GetMenuState(GetMenu(hWnd), ID_ROLES_USER, MF_BYCOMMAND) & MF_CHECKED;
- if (!status_user)
- DialogBox(hInst, MAKEINTRESOURCE(IDD_CALC), hWnd, Calc);
- else
- MessageBoxW(hWnd, L"You have no permissions to open this dialog!", L"WARNING", MB_OK | MB_ICONWARNING);
- break;
- }
- /*! Actions Menu Handling */
- case ID_ACTION_UPDATE:
- MessageBoxW(hWnd, L"You pressed the update menu item!", L"INFORMATION", MB_OK | MB_ICONINFORMATION);
- break;
- case ID_ACTION_SEARCH:
- MessageBoxW(hWnd, L"You pressed the search menu item!", L"INFORMATION", MB_OK | MB_ICONINFORMATION);
- break;
- case ID_ACTION_CALC:
- DialogBox(hInst, MAKEINTRESOURCE(IDD_CALC), hWnd, Calc);
- break;
- /*! If none of the above is met */
- default:
- return DefWindowProc(hWnd, message, wParam, lParam);
- }
- }
- break;
- case WM_RBUTTONUP: {
- POINT cPoint;
- cPoint.x = LOWORD(lParam);
- cPoint.y = HIWORD(lParam);
- ClientToScreen(hWnd, &cPoint);
- AppendMenuW(hRightMenu, MF_STRING, ID_ROLES_USER, L"&User");
- AppendMenuW(hRightMenu, MF_STRING, ID_ROLES_ADMIN, L"&Admin");
- AppendMenuW(hRightMenu, MF_SEPARATOR, 0, NULL);
- AppendMenuW(hRightMenu, MF_STRING, ID_POPUP_END, L"&End");
- TrackPopupMenu(hRightMenu, TPM_RIGHTBUTTON, cPoint.x, cPoint.y, 0, hWnd, NULL);
- break;
- }
- case WM_DESTROY:
- DestroyMenu(hRightMenu);
- PostQuitMessage(0);
- break;
- default:
- DestroyMenu(hRightMenu);
- return DefWindowProc(hWnd, message, wParam, lParam);
- }
- return 0;
- }
- // Message handler for about box.
- INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
- {
- UNREFERENCED_PARAMETER(lParam);
- switch (message)
- {
- case WM_INITDIALOG:
- return (INT_PTR)TRUE;
- case WM_COMMAND:
- if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
- {
- EndDialog(hDlg, LOWORD(wParam));
- return (INT_PTR)TRUE;
- }
- break;
- }
- return (INT_PTR)FALSE;
- }
- // Message handler for calc box.
- INT_PTR CALLBACK Calc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
- {
- UNREFERENCED_PARAMETER(lParam);
- switch (message)
- {
- case WM_INITDIALOG:
- return (INT_PTR)TRUE;
- case WM_COMMAND:
- {
- auto wmId = LOWORD(wParam);
- switch (wmId) {
- case IDB_CALC_FLOAT: {
- std::string value1, value2, value3;
- auto hEdit1 = GetDlgItem(hDlg, IDC_EDIT1);
- auto hEdit2 = GetDlgItem(hDlg, IDC_EDIT2);
- auto hEdit3 = GetDlgItem(hDlg, IDC_EDIT3);
- value1.resize(GetWindowTextLength(hEdit1) + 1, '\0');
- value2.resize(GetWindowTextLength(hEdit2) + 1, '\0');
- value3.resize(GetWindowTextLength(hEdit3) + 1, '\0');
- GetWindowTextA(hEdit1, (LPSTR)value1.c_str(), GetWindowTextLength(hEdit1) + 1);
- GetWindowTextA(hEdit2, (LPSTR)value2.c_str(), GetWindowTextLength(hEdit2) + 1);
- GetWindowTextA(hEdit3, (LPSTR)value3.c_str(), GetWindowTextLength(hEdit3) + 1);
- auto fVal1 = atof(value1.c_str());
- auto fVal2 = atof(value2.c_str());
- auto fVal3 = atof(value3.c_str());
- if (IsDlgButtonChecked(hDlg, IDC_RADIO1) == BST_CHECKED) {
- /*! Calculate the result */
- auto temp = fVal1 + fVal2 + fVal3;
- /*! Set the result to the result edit control */
- SetDlgItemText(hDlg, IDC_RESULT1, std::to_wstring(temp).c_str());
- /*! Check if radio button2 is checked */
- }
- else if (IsDlgButtonChecked(hDlg, IDC_RADIO2) == BST_CHECKED) {
- /*! Check if the first and the second values are different than zero */
- if ((fVal1 != 0 && fVal2 != 0)) {
- /*! Check if the third value is different than zero */
- if (fVal3 != 0) {
- /*! Calculate the result */
- auto temp = ((fVal1 * fVal1) + (fVal2 * fVal2)) / fVal3;
- /*! Set the result to the result edit control */
- SetDlgItemText(hDlg, IDC_RESULT1, std::to_wstring(temp).c_str());
- }
- else {
- MessageBoxW(hDlg, L"The divisor is 0", L"WARNING", MB_OK | MB_ICONWARNING);
- }
- }
- else {
- MessageBoxW(hDlg, L"Both of the numbers are 0", L"WARNING", MB_OK | MB_ICONWARNING);
- }
- }
- else {
- MessageBoxW(hDlg, L"Please check one of the radio buttons!", L"WARNING", MB_OK | MB_ICONWARNING);
- }
- break;
- }
- case IDB_CALC: {
- /*! Get status checks about checkboxes */
- auto status_check1 = SendDlgItemMessage(hDlg, IDC_CHECK1, BM_GETCHECK, 0, 0);
- auto status_check2 = SendDlgItemMessage(hDlg, IDC_CHECK2, BM_GETCHECK, 0, 0);
- auto status_check3 = SendDlgItemMessage(hDlg, IDC_CHECK3, BM_GETCHECK, 0, 0);
- /*! Get Values */
- auto value1 = status_check1 ? GetDlgItemInt(hDlg, IDC_EDIT5, NULL, TRUE) : 1;
- auto value2 = status_check2 ? GetDlgItemInt(hDlg, IDC_EDIT6, NULL, TRUE) : 1;
- auto value3 = status_check3 ? GetDlgItemInt(hDlg, IDC_EDIT7, NULL, TRUE) : 1;
- SetDlgItemInt(hDlg, IDC_RESULT2, (2 * value1 - value2) * value3, TRUE);
- break;
- }
- }
- break;
- }
- case WM_CLOSE:
- EndDialog(hDlg, 0);
- break;
- }
- return (INT_PTR)FALSE;
- }
- -----------------
- // Microsoft Visual C++ generated resource script.
- //
- #include "resource.h"
- #define APSTUDIO_READONLY_SYMBOLS
- /////////////////////////////////////////////////////////////////////////////
- //
- // Generated from the TEXTINCLUDE 2 resource.
- //
- #ifndef APSTUDIO_INVOKED
- #include "targetver.h"
- #endif
- #define APSTUDIO_HIDDEN_SYMBOLS
- #include "windows.h"
- #undef APSTUDIO_HIDDEN_SYMBOLS
- /////////////////////////////////////////////////////////////////////////////
- #undef APSTUDIO_READONLY_SYMBOLS
- /////////////////////////////////////////////////////////////////////////////
- // Bulgarian (Bulgaria) resources
- #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_BGR)
- LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT
- /////////////////////////////////////////////////////////////////////////////
- //
- // Dialog
- //
- IDD_CALC DIALOGEX 0, 0, 309, 194
- STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
- CAPTION "Calculator"
- FONT 8, "MS Shell Dlg", 400, 0, 0x1
- BEGIN
- DEFPUSHBUTTON "Calculate Float",IDB_CALC_FLOAT,102,66,68,14
- EDITTEXT IDC_EDIT1,24,30,40,14,ES_AUTOHSCROLL | ES_NUMBER
- EDITTEXT IDC_EDIT2,78,30,40,14,ES_AUTOHSCROLL | ES_NUMBER
- EDITTEXT IDC_EDIT3,132,30,40,14,ES_AUTOHSCROLL | ES_NUMBER
- EDITTEXT IDC_RESULT1,48,66,40,14,ES_AUTOHSCROLL | ES_READONLY | ES_NUMBER
- CONTROL "a + b + c",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,234,30,46,10
- CONTROL "a^2 + b^2 / c",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,234,42,62,10
- LTEXT "________________________________________________________________________________________________",IDC_STATIC,7,90,295,8
- EDITTEXT IDC_EDIT5,60,108,40,14,ES_AUTOHSCROLL | ES_NUMBER
- EDITTEXT IDC_EDIT6,60,132,40,14,ES_AUTOHSCROLL | ES_NUMBER
- EDITTEXT IDC_EDIT7,60,156,40,14,ES_AUTOHSCROLL | ES_NUMBER
- EDITTEXT IDC_RESULT2,186,132,70,14,ES_AUTOHSCROLL | ES_READONLY | ES_NUMBER
- CONTROL "M",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,30,108,21,16,WS_EX_RIGHT
- CONTROL "N",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,30,132,21,16,WS_EX_RIGHT
- CONTROL "P",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,30,156,21,16,WS_EX_RIGHT
- DEFPUSHBUTTON "Calculate Integer",IDB_CALC,186,156,72,14
- LTEXT "(2 * M - N) * P",IDC_STATIC,197,120,66,12
- END
- /////////////////////////////////////////////////////////////////////////////
- //
- // DESIGNINFO
- //
- #ifdef APSTUDIO_INVOKED
- GUIDELINES DESIGNINFO
- BEGIN
- IDD_CALC, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 302
- TOPMARGIN, 7
- BOTTOMMARGIN, 187
- END
- END
- #endif // APSTUDIO_INVOKED
- #endif // Bulgarian (Bulgaria) resources
- /////////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////////
- // English (United States) resources
- #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
- LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
- /////////////////////////////////////////////////////////////////////////////
- //
- // Dialog
- //
- IDD_ABOUTBOX DIALOGEX 0, 0, 170, 62
- STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
- CAPTION "About WindowsProject3"
- FONT 8, "MS Shell Dlg", 0, 0, 0x1
- BEGIN
- ICON IDR_MAINFRAME,IDC_STATIC,14,14,21,20
- LTEXT "WindowsProject3, Version 1.0",IDC_STATIC,42,14,114,8,SS_NOPREFIX
- LTEXT "Copyright (c) 2019",IDC_STATIC,42,26,114,8
- DEFPUSHBUTTON "OK",IDOK,113,41,50,14,WS_GROUP
- END
- /////////////////////////////////////////////////////////////////////////////
- //
- // DESIGNINFO
- //
- #ifdef APSTUDIO_INVOKED
- GUIDELINES DESIGNINFO
- BEGIN
- IDD_ABOUTBOX, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 163
- TOPMARGIN, 7
- BOTTOMMARGIN, 55
- END
- END
- #endif // APSTUDIO_INVOKED
- /////////////////////////////////////////////////////////////////////////////
- //
- // Accelerator
- //
- IDC_WINDOWSPROJECT3 ACCELERATORS
- BEGIN
- VK_OEM_2, IDM_ABOUT, VIRTKEY, ALT, NOINVERT
- "?", IDM_ABOUT, ASCII, ALT, NOINVERT
- "C", IDM_HOTKEY, VIRTKEY, CONTROL, NOINVERT
- END
- /////////////////////////////////////////////////////////////////////////////
- //
- // Icon
- //
- // Icon with lowest ID value placed first to ensure application icon
- // remains consistent on all systems.
- IDI_WINDOWSPROJECT3 ICON "WindowsProject3.ico"
- IDI_SMALL ICON "small.ico"
- /////////////////////////////////////////////////////////////////////////////
- //
- // Menu
- //
- IDC_WINDOWSPROJECT3 MENU
- BEGIN
- POPUP "&File"
- BEGIN
- MENUITEM "E&xit", IDM_EXIT
- END
- POPUP "&Roles"
- BEGIN
- MENUITEM "User", ID_ROLES_USER, CHECKED
- MENUITEM "Admin", ID_ROLES_ADMIN
- MENUITEM SEPARATOR
- MENUITEM "New", ID_ROLES_NEW
- MENUITEM "Delete", ID_ROLES_DELETE
- MENUITEM "Old Role", ID_ROLES_OLDROLE
- END
- POPUP "&Action"
- BEGIN
- MENUITEM "Search", ID_ACTION_SEARCH
- MENUITEM "Update", ID_ACTION_UPDATE, INACTIVE
- MENUITEM "Calc", ID_ACTION_CALC, INACTIVE
- END
- POPUP "&Help"
- BEGIN
- MENUITEM "&About ...", IDM_ABOUT
- END
- END
- #ifdef APSTUDIO_INVOKED
- /////////////////////////////////////////////////////////////////////////////
- //
- // TEXTINCLUDE
- //
- 1 TEXTINCLUDE
- BEGIN
- "resource.h\0"
- END
- 2 TEXTINCLUDE
- BEGIN
- "#ifndef APSTUDIO_INVOKED\r\n"
- "#include ""targetver.h""\r\n"
- "#endif\r\n"
- "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "#include ""windows.h""\r\n"
- "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "\0"
- END
- 3 TEXTINCLUDE
- BEGIN
- "\r\n"
- "\0"
- END
- #endif // APSTUDIO_INVOKED
- /////////////////////////////////////////////////////////////////////////////
- //
- // String Table
- //
- STRINGTABLE
- BEGIN
- IDS_APP_TITLE "Test 1"
- IDC_WINDOWSPROJECT3 "WINDOWSPROJECT3"
- END
- #endif // English (United States) resources
- /////////////////////////////////////////////////////////////////////////////
- #ifndef APSTUDIO_INVOKED
- /////////////////////////////////////////////////////////////////////////////
- //
- // Generated from the TEXTINCLUDE 3 resource.
- //
- /////////////////////////////////////////////////////////////////////////////
- #endif // not APSTUDIO_INVOKED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement