From 3841fa3f78938972b1675fcf78db47ce5b52106a Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Thu, 1 Jan 2004 16:19:40 +0000 Subject: [PATCH] Removed hotkey test. Its now part of winhello. svn path=/trunk/; revision=7382 --- reactos/apps/tests/hotkey/.cvsignore | 6 -- reactos/apps/tests/hotkey/hotkey.c | 115 --------------------------- reactos/apps/tests/hotkey/makefile | 23 ------ 3 files changed, 144 deletions(-) delete mode 100644 reactos/apps/tests/hotkey/.cvsignore delete mode 100644 reactos/apps/tests/hotkey/hotkey.c delete mode 100644 reactos/apps/tests/hotkey/makefile diff --git a/reactos/apps/tests/hotkey/.cvsignore b/reactos/apps/tests/hotkey/.cvsignore deleted file mode 100644 index d63774a7353..00000000000 --- a/reactos/apps/tests/hotkey/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.o -*.d -*.exe -*.coff -*.sym -*.map diff --git a/reactos/apps/tests/hotkey/hotkey.c b/reactos/apps/tests/hotkey/hotkey.c deleted file mode 100644 index 63c1d92c07c..00000000000 --- a/reactos/apps/tests/hotkey/hotkey.c +++ /dev/null @@ -1,115 +0,0 @@ -#include -#include -#include - -//HFONT tf; -LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM); - -int WINAPI -WinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpszCmdLine, - int nCmdShow) -{ - WNDCLASS wc; - MSG msg; - HWND hWnd; - - wc.lpszClassName = "HotkeyTestClass"; - wc.lpfnWndProc = MainWndProc; - wc.style = CS_VREDRAW | CS_HREDRAW; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(NULL, (LPCTSTR)IDI_APPLICATION); - wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - if (RegisterClass(&wc) == 0) - { - fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - hWnd = CreateWindow("HotkeyTestClass", - "Hotkeys Test", - WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL, - 0, - 0, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - hInstance, - NULL); - if (hWnd == NULL) - { - fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n", - GetLastError()); - return(1); - } - - //tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE, - // ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - // DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons"); - - ShowWindow(hWnd, nCmdShow); - - while(GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - //DeleteObject(tf); - - return msg.wParam; -} - - -#define CTRLC 1 -#define ALTF1 2 -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PAINTSTRUCT ps; - HDC hDC; - - switch(msg) - { - case WM_PAINT: - hDC = BeginPaint(hWnd, &ps); - TextOut(hDC, 10, 10, "Press Ctrl+C or Ctrl+Alt+F1", - strlen("Press Ctrl+C or Ctrl+Alt+F1")); - EndPaint(hWnd, &ps); - break; - - case WM_HOTKEY: - switch(wParam) - { - case CTRLC: - MessageBox(hWnd, "You just pressed Ctrl+C", "Hotkey", MB_OK | MB_ICONINFORMATION); - break; - case ALTF1: - MessageBox(hWnd, "You just pressed Ctrl+Alt+F1", "Hotkey", MB_OK | MB_ICONINFORMATION); - break; - } - break; - - case WM_DESTROY: - UnregisterHotKey(hWnd, CTRLC); - UnregisterHotKey(hWnd, ALTF1); - PostQuitMessage(0); - break; - - case WM_CREATE: - /* Register a Ctrl+Alt+C hotkey*/ - RegisterHotKey(hWnd, CTRLC, MOD_CONTROL, VK_C); - RegisterHotKey(hWnd, ALTF1, MOD_CONTROL | MOD_ALT, VK_F1); - break; - - default: - return DefWindowProc(hWnd, msg, wParam, lParam); - } - return 0; -} diff --git a/reactos/apps/tests/hotkey/makefile b/reactos/apps/tests/hotkey/makefile deleted file mode 100644 index 2199ebac266..00000000000 --- a/reactos/apps/tests/hotkey/makefile +++ /dev/null @@ -1,23 +0,0 @@ -# $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $ - -PATH_TO_TOP = ../../.. - -TARGET_NORC = yes - -TARGET_TYPE = program - -TARGET_APPTYPE = windows - -TARGET_NAME = hotkey - -TARGET_SDKLIBS = kernel32.a gdi32.a ntdll.a - -TARGET_OBJECTS = $(TARGET_NAME).o - -TARGET_CFLAGS = -Wall -Werror - -include $(PATH_TO_TOP)/rules.mak - -include $(TOOLS_PATH)/helper.mk - -# EOF