当前位置:网站首页>Window maximum and minimum settings
Window maximum and minimum settings
2022-07-03 10:03:00 【Master Hao】
void MainWindow::gShowHideTaskBar(BOOL bHide)
{
RECT rectWorkArea;
RECT rectTaskBar;
RECT Rect;
GetWindowRect(::FindWindow(L"Shell_TrayWnd",NULL), &Rect); // <<— Note &
//::GetWindowRect(::FindWindow(L"Shell_TrayWnd",NULL), rectTaskBar);
HWND hTask;
hTask = ::FindWindow(L"Shell_TrayWnd",NULL);
if( bHide )
{
// Hide the specified progress bar
SystemParametersInfo(SPI_GETWORKAREA,
0,
(LPVOID)&rectWorkArea,
0);
rectWorkArea.bottom+=Rect.bottom-Rect.top;
// Make sure the window handle is valid
if(hTask)
{
::ShowWindow(hTask,SW_HIDE);
// Reset mainwindow Window height
SystemParametersInfo(SPI_SETWORKAREA,
0,
(LPVOID)&rectWorkArea,
0);
GlobalParams::getInstance()->setMainWindowSize(rectWorkArea.right-rectWorkArea.left,rectWorkArea.bottom-rectWorkArea.top);
this->setFixedSize(rectWorkArea.right-rectWorkArea.left+1,rectWorkArea.bottom-rectWorkArea.top+1);
ui->maxButton->hide();
ui->minButton->hide();
ui->closeButton->hide();
}
}
else
{
// Display the specified progress bar
SystemParametersInfo(SPI_GETWORKAREA,
0,
(LPVOID)&rectWorkArea,
0);
if(hTask)
{
rectWorkArea.bottom-=Rect.bottom-Rect.top;
SystemParametersInfo(SPI_SETWORKAREA,
0,
(LPVOID)&rectWorkArea,
0);
this->showNormal();
::ShowWindow(hTask,SW_SHOW);
GlobalParams::getInstance()->setMainWindowSize(rectWorkArea.right-rectWorkArea.left,rectWorkArea.bottom-rectWorkArea.top);
// Maximize after normalization
this->setFixedSize(rectWorkArea.right-rectWorkArea.left,rectWorkArea.bottom-rectWorkArea.top);
ui->maxButton->show();
ui->minButton->show();
ui->closeButton->show();
}
}
}
边栏推荐
- 03 FastJson 解决循环引用
- [keil5 debugging] warning:enumerated type mixed with other type
- openEuler kernel 技術分享 - 第1期 - kdump 基本原理、使用及案例介紹
- 要選擇那種語言為單片機編寫程序呢
- The 4G module designed by the charging pile obtains NTP time through mqtt based on 4G network
- 4G module designed by charging pile obtains signal strength and quality
- My notes on intelligent charging pile development (II): overview of system hardware circuit design
- Sending and interrupt receiving of STM32 serial port
- 要选择那种语言为单片机编写程序呢
- MySQL的简单使用(增删改查)
猜你喜欢

Pymssql controls SQL for Chinese queries

使用密钥对的形式连接阿里云服务器

手机都算是单片机的一种,只不过它用的硬件不是51的芯片

对于新入行的同学,如果你完全没有接触单片机,建议51单片机入门

干单片机这一行的时候根本没想过这么多,只想着先挣钱养活自己
![[untitled] proteus simulation of traffic lights based on 89C51 Single Chip Microcomputer](/img/90/4de927e797ec9c2bb70e507392bed0.jpg)
[untitled] proteus simulation of traffic lights based on 89C51 Single Chip Microcomputer

Comment la base de données mémoire joue - t - elle l'avantage de la mémoire?

要選擇那種語言為單片機編寫程序呢

For new students, if you have no contact with single-chip microcomputer, it is recommended to get started with 51 single-chip microcomputer

openEuler kernel 技术分享 - 第1期 - kdump 基本原理、使用及案例介绍
随机推荐
LeetCode - 508. 出现次数最多的子树元素和 (二叉树的遍历)
Fundamentals of Electronic Technology (III)_ Integrated operational amplifier and its application__ Basic arithmetic circuit
(1) What is a lambda expression
I think all friends should know that the basic law of learning is: from easy to difficult
A lottery like scissors, stone and cloth (C language)
Oracle database SQL statement execution plan, statement tracking and optimization instance
2020-08-23
Project cost management__ Topic of comprehensive calculation
Installation and removal of MySQL under Windows
应用最广泛的8位单片机当然也是初学者们最容易上手学习的单片机
QT is a method of batch modifying the style of a certain type of control after naming the control
2.Elment Ui 日期选择器 格式化问题
Working mode of 80C51 Serial Port
Notes on C language learning of migrant workers majoring in electronic information engineering
Serial port programming
Of course, the most widely used 8-bit single chip microcomputer is also the single chip microcomputer that beginners are most easy to learn
For new students, if you have no contact with single-chip microcomputer, it is recommended to get started with 51 single-chip microcomputer
Emballage automatique et déballage compris? Quel est le principe?
ADS simulation design of class AB RF power amplifier
2020-08-23