zoukankan      html  css  js  c++  java
  • MFC Windows 程序设计>控制窗口大小 WM_GETMINMAXINFO

    A final aspect of Clock that deserves scrutiny is its OnGetMinMaxInfo handler. As a window is being resized, it receives a series of WM_GETMINMAXINFO messages with lParam pointing to a MINMAXINFO structure containing information about the window's minimum and maximum "tracking" sizes. You can limit a window's minimum and maximum sizes programmatically by processing WM_GETMINMAXINFO messages and copying the minimum width and height to the x and y members of the structure's ptMinTrackSize field and the maximum width and height to the x and y members of the ptMaxTrackSize field. Clock prevents its window from being reduced to less than 120 pixels horizontally and vertically with the following OnGetMinMaxInfo handler:

     

    The tracking dimensions copied to MINMAXINFO are measured in device units, or pixels. In this example, the window's maximum size is unconstrained because pMMI->ptMaxTrackSize is left unchanged. You could limit the maximum window size to one-half the screen size by adding the statements

     

    to the message handler.

  • 相关阅读:
    axios基础用法
    CSS盒子模型
    前端跨域问题解决方案
    跨域-iframe
    swagger UI配置
    React安装和启动
    React 学习笔记
    redis学习笔记
    10个排序算法,待更新
    docker常用命令,持续更新。。。
  • 原文地址:https://www.cnblogs.com/marryZhan/p/2213912.html
Copyright © 2011-2022 走看看