TORN@DO presents: cRACKER's n0TES
Window-Messages for Crackers


WM_ACTIVATE
The WM_ACTIVATE message is sent when a window is being activated or deactivated. This message is sent first to the window procedure of the top-level window being deactivated; it is then sent to the window procedure of the top-level window being activated.
     fActive = LOWORD(wParam);           // activation flag
     fMinimized = (BOOL) HIWORD(wParam); // minimized flag
     hwnd = (HWND) lParam;               // window handle
Returns
If an application processes this message, it should return zero.




WM_CLEAR
An application sends a WM_CLEAR message to an edit control or combo box to delete (clear) the current selection, if any, from the edit control.
    wParam = 0; // not used; must be zero 
    lParam = 0; // not used; must be zero 
Returns
This message does not return a value.




WM_CLOSE
The WM_CLOSE message is sent as a signal that a window or an application should terminate.

    Returns
If an application processes this message, it should return zero.




WM_COMMAND
The WM_COMMAND message is sent when the user selects a command item from a menu, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated.
     wNotifyCode = HIWORD(wParam); // notification code 
     wID = LOWORD(wParam);         // item, control, or accelerator identifier 
     hwndCtl = (HWND) lParam;      // handle of control 
Returns
If an application processes this message, it should return zero.




WM_CREATE
The WM_CREATE message is sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow function. The window procedure of the new window receives this message after the window is created, but before the window becomes visible. The message is sent before the CreateWindowEx or CreateWindow function returns.
     lpcs = (LPCREATESTRUCT) lParam; // structure with creation data 
Returns
If an application processes this message, it should return 0 to continue creation of the window. If the application returns -1, the window is destroyed and the CreateWindowEx or CreateWindow function returns a NULL handle.




WM_DESTROY
The WM_DESTROY message is sent when a window is being destroyed. It is sent to the window procedure of the window being destroyed after the window is removed from the screen.

This message is sent first to the window being destroyed and then to the child windows (if any) as they are destroyed. During the processing of the message, it can be assumed that all child windows still exist.


    Returns
If an application processes this message, it should return zero.




WM_GETTEXT
An application sends a WM_GETTEXT message to copy the text that corresponds to a window into a buffer provided by the caller.
     wParam = (WPARAM) cchTextMax;   // number of characters to copy
     lParam = (LPARAM) lpszText;     // address of buffer for text
Returns
The return value is the number of characters copied.




WM_GETTEXTLENGTH
An application sends a WM_GETTEXTLENGTH message to determine the length, in characters, of the text associated with a window. The length does not include the terminating null character.
     wParam = 0; // not used; must be zero
     lParam = 0; // not used; must be zero
Returns
The return value is the length, in characters, of the text.




WM_INITDIALOG
The WM_INITDIALOG message is sent to the dialog box procedure immediately before a dialog box is displayed. Dialog box procedures typically use this message to initialize controls and carry out any other initialization tasks that affect the appearance of the dialog box.
    hwndFocus = (HWND) wParam; // handle of control to receive focus
    lInitParam = lParam;       // initialization parameter
Returns
The dialog box procedure should return TRUE to direct Windows to set the keyboard focus to the control given by hwndFocus. Otherwise, it should return FALSE to prevent Windows from setting the default keyboard focus.




WM_LBUTTONDBLCLK
The WM_LBUTTONDBLCLK message is posted when the user double-clicks the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
     fwKeys = wParam;        // key flags
     xPos = LOWORD(lParam);  // horizontal position of cursor
     yPos = HIWORD(lParam);  // vertical position of cursor
Returns
If an application processes this message, it should return zero.




WM_LBUTTONDOWN
The WM_LBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
     fwKeys = wParam;        // key flags
     xPos = LOWORD(lParam);  // horizontal position of cursor
     yPos = HIWORD(lParam);  // vertical position of cursor
Returns
If an application processes this message, it should return zero.




WM_LBUTTONUP
The WM_LBUTTONUP message is posted when the user releases the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse.
     fwKeys = wParam;        // key flags
     xPos = LOWORD(lParam);  // horizontal position of cursor
     yPos = HIWORD(lParam);  // vertical position of cursor
Returns
If an application processes this message, it should return zero.




WM_QUIT
The WM_QUIT message indicates a request to terminate an application and is generated when the application calls the PostQuitMessage function. It causes the GetMessage function to return zero.
     nExitCode = (int) wParam;   // exit code 
Returns
This message does not have a return value, because it causes the message loop to terminate before the message is sent to the application's window procedure.




WM_TIMER
The WM_TIMER message is posted to the installing thread's message queue or sent to the appropriate TimerProc callback function after each interval specified in the SetTimer function used to install a timer.
     wTimerID = wParam;            // timer identifier 
     tmprc = (TIMERPROC *) lParam; // address of timer callback
Returns
An application should return zero if it processes this message.





The cRACKER's n0tES are divided into 10 main parts:
 00. INDEX
 01. Assembly for Crackers (CoRN2)
 02. SoftICE (Boot Menu, Setup, Commands)
 03. Breakpoints & Win API Details
 04. Jump Instructions
 05. SET Instructions
 06. Tips & Tricks for Cracking
 07. Window Messages For Crackers
 08. Identifying Functions, Arguments, and Variables (Rhayader)
 09. Commerical Protection Systems
 10. Bitmanipulation (Cruehead)
 11. General Cracking Theory
 12. FAQ

 +A. How to contact me
 +B. What's New?



The cRACKER's n0TES are Copyright © 1998-2000 by TORN@DO of ID. All Rights Reserved. Archived and Re-hosted by Werdstaff