Ejemplo n.º 1
0
MRESULT EXPENTRY PM_winProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
{
    switch (msg)
    {
    case WM_CREATE:       wmCreate      ();          break;
    case WM_PAINT:        wmPaint       (hwnd);      break;
    case WM_CHAR:         wmChar        (hwnd, mp1); break;
    case WM_DESTROY:      wmDestroy     ();          break;
    case WM_SETSELECTION: wmSetSelection(mp1);       break;
    //    case WM_SETFOCUS: log("WM_SETFOCUS",mp1); break;
    //    case WM_ACTIVATE: log("WM_ACTIVATE",mp1); break;
    //    case WM_FOCUSCHANGE: log("WM_FOCUSCHANGE",mp1); break;

    }
    return WinDefWindowProc (hwnd, msg, mp1, mp2);
}
LRESULT CALLBACK BaseWin::ImpleWinProc(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{

    switch(Msg)
    {
        case WM_CREATE:
             wmCreate(hwnd);
             break;

        case WM_COMMAND:
             wmCommand(wParam);
             break;


        case WM_LBUTTONDOWN:
             wmLButtonDown();
             break;

        case WM_RBUTTONDOWN:
             wmRButtonDown();
             break;


        case WM_KEYDOWN:
             wmKeyDown(wParam);
             break;

        case WM_DESTROY:
             wmDestroy();
             PostQuitMessage(0);
             break;


        default:
            return DefWindowProc(hwnd,Msg,wParam,lParam);


    }

    return 0;

}