zoukankan      html  css  js  c++  java
  • WM_SIZE后于WM_CREATE消息!!在窗口被创建时的顺序!

    WM_SIZE

     
    procedure WMSize (var Message: TWMSize);  message WM_SIZE;

    参数说明

    wParam:
    Specifies the type of resizing requested.
    通常用来向别的窗口发送消息时,需要指定的附加信息
    Value
    Meaning
    SIZE_MAXHIDE
    Message is sent to all pop-up windows when some other window is maximized.
    SIZE_MAXSHOW
    Message is sent to all pop-up windows when some other window has been restored to its former size.
    SIZE_MINIMIZED
    The window has been minimized.
    Value
    Meaning
    SIZE_RESTORED
    The window has been resized, but neither the SIZE_MINIMIZED nor SIZE_MAXIMIZED value applies.
    lParam:
    The low-order word of lParamspecifies the new width of the client area.
    The high-order word of lParam specifies the new height of the client area.
    note:
    lParam和GetClientRect的功能一样,有时候WM_SIZE的效率要比使用GetClientRect高. 可以在程序中使用WM_SIZE来保存Client area的大小方便以后使用.
    WM_SIZE后于WM_CREATE消息!!在窗口被创建时的顺序!
    WM_SIZE附带的信息:
    WM_SIZE
    fwSizeType = wParam; // resizing flag
    nWidth = LOWORD(lParam); // width of client area
    nHeight = HIWORD(lParam); // height of client area
    告诉我们Windows处理窗口大小变化后新窗口客户区的大小.
    Message Cracker
    void Cls_OnSize(HWND hwnd, UINT state, int cx, int cy)
    ...{
    //do ...
    }
    参数cx,cy是新窗口客户区的大小!宽度和高度
    注意cx,cy最好定义为全局或是静态的,例子如下
    static UINT cx,cy;
    switch (message)
    {
    case WM_SIZE:
    cx=LOWORD(lParam);
    cy=HIWORD(lParam);
    break;
     
    http://www.cnblogs.com/toosuo/p/3387827.html
  • 相关阅读:
    c语言中while((c=getchar())!=EOF)怎样才能输入EOF是循环中断
    Python学习笔记之装饰器原理
    Ubuntu中使用pip3报错
    Django配置xadmin后台模板之坑(一)
    ES6之字符串扩展
    Koa中设置中文Cookie值
    node中中间件body-parser的实现方式
    CSS笔记之Grid网格系统
    从0开始搭建vue+webpack脚手架(四)
    从0开始搭建vue+webpack脚手架(三)
  • 原文地址:https://www.cnblogs.com/findumars/p/7127107.html
Copyright © 2011-2022 走看看