コード例 #1
0
ファイル: video_gpi.c プロジェクト: BigBoss21X/vice-emu
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);
}
コード例 #2
0
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;

}
コード例 #3
0
//*******************************************************************
// WndProc - handles messages for this application
//
// parameters:
//             hWnd          - The window handle for this message
//             message       - The message number
//             wParam        - The WPARAM parameter for this message
//             lParam        - The LPARAM parameter for this message
//
// returns:
//             depends on message.
//
//*******************************************************************
LRESULT CALLBACK WndProc(HWND hWnd, UINT message,
                         WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
        case WM_CREATE:
            wmCreate();
            break;

        case WM_COMMAND:
            switch (wParam)
            {
                case CM_ABOUT:
                    cmAbout();
                    break;

                case CM_EXIT:
                    // Tell windows to destroy our window.
                    DestroyWindow(hWnd);
                    break;

                case CM_ALIGNMENTMARKS:
                    cmAlignmentMarks();
                    break;

                case CM_FONTS:
                    cmFonts(hWnd);
                    break;

                case CM_SHADOWS:
                    cmShadows();
                    break;

                default:
                    break;

            } // switch wParam
            break;
                                                    
        case WM_PAINT:
            DoPaint();
            break;

        case WM_GETMINMAXINFO:
            // Limit the minimum size of the window to 300x300,
            // so the fonts don't get too small
            ((POINT far *)lParam)[3].x = 300;
            ((POINT far *)lParam)[3].y = 300;
            break;

        case WM_DESTROY:
            // This is the end if we were closed by a DestroyWindow call.
            PostQuitMessage(0);
            break;

        default:
            return(DefWindowProc(hWnd, message, wParam, lParam));
    }  // switch message

    return(0L);
}  // end of WndProc()