• 关于MFC中最小化消息被界面控件拦截时的替代办法


    可以用WM_ACTIVATE消息来替代

    消息: WM_ACTIVATE

    参数:
    fActive = LOWORD(wParam); // activation flag
    fMinimized = (BOOL)HIWORD(wParam); // minimized flag
    hwndPrevious= (HWND)lParam; // window handle

    fActive 参数主要定义了该窗口发生了什么事情,即该窗口是被激活还是被取消。该信息保存在 wParam 的低阶字中,可以取以下的值:

    --------------------------------------------------------------------------------------
    值 描述
    --------------------------------------------------------------------------------------
    WA_CLICKACTIVE 通过鼠标单击激活了该窗口
    WA_ACTIVE 通过鼠标以外的工具(如键盘)激活了该窗口
    WA_INACTIVE 取消该窗口的激活
    --------------------------------------------------------------------------------------

    示例代码:

    case WM_ACTIVATE:
    {
    // test if window is being activated
    if(LOWORD(wParam)!=WA_INACTIVE)
    {
    // application is being activated
    }
    else
    {
    // application is being deactivated
    }
    }
    break;

  • 相关阅读:
    ARC081F Flip and Rectangles
    LCA
    Tarjan
    2020牛客暑期多校六
    状压DP
    操作系统
    JAVA期末复习
    D. Yet Another Yet Another Task (区间最值)
    构造
    Codeforces Round #641 (Div. 2)
  • 原文地址:https://www.cnblogs.com/BeyondTechnology/p/1995929.html
Copyright © 2020-2023  润新知