Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Autor : Tiago Portela
- // Email : sapitando@gmail.com
- // Sobre o programa : Captura as Mensagens do Windows e envia para o console para apreciação. Compilei com a IDE Dev-C++ 5.11 e
- // funcionou bem no Windows 7 x64.
- // Obs. : Apenas tentando aprender algorítimos, sozinho, por hobby. }
- // --------------------------------------------------------- resource.h -----------------------------------------------------------
- #define IDM_MENU 100
- #define IDC_ARQUIVO_NOVO 101
- #define IDC_ARQUIVO_ABRIR 102
- #define IDC_ARQUIVO_SALVAR 103
- #define IDC_ARQUIVO_SAIR 104
- #define IDC_EDITAR_COPIAR 105
- #define IDC_EDITAR_RECORTAR 106
- #define IDC_EDITAR_COLAR 107
- #define IDC_EDITAR_OPCOES 108
- #define IDC_AJUDA_SOBRE 109
- #define ID_MYTEXT 110
- #define ID_MYSTATIC 111
- #define ID_MYPUSHBUTTON 112
- #define ID_MYAUTOCHECKBOX 113
- // -------------------------------------------------------- resource.rc -----------------------------------------------------------
- #include "resource.h"
- IDM_MENU MENU DISCARDABLE
- BEGIN
- POPUP "&Arquivo"
- BEGIN
- MENUITEM "&Novo" , IDC_ARQUIVO_NOVO
- MENUITEM "&Abrir", IDC_ARQUIVO_ABRIR
- MENUITEM "&Salvar", IDC_ARQUIVO_SALVAR
- MENUITEM SEPARATOR
- MENUITEM "&Sair", IDC_ARQUIVO_SAIR
- END
- POPUP "&Editar"
- BEGIN
- MENUITEM "&Copiar", IDC_EDITAR_COPIAR
- MENUITEM "&Recortar", IDC_EDITAR_RECORTAR
- MENUITEM "C&olar", IDC_EDITAR_COLAR
- MENUITEM SEPARATOR
- MENUITEM "&Opções", IDC_EDITAR_OPCOES
- END
- POPUP "A&juda"
- BEGIN
- MENUITEM "&Sobre", IDC_AJUDA_SOBRE
- END
- END
- // ----------------------------------------------------------- main.c -------------------------------------------------------------
- #define UNICODE
- #define WM_GETOBJECT 0x003D
- #define WM_NCXBUTTONDOWN 0x00AB
- #define WM_NCXBUTTONUP 0x00AC
- #define WM_NCXBUTTONDBLCLK 0x00AD
- #define WM_NCUAHDRAWCAPTION 0x00ae
- #define WM_NCUAHDRAWFRAME 0x00af
- #define BM_SETDONTCLICK 0x00f8
- #define WM_MENURBUTTONUP 0x0122
- #define WM_MENUDRAG 0x0123
- #define WM_MENUGETOBJECT 0x0124
- #define WM_UNINITMENUPOPUP 0x0125
- #define WM_MENUCOMMAND 0x0126
- #define WM_CHANGEUISTATE 0x0127
- #define WM_UPDATEUISTATE 0x0128
- #define WM_QUERYUISTATE 0x0129
- #define WM_IME_REQUEST 0x0288
- #define WM_APPCOMMAND 0x0319
- #define WM_UAHDRAWMENU 0x0091
- #define WM_UAHDRAWMENUITEM 0x0092
- #define WM_UAHINITMENU 0x0093
- #define WM_UAHMEASUREMENUITEM 0x0094
- #define WM_UAHNCPAINTMENUPOPUP 0x0095
- #define WM_DWMNCRENDERINGCHANGED 0x031f
- #define WM_MOUSEWHEEL 0x020A
- #define WM_KEYF1 0x004d
- #define Binary(byte) "%c%c%c%c%c%c%c%c ", \
- (byte & 128? '1':'0') , (byte & 64? '1':'0') , \
- (byte & 32? '1':'0') , (byte & 16? '1':'0') , \
- (byte & 8? '1':'0') , (byte & 4? '1':'0') , \
- (byte & 2? '1':'0') , (byte & 1? '1':'0')
- #include <windows.h>
- #include <iostream>
- #include "resource.h"
- unsigned int nCounter = 0;
- WNDCLASS wndclass = {};
- HWND hwnd;
- HWND hwndLabel_01;
- HWND hwndButton_01;
- HWND hwndButton_02;
- HWND hwndButton_03;
- HWND hwndText_01;
- HMENU hMenu;
- void ShowConsole(void);
- void PrintWinMsg(UINT, WPARAM, LPARAM);
- const char *FunStrWinMsg(UINT);
- LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM);
- int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
- {
- wndclass.style = (CS_HREDRAW | CS_VREDRAW | CS_NOCLOSE);
- wndclass.lpfnWndProc = WindowProcedure;
- wndclass.hInstance = hInstance;
- // wndclass.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON));
- wndclass.hIcon = LoadIcon(hInstance, IDI_APPLICATION);
- // wndclass.lpszMenuName = MAKEINTRESOURCE(IDM_MENU);
- wndclass.hbrBackground = (HBRUSH)(COLOR_WINDOW);
- wndclass.lpszClassName = TEXT("Janela Principal");
- RegisterClass(&wndclass);
- UNREFERENCED_PARAMETER(hwnd);
- hwnd = CreateWindow(wndclass.lpszClassName, TEXT("Windows Messages"),
- WS_OVERLAPPEDWINDOW,
- CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
- NULL, LoadMenu(hInstance, MAKEINTRESOURCE(IDM_MENU)), hInstance, NULL);
- ShowConsole();
- ShowWindow(hwnd, nCmdShow);
- MSG msg = {};
- while(GetMessage(&msg, NULL, 0, 0))
- {
- TranslateMessage(&msg);
- DispatchMessage (& msg);
- }
- return 0;
- }
- LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
- {
- switch(Msg)
- {
- case WM_GETICON :
- case WM_SETCURSOR :
- case WM_MOUSEFIRST :
- case WM_NCHITTEST :
- case WM_NCMOUSEMOVE :
- case WM_ENTERIDLE : break;
- default : PrintWinMsg(Msg, wParam, lParam);
- }
- switch(Msg)
- {
- case WM_DESTROY :
- PostQuitMessage(WM_QUIT);
- return(0);
- default :
- return DefWindowProc(hwnd, Msg, wParam, lParam);
- }
- }
- void ShowConsole(void)
- {
- AllocConsole();
- SetWindowLong(GetConsoleWindow(), GWL_STYLE, GetWindowLong(GetConsoleWindow(), GWL_STYLE) & (~(WS_SYSMENU | WS_HSCROLL)));
- ShowWindow(GetConsoleWindow(), SW_MAXIMIZE);
- COORD dwSize = GetLargestConsoleWindowSize(GetStdHandle(STD_OUTPUT_HANDLE));
- dwSize.Y = 1000;
- SMALL_RECT lpCW = {.Left = 0, .Top = 0,.Right = (SHORT)(dwSize.X - 1),.Bottom = (SHORT)(dwSize.Y - 1)};
- SetConsoleTitle(TEXT(" | Window messages | Hex "
- "| WPARAM | LPARAM"));
- SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), dwSize);
- SetConsoleWindowInfo(GetStdHandle(STD_OUTPUT_HANDLE), TRUE, &lpCW);
- freopen("CONIN$", "r", stdin);
- freopen("CONOUT$", "w", stdout);
- freopen("CONOUT$", "w", stderr);
- }
- void PrintWinMsg(UINT Msg, WPARAM wParam, LPARAM lParam)
- {
- nCounter++;
- CONSOLE_SCREEN_BUFFER_INFO CSBI;
- DWORD dwCounterChar;
- WORD wTextFColor = (FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY);
- WORD wTextFBcolor = (nCounter & 1)? (BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY)
- : (wTextFColor);
- COORD dwSize = GetLargestConsoleWindowSize(GetStdHandle(STD_OUTPUT_HANDLE));
- GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &CSBI);
- CSBI.dwCursorPosition.X = 0;
- FillConsoleOutputAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wTextFBcolor, dwSize.X, CSBI.dwCursorPosition, &dwCounterChar);
- SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), CSBI.dwCursorPosition);
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wTextFBcolor);
- printf("%u", nCounter);
- CSBI.dwCursorPosition.X += 10;
- SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), CSBI.dwCursorPosition);
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wTextFBcolor| wTextFColor);
- printf("%c ",179);
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wTextFBcolor);
- printf("%s", FunStrWinMsg(Msg));
- CSBI.dwCursorPosition.X += 32;
- SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), CSBI.dwCursorPosition);
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wTextFBcolor | wTextFColor);
- printf("%c ", 179);
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wTextFBcolor);
- printf("%#06x ", Msg);
- CSBI.dwCursorPosition.X += 9;
- SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), CSBI.dwCursorPosition);
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wTextFBcolor | wTextFColor);
- printf("%c ", 179);
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wTextFBcolor);
- printf(Binary(HIBYTE(HIWORD(wParam))));
- printf(Binary(LOBYTE(HIWORD(wParam))));
- printf(Binary(HIBYTE(LOWORD(wParam))));
- printf(Binary(LOBYTE(LOWORD(wParam))));
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wTextFBcolor | wTextFColor);
- printf("%c ", 179);
- SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wTextFBcolor);
- printf(Binary(HIBYTE(HIWORD(lParam))));
- printf(Binary(LOBYTE(HIWORD(lParam))));
- printf(Binary(HIBYTE(LOWORD(lParam))));
- printf(Binary(LOBYTE(LOWORD(lParam))));
- printf("\n");
- }
- const char *FunStrWinMsg(UINT uMsg)
- {
- static char strWinMsg[31];
- switch(uMsg)
- {
- case WM_NULL : strncpy(strWinMsg, "WM_NULL", 30); break;
- case WM_CREATE : strncpy(strWinMsg, "WM_CREATE", 30); break;
- case WM_DESTROY : strncpy(strWinMsg, "WM_DESTROY", 30); break;
- case WM_MOVE : strncpy(strWinMsg, "WM_MOVE", 30); break;
- case WM_SIZE : strncpy(strWinMsg, "WM_SIZE", 30); break;
- case WM_ACTIVATE : strncpy(strWinMsg, "WM_ACTIVATE", 30); break;
- case WM_SETFOCUS : strncpy(strWinMsg, "WM_SETFOCUS", 30); break;
- case WM_KILLFOCUS : strncpy(strWinMsg, "WM_KILLFOCUS", 30); break;
- case WM_ENABLE : strncpy(strWinMsg, "WM_ENABLE", 30); break;
- case WM_SETREDRAW : strncpy(strWinMsg, "WM_SETREDRAW", 30); break;
- case WM_SETTEXT : strncpy(strWinMsg, "WM_SETTEXT", 30); break;
- case WM_GETTEXT : strncpy(strWinMsg, "WM_GETTEXT", 30); break;
- case WM_GETTEXTLENGTH : strncpy(strWinMsg, "WM_GETTEXTLENGTH", 30); break;
- case WM_PAINT : strncpy(strWinMsg, "WM_PAINT", 30); break;
- case WM_CLOSE : strncpy(strWinMsg, "WM_CLOSE", 30); break;
- case WM_QUERYENDSESSION : strncpy(strWinMsg, "WM_QUERYENDSESSION", 30); break;
- case WM_QUIT : strncpy(strWinMsg, "WM_QUIT", 30); break;
- case WM_QUERYOPEN : strncpy(strWinMsg, "WM_QUERYOPEN", 30); break;
- case WM_ERASEBKGND : strncpy(strWinMsg, "WM_ERASEBKGND", 30); break;
- case WM_SYSCOLORCHANGE : strncpy(strWinMsg, "WM_SYSCOLORCHANGE", 30); break;
- case WM_ENDSESSION : strncpy(strWinMsg, "WM_ENDSESSION", 30); break;
- case WM_SHOWWINDOW : strncpy(strWinMsg, "WM_SHOWWINDOW", 30); break;
- case WM_WININICHANGE : strncpy(strWinMsg, "WM_WININICHANGE", 30); break;
- case WM_DEVMODECHANGE : strncpy(strWinMsg, "WM_DEVMODECHANGE", 30); break;
- case WM_ACTIVATEAPP : strncpy(strWinMsg, "WM_ACTIVATEAPP", 30); break;
- case WM_FONTCHANGE : strncpy(strWinMsg, "WM_FONTCHANGE", 30); break;
- case WM_TIMECHANGE : strncpy(strWinMsg, "WM_TIMECHANGE", 30); break;
- case WM_CANCELMODE : strncpy(strWinMsg, "WM_CANCELMODE", 30); break;
- case WM_SETCURSOR : strncpy(strWinMsg, "WM_SETCURSOR", 30); break;
- case WM_MOUSEACTIVATE : strncpy(strWinMsg, "WM_MOUSEACTIVATE", 30); break;
- case WM_CHILDACTIVATE : strncpy(strWinMsg, "WM_CHILDACTIVATE", 30); break;
- case WM_QUEUESYNC : strncpy(strWinMsg, "WM_QUEUESYNC", 30); break;
- case WM_GETMINMAXINFO : strncpy(strWinMsg, "WM_GETMINMAXINFO", 30); break;
- case WM_PAINTICON : strncpy(strWinMsg, "WM_PAINTICON", 30); break;
- case WM_ICONERASEBKGND : strncpy(strWinMsg, "WM_ICONERASEBKGND", 30); break;
- case WM_NEXTDLGCTL : strncpy(strWinMsg, "WM_NEXTDLGCTL", 30); break;
- case WM_SPOOLERSTATUS : strncpy(strWinMsg, "WM_SPOOLERSTATUS", 30); break;
- case WM_DRAWITEM : strncpy(strWinMsg, "WM_DRAWITEM", 30); break;
- case WM_MEASUREITEM : strncpy(strWinMsg, "WM_MEASUREITEM", 30); break;
- case WM_DELETEITEM : strncpy(strWinMsg, "WM_DELETEITEM", 30); break;
- case WM_VKEYTOITEM : strncpy(strWinMsg, "WM_VKEYTOITEM", 30); break;
- case WM_CHARTOITEM : strncpy(strWinMsg, "WM_CHARTOITEM", 30); break;
- case WM_SETFONT : strncpy(strWinMsg, "WM_SETFONT", 30); break;
- case WM_GETFONT : strncpy(strWinMsg, "WM_GETFONT", 30); break;
- case WM_SETHOTKEY : strncpy(strWinMsg, "WM_SETHOTKEY", 30); break;
- case WM_GETHOTKEY : strncpy(strWinMsg, "WM_GETHOTKEY", 30); break;
- case WM_QUERYDRAGICON : strncpy(strWinMsg, "WM_QUERYDRAGICON", 30); break;
- case WM_COMPAREITEM : strncpy(strWinMsg, "WM_COMPAREITEM", 30); break;
- case WM_GETOBJECT : strncpy(strWinMsg, "WM_GETOBJECT", 30); break;
- case WM_COMPACTING : strncpy(strWinMsg, "WM_COMPACTING", 30); break;
- case WM_COMMNOTIFY : strncpy(strWinMsg, "WM_COMMNOTIFY", 30); break;
- case WM_WINDOWPOSCHANGING : strncpy(strWinMsg, "WM_WINDOWPOSCHANGING", 30); break;
- case WM_WINDOWPOSCHANGED : strncpy(strWinMsg, "WM_WINDOWPOSCHANGED", 30); break;
- case WM_POWER : strncpy(strWinMsg, "WM_POWER", 30); break;
- case WM_COPYDATA : strncpy(strWinMsg, "WM_COPYDATA", 30); break;
- case WM_CANCELJOURNAL : strncpy(strWinMsg, "WM_CANCELJOURNAL", 30); break;
- case WM_NOTIFY : strncpy(strWinMsg, "WM_NOTIFY", 30); break;
- case WM_INPUTLANGCHANGEREQUEST : strncpy(strWinMsg, "WM_INPUTLANGCHANGEREQUEST", 30); break;
- case WM_INPUTLANGCHANGE : strncpy(strWinMsg, "WM_INPUTLANGCHANGE", 30); break;
- case WM_TCARD : strncpy(strWinMsg, "WM_TCARD", 30); break;
- case WM_HELP : strncpy(strWinMsg, "WM_HELP", 30); break;
- case WM_USERCHANGED : strncpy(strWinMsg, "WM_USERCHANGED", 30); break;
- case WM_NOTIFYFORMAT : strncpy(strWinMsg, "WM_NOTIFYFORMAT", 30); break;
- case WM_CONTEXTMENU : strncpy(strWinMsg, "WM_CONTEXTMENU", 30); break;
- case WM_STYLECHANGING : strncpy(strWinMsg, "WM_STYLECHANGING", 30); break;
- case WM_STYLECHANGED : strncpy(strWinMsg, "WM_STYLECHANGED", 30); break;
- case WM_DISPLAYCHANGE : strncpy(strWinMsg, "WM_DISPLAYCHANGE", 30); break;
- case WM_GETICON : strncpy(strWinMsg, "WM_GETICON", 30); break;
- case WM_SETICON : strncpy(strWinMsg, "WM_SETICON", 30); break;
- case WM_NCCREATE : strncpy(strWinMsg, "WM_NCCREATE", 30); break;
- case WM_NCDESTROY : strncpy(strWinMsg, "WM_NCDESTROY", 30); break;
- case WM_NCCALCSIZE : strncpy(strWinMsg, "WM_NCCALCSIZE", 30); break;
- case WM_NCHITTEST : strncpy(strWinMsg, "WM_NCHITTEST", 30); break;
- case WM_NCPAINT : strncpy(strWinMsg, "WM_NCPAINT", 30); break;
- case WM_NCACTIVATE : strncpy(strWinMsg, "WM_NCACTIVATE", 30); break;
- case WM_GETDLGCODE : strncpy(strWinMsg, "WM_GETDLGCODE", 30); break;
- case WM_SYNCPAINT : strncpy(strWinMsg, "WM_SYNCPAINT", 30); break;
- case WM_NCMOUSEMOVE : strncpy(strWinMsg, "WM_NCMOUSEMOVE", 30); break;
- case WM_NCLBUTTONDOWN : strncpy(strWinMsg, "WM_NCLBUTTONDOWN", 30); break;
- case WM_NCLBUTTONUP : strncpy(strWinMsg, "WM_NCLBUTTONUP", 30); break;
- case WM_NCLBUTTONDBLCLK : strncpy(strWinMsg, "WM_NCLBUTTONDBLCLK", 30); break;
- case WM_NCRBUTTONDOWN : strncpy(strWinMsg, "WM_NCRBUTTONDOWN", 30); break;
- case WM_NCRBUTTONUP : strncpy(strWinMsg, "WM_NCRBUTTONUP", 30); break;
- case WM_NCRBUTTONDBLCLK : strncpy(strWinMsg, "WM_NCRBUTTONDBLCLK", 30); break;
- case WM_NCMBUTTONDOWN : strncpy(strWinMsg, "WM_NCMBUTTONDOWN", 30); break;
- case WM_NCMBUTTONUP : strncpy(strWinMsg, "WM_NCMBUTTONUP", 30); break;
- case WM_NCMBUTTONDBLCLK : strncpy(strWinMsg, "WM_NCMBUTTONDBLCLK", 30); break;
- case WM_NCXBUTTONDOWN : strncpy(strWinMsg, "WM_NCXBUTTONDOWN", 30); break;
- case WM_NCXBUTTONUP : strncpy(strWinMsg, "WM_NCXBUTTONUP", 30); break;
- case WM_NCXBUTTONDBLCLK : strncpy(strWinMsg, "WM_NCXBUTTONDBLCLK", 30); break;
- case EM_GETSEL : strncpy(strWinMsg, "EM_GETSEL", 30); break;
- case EM_SETSEL : strncpy(strWinMsg, "EM_SETSEL", 30); break;
- case EM_GETRECT : strncpy(strWinMsg, "EM_GETRECT", 30); break;
- case EM_SETRECT : strncpy(strWinMsg, "EM_SETRECT", 30); break;
- case EM_SETRECTNP : strncpy(strWinMsg, "EM_SETRECTNP", 30); break;
- case EM_SCROLL : strncpy(strWinMsg, "EM_SCROLL", 30); break;
- case EM_LINESCROLL : strncpy(strWinMsg, "EM_LINESCROLL", 30); break;
- case EM_SCROLLCARET : strncpy(strWinMsg, "EM_SCROLLCARET", 30); break;
- case EM_GETMODIFY : strncpy(strWinMsg, "EM_GETMODIFY", 30); break;
- case EM_SETMODIFY : strncpy(strWinMsg, "EM_SETMODIFY", 30); break;
- case EM_GETLINECOUNT : strncpy(strWinMsg, "EM_GETLINECOUNT", 30); break;
- case EM_LINEINDEX : strncpy(strWinMsg, "EM_LINEINDEX", 30); break;
- case EM_SETHANDLE : strncpy(strWinMsg, "EM_SETHANDLE", 30); break;
- case EM_GETHANDLE : strncpy(strWinMsg, "EM_GETHANDLE", 30); break;
- case EM_GETTHUMB : strncpy(strWinMsg, "EM_GETTHUMB", 30); break;
- case EM_LINELENGTH : strncpy(strWinMsg, "EM_LINELENGTH", 30); break;
- case EM_REPLACESEL : strncpy(strWinMsg, "EM_REPLACESEL", 30); break;
- case EM_GETLINE : strncpy(strWinMsg, "EM_GETLINE", 30); break;
- case EM_LIMITTEXT : strncpy(strWinMsg, "EM_LIMITTEXT", 30); break;
- case EM_CANUNDO : strncpy(strWinMsg, "EM_CANUNDO", 30); break;
- case EM_UNDO : strncpy(strWinMsg, "EM_UNDO", 30); break;
- case EM_FMTLINES : strncpy(strWinMsg, "EM_FMTLINES", 30); break;
- case EM_LINEFROMCHAR : strncpy(strWinMsg, "EM_LINEFROMCHAR", 30); break;
- case EM_SETTABSTOPS : strncpy(strWinMsg, "EM_SETTABSTOPS", 30); break;
- case EM_SETPASSWORDCHAR : strncpy(strWinMsg, "EM_SETPASSWORDCHAR", 30); break;
- case EM_EMPTYUNDOBUFFER : strncpy(strWinMsg, "EM_EMPTYUNDOBUFFER", 30); break;
- case EM_GETFIRSTVISIBLELINE : strncpy(strWinMsg, "EM_GETFIRSTVISIBLELINE", 30); break;
- case EM_SETREADONLY : strncpy(strWinMsg, "EM_SETREADONLY", 30); break;
- case EM_SETWORDBREAKPROC : strncpy(strWinMsg, "EM_SETWORDBREAKPROC", 30); break;
- case EM_GETWORDBREAKPROC : strncpy(strWinMsg, "EM_GETWORDBREAKPROC", 30); break;
- case EM_GETPASSWORDCHAR : strncpy(strWinMsg, "EM_GETPASSWORDCHAR", 30); break;
- case EM_SETMARGINS : strncpy(strWinMsg, "EM_SETMARGINS", 30); break;
- case EM_GETMARGINS : strncpy(strWinMsg, "EM_GETMARGINS", 30); break;
- case EM_GETLIMITTEXT : strncpy(strWinMsg, "EM_GETLIMITTEXT", 30); break;
- case EM_POSFROMCHAR : strncpy(strWinMsg, "EM_POSFROMCHAR", 30); break;
- case EM_CHARFROMPOS : strncpy(strWinMsg, "EM_CHARFROMPOS", 30); break;
- case EM_SETIMESTATUS : strncpy(strWinMsg, "EM_SETIMESTATUS", 30); break;
- case EM_GETIMESTATUS : strncpy(strWinMsg, "EM_GETIMESTATUS", 30); break;
- case SBM_SETPOS : strncpy(strWinMsg, "SBM_SETPOS", 30); break;
- case SBM_GETPOS : strncpy(strWinMsg, "SBM_GETPOS", 30); break;
- case SBM_SETRANGE : strncpy(strWinMsg, "SBM_SETRANGE", 30); break;
- case SBM_GETRANGE : strncpy(strWinMsg, "SBM_GETRANGE", 30); break;
- case SBM_ENABLE_ARROWS : strncpy(strWinMsg, "SBM_ENABLE_ARROWS", 30); break;
- case SBM_SETRANGEREDRAW : strncpy(strWinMsg, "SBM_SETRANGEREDRAW", 30); break;
- case SBM_SETSCROLLINFO : strncpy(strWinMsg, "SBM_SETSCROLLINFO", 30); break;
- case SBM_GETSCROLLINFO : strncpy(strWinMsg, "SBM_GETSCROLLINFO", 30); break;
- case SBM_GETSCROLLBARINFO : strncpy(strWinMsg, "SBM_GETSCROLLBARINFO", 30); break;
- case BM_GETCHECK : strncpy(strWinMsg, "BM_GETCHECK", 30); break;
- case BM_SETCHECK : strncpy(strWinMsg, "BM_SETCHECK", 30); break;
- case BM_GETSTATE : strncpy(strWinMsg, "BM_GETSTATE", 30); break;
- case BM_SETSTATE : strncpy(strWinMsg, "BM_SETSTATE", 30); break;
- case BM_SETSTYLE : strncpy(strWinMsg, "BM_SETSTYLE", 30); break;
- case BM_CLICK : strncpy(strWinMsg, "BM_CLICK", 30); break;
- case BM_GETIMAGE : strncpy(strWinMsg, "BM_GETIMAGE", 30); break;
- case BM_SETIMAGE : strncpy(strWinMsg, "BM_SETIMAGE", 30); break;
- case BM_SETDONTCLICK : strncpy(strWinMsg, "BM_SETDONTCLICK", 30); break;
- case WM_INPUT : strncpy(strWinMsg, "WM_INPUT", 30); break;
- case WM_KEYDOWN : strncpy(strWinMsg, "WM_KEYDOWN", 30); break;
- case WM_KEYUP : strncpy(strWinMsg, "WM_KEYUP", 30); break;
- case WM_CHAR : strncpy(strWinMsg, "WM_CHAR", 30); break;
- case WM_DEADCHAR : strncpy(strWinMsg, "WM_DEADCHAR", 30); break;
- case WM_SYSKEYDOWN : strncpy(strWinMsg, "WM_SYSKEYDOWN", 30); break;
- case WM_SYSKEYUP : strncpy(strWinMsg, "WM_SYSKEYUP", 30); break;
- case WM_SYSCHAR : strncpy(strWinMsg, "WM_SYSCHAR", 30); break;
- case WM_SYSDEADCHAR : strncpy(strWinMsg, "WM_SYSDEADCHAR", 30); break;
- case WM_KEYLAST : strncpy(strWinMsg, "WM_KEYLAST", 30); break;
- case WM_IME_STARTCOMPOSITION : strncpy(strWinMsg, "WM_IME_STARTCOMPOSITION", 30); break;
- case WM_IME_ENDCOMPOSITION : strncpy(strWinMsg, "WM_IME_ENDCOMPOSITION", 30); break;
- case WM_IME_COMPOSITION : strncpy(strWinMsg, "WM_IME_COMPOSITION", 30); break;
- case WM_INITDIALOG : strncpy(strWinMsg, "WM_INITDIALOG", 30); break;
- case WM_COMMAND : strncpy(strWinMsg, "WM_COMMAND", 30); break;
- case WM_SYSCOMMAND : strncpy(strWinMsg, "WM_SYSCOMMAND", 30); break;
- case WM_TIMER : strncpy(strWinMsg, "WM_TIMER", 30); break;
- case WM_HSCROLL : strncpy(strWinMsg, "WM_HSCROLL", 30); break;
- case WM_VSCROLL : strncpy(strWinMsg, "WM_VSCROLL", 30); break;
- case WM_INITMENU : strncpy(strWinMsg, "WM_INITMENU", 30); break;
- case WM_INITMENUPOPUP : strncpy(strWinMsg, "WM_INITMENUPOPUP", 30); break;
- case WM_MENUSELECT : strncpy(strWinMsg, "WM_MENUSELECT", 30); break;
- case WM_MENUCHAR : strncpy(strWinMsg, "WM_MENUCHAR", 30); break;
- case WM_ENTERIDLE : strncpy(strWinMsg, "WM_ENTERIDLE", 30); break;
- case WM_MENURBUTTONUP : strncpy(strWinMsg, "WM_MENURBUTTONUP", 30); break;
- case WM_MENUDRAG : strncpy(strWinMsg, "WM_MENUDRAG", 30); break;
- case WM_MENUGETOBJECT : strncpy(strWinMsg, "WM_MENUGETOBJECT", 30); break;
- case WM_UNINITMENUPOPUP : strncpy(strWinMsg, "WM_UNINITMENUPOPUP", 30); break;
- case WM_MENUCOMMAND : strncpy(strWinMsg, "WM_MENUCOMMAND", 30); break;
- case WM_CHANGEUISTATE : strncpy(strWinMsg, "WM_CHANGEUISTATE", 30); break;
- case WM_UPDATEUISTATE : strncpy(strWinMsg, "WM_UPDATEUISTATE", 30); break;
- case WM_QUERYUISTATE : strncpy(strWinMsg, "WM_QUERYUISTATE", 30); break;
- case WM_CTLCOLORMSGBOX : strncpy(strWinMsg, "WM_CTLCOLORMSGBOX", 30); break;
- case WM_CTLCOLOREDIT : strncpy(strWinMsg, "WM_CTLCOLOREDIT", 30); break;
- case WM_CTLCOLORLISTBOX : strncpy(strWinMsg, "WM_CTLCOLORLISTBOX", 30); break;
- case WM_CTLCOLORBTN : strncpy(strWinMsg, "WM_CTLCOLORBTN", 30); break;
- case WM_CTLCOLORDLG : strncpy(strWinMsg, "WM_CTLCOLORDLG", 30); break;
- case WM_CTLCOLORSCROLLBAR : strncpy(strWinMsg, "WM_CTLCOLORSCROLLBAR", 30); break;
- case WM_CTLCOLORSTATIC : strncpy(strWinMsg, "WM_CTLCOLORSTATIC", 30); break;
- case WM_MOUSEFIRST : strncpy(strWinMsg, "WM_MOUSEFIRST", 30); break;
- case WM_LBUTTONDOWN : strncpy(strWinMsg, "WM_LBUTTONDOWN", 30); break;
- case WM_LBUTTONUP : strncpy(strWinMsg, "WM_LBUTTONUP", 30); break;
- case WM_LBUTTONDBLCLK : strncpy(strWinMsg, "WM_LBUTTONDBLCLK", 30); break;
- case WM_RBUTTONDOWN : strncpy(strWinMsg, "WM_RBUTTONDOWN", 30); break;
- case WM_RBUTTONUP : strncpy(strWinMsg, "WM_RBUTTONUP", 30); break;
- case WM_RBUTTONDBLCLK : strncpy(strWinMsg, "WM_RBUTTONDBLCLK", 30); break;
- case WM_MBUTTONDOWN : strncpy(strWinMsg, "WM_MBUTTONDOWN", 30); break;
- case WM_MBUTTONUP : strncpy(strWinMsg, "WM_MBUTTONUP", 30); break;
- case WM_MBUTTONDBLCLK : strncpy(strWinMsg, "WM_MBUTTONDBLCLK", 30); break;
- case WM_MOUSELAST : strncpy(strWinMsg, "WM_MOUSELAST", 30); break;
- case WM_XBUTTONDOWN : strncpy(strWinMsg, "WM_XBUTTONDOWN", 30); break;
- case WM_XBUTTONUP : strncpy(strWinMsg, "WM_XBUTTONUP", 30); break;
- case WM_PARENTNOTIFY : strncpy(strWinMsg, "WM_PARENTNOTIFY", 30); break;
- case WM_ENTERMENULOOP : strncpy(strWinMsg, "WM_ENTERMENULOOP", 30); break;
- case WM_EXITMENULOOP : strncpy(strWinMsg, "WM_EXITMENULOOP", 30); break;
- case WM_NEXTMENU : strncpy(strWinMsg, "WM_NEXTMENU", 30); break;
- case WM_SIZING : strncpy(strWinMsg, "WM_SIZING", 30); break;
- case WM_CAPTURECHANGED : strncpy(strWinMsg, "WM_CAPTURECHANGED", 30); break;
- case WM_MOVING : strncpy(strWinMsg, "WM_MOVING", 30); break;
- case WM_POWERBROADCAST : strncpy(strWinMsg, "WM_POWERBROADCAST", 30); break;
- case WM_DEVICECHANGE : strncpy(strWinMsg, "WM_DEVICECHANGE", 30); break;
- case WM_MDICREATE : strncpy(strWinMsg, "WM_MDICREATE", 30); break;
- case WM_MDIDESTROY : strncpy(strWinMsg, "WM_MDIDESTROY", 30); break;
- case WM_MDIACTIVATE : strncpy(strWinMsg, "WM_MDIACTIVATE", 30); break;
- case WM_MDIRESTORE : strncpy(strWinMsg, "WM_MDIRESTORE", 30); break;
- case WM_MDINEXT : strncpy(strWinMsg, "WM_MDINEXT", 30); break;
- case WM_MDIMAXIMIZE : strncpy(strWinMsg, "WM_MDIMAXIMIZE", 30); break;
- case WM_MDITILE : strncpy(strWinMsg, "WM_MDITILE", 30); break;
- case WM_MDICASCADE : strncpy(strWinMsg, "WM_MDICASCADE", 30); break;
- case WM_MDIICONARRANGE : strncpy(strWinMsg, "WM_MDIICONARRANGE", 30); break;
- case WM_MDIGETACTIVE : strncpy(strWinMsg, "WM_MDIGETACTIVE", 30); break;
- case WM_MDISETMENU : strncpy(strWinMsg, "WM_MDISETMENU", 30); break;
- case WM_ENTERSIZEMOVE : strncpy(strWinMsg, "WM_ENTERSIZEMOVE", 30); break;
- case WM_EXITSIZEMOVE : strncpy(strWinMsg, "WM_EXITSIZEMOVE", 30); break;
- case WM_DROPFILES : strncpy(strWinMsg, "WM_DROPFILES", 30); break;
- case WM_MDIREFRESHMENU : strncpy(strWinMsg, "WM_MDIREFRESHMENU", 30); break;
- case WM_IME_SETCONTEXT : strncpy(strWinMsg, "WM_IME_SETCONTEXT", 30); break;
- case WM_IME_NOTIFY : strncpy(strWinMsg, "WM_IME_NOTIFY", 30); break;
- case WM_IME_CONTROL : strncpy(strWinMsg, "WM_IME_CONTROL", 30); break;
- case WM_IME_COMPOSITIONFULL : strncpy(strWinMsg, "WM_IME_COMPOSITIONFULL", 30); break;
- case WM_IME_SELECT : strncpy(strWinMsg, "WM_IME_SELECT", 30); break;
- case WM_IME_CHAR : strncpy(strWinMsg, "WM_IME_CHAR", 30); break;
- case WM_IME_REQUEST : strncpy(strWinMsg, "WM_IME_REQUEST", 30); break;
- case WM_IME_KEYDOWN : strncpy(strWinMsg, "WM_IME_KEYDOWN", 30); break;
- case WM_IME_KEYUP : strncpy(strWinMsg, "WM_IME_KEYUP", 30); break;
- case WM_NCMOUSEHOVER : strncpy(strWinMsg, "WM_NCMOUSEHOVER", 30); break;
- case WM_MOUSEHOVER : strncpy(strWinMsg, "WM_MOUSEHOVER", 30); break;
- case WM_NCMOUSELEAVE : strncpy(strWinMsg, "WM_NCMOUSELEAVE", 30); break;
- case WM_MOUSELEAVE : strncpy(strWinMsg, "WM_MOUSELEAVE", 30); break;
- case WM_CUT : strncpy(strWinMsg, "WM_CUT", 30); break;
- case WM_COPY : strncpy(strWinMsg, "WM_COPY", 30); break;
- case WM_PASTE : strncpy(strWinMsg, "WM_PASTE", 30); break;
- case WM_CLEAR : strncpy(strWinMsg, "WM_CLEAR", 30); break;
- case WM_UNDO : strncpy(strWinMsg, "WM_UNDO", 30); break;
- case WM_RENDERFORMAT : strncpy(strWinMsg, "WM_RENDERFORMAT", 30); break;
- case WM_RENDERALLFORMATS : strncpy(strWinMsg, "WM_RENDERALLFORMATS", 30); break;
- case WM_DESTROYCLIPBOARD : strncpy(strWinMsg, "WM_DESTROYCLIPBOARD", 30); break;
- case WM_DRAWCLIPBOARD : strncpy(strWinMsg, "WM_DRAWCLIPBOARD", 30); break;
- case WM_PAINTCLIPBOARD : strncpy(strWinMsg, "WM_PAINTCLIPBOARD", 30); break;
- case WM_VSCROLLCLIPBOARD : strncpy(strWinMsg, "WM_VSCROLLCLIPBOARD", 30); break;
- case WM_SIZECLIPBOARD : strncpy(strWinMsg, "WM_SIZECLIPBOARD", 30); break;
- case WM_ASKCBFORMATNAME : strncpy(strWinMsg, "WM_ASKCBFORMATNAME", 30); break;
- case WM_CHANGECBCHAIN : strncpy(strWinMsg, "WM_CHANGECBCHAIN", 30); break;
- case WM_HSCROLLCLIPBOARD : strncpy(strWinMsg, "WM_HSCROLLCLIPBOARD", 30); break;
- case WM_QUERYNEWPALETTE : strncpy(strWinMsg, "WM_QUERYNEWPALETTE", 30); break;
- case WM_PALETTEISCHANGING : strncpy(strWinMsg, "WM_PALETTEISCHANGING", 30); break;
- case WM_PALETTECHANGED : strncpy(strWinMsg, "WM_PALETTECHANGED", 30); break;
- case WM_HOTKEY : strncpy(strWinMsg, "WM_HOTKEY", 30); break;
- case WM_PRINT : strncpy(strWinMsg, "WM_PRINT", 30); break;
- case WM_PRINTCLIENT : strncpy(strWinMsg, "WM_PRINTCLIENT", 30); break;
- case WM_APPCOMMAND : strncpy(strWinMsg, "WM_APPCOMMAND", 30); break;
- case WM_HANDHELDFIRST : strncpy(strWinMsg, "WM_HANDHELDFIRST", 30); break;
- case WM_HANDHELDLAST : strncpy(strWinMsg, "WM_HANDHELDLAST", 30); break;
- case WM_AFXFIRST : strncpy(strWinMsg, "WM_AFXFIRST", 30); break;
- case WM_AFXLAST : strncpy(strWinMsg, "WM_AFXLAST", 30); break;
- case WM_PENWINFIRST : strncpy(strWinMsg, "WM_PENWINFIRST", 30); break;
- case WM_PENWINLAST : strncpy(strWinMsg, "WM_PENWINLAST", 30); break;
- case DM_GETDEFID : strncpy(strWinMsg, "DM_GETDEFID", 30); break;
- case DM_SETDEFID : strncpy(strWinMsg, "DM_SETDEFID", 30); break;
- case DM_REPOSITION : strncpy(strWinMsg, "DM_REPOSITION", 30); break;
- case WM_APP : strncpy(strWinMsg, "WM_APP", 30); break;
- case WM_UAHDRAWMENU : strncpy(strWinMsg, "WM_UAHDRAWMENU", 30); break;
- case WM_UAHDRAWMENUITEM : strncpy(strWinMsg, "WM_UAHDRAWMENUITEM", 30); break;
- case WM_UAHINITMENU : strncpy(strWinMsg, "WM_UAHINITMENU", 30); break;
- case WM_UAHMEASUREMENUITEM : strncpy(strWinMsg, "WM_UAHMEASUREMENUITEM", 30); break;
- case WM_UAHNCPAINTMENUPOPUP : strncpy(strWinMsg, "WM_UAHNCPAINTMENUPOPUP", 30); break;
- case WM_DWMNCRENDERINGCHANGED : strncpy(strWinMsg, "WM_DWMNCRENDERINGCHANGED", 30); break;
- case WM_NCUAHDRAWCAPTION : strncpy(strWinMsg, "WM_NCUAHDRAWCAPTION", 30); break;
- case WM_NCUAHDRAWFRAME : strncpy(strWinMsg, "WM_NCUAHDRAWFRAME", 30); break;
- case WM_MOUSEWHEEL : strncpy(strWinMsg, "WM_MOUSEWHEEL", 30); break;
- case WM_KEYF1 : strncpy(strWinMsg, "WM_KEYF1", 30); break;
- default : strncpy(strWinMsg, "Message unidentified", 30); break;
- }
- return strWinMsg;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement