Warning: file_get_contents() [function.file-get-contents]: SSL: 远程主机强迫关闭了一个现有的连接。 in D:\wwwroot\huidong\wwwroot\function.inc.php on line 884

Warning: file_get_contents(https://whois.pconline.com.cn/jsLabel.jsp?ip=127.0.0.1) [function.file-get-contents]: failed to open stream: HTTP request failed! in D:\wwwroot\huidong\wwwroot\function.inc.php on line 884
得到窗口的状态:最大化 或 最小化 或 正常,以及设置窗口状态 - huidong

huidong

首页 | 会员登录 | 关于争取 2022 寒假做出汇东网 Ver3.0.0 !
搜索文章


// 得到窗口状态
WINDOWPLACEMENT ws;
ws.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(hwnd/*要获取窗口状态的窗口的句柄*/, &ws);
switch (ws.showCmd)
{
case   1:// 窗口状态为:正常;  
    ShowWindow(GetHWnd(), SW_SHOWMAXIMIZED);// 设置窗口状态为:最大化
    break;
    
case   2:// 窗口状态为:最小化;  
    ShowWindow(GetHWnd(), SW_SHOWNORMAL);// 设置窗口状态为:正常
    break;
    
case   3:// 窗口状态为:最大化;  
    ShowWindow(GetHWnd(), SW_SHOWMINIMIZED);// 设置窗口状态为:最小化
    break;
}

以上代码涵括了设置和获取窗口状态的方式。



返回首页


Copyright (C) 2018-2024 huidong