mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-24 10:19:01 +00:00
add min and max window support
This commit is contained in:
parent
b5f3ccb41f
commit
5c13636739
1 changed files with 18 additions and 0 deletions
|
|
@ -57,6 +57,24 @@ bool is_valid(){
|
|||
// return z;
|
||||
// }
|
||||
|
||||
#if defined(IS_WINDOWS)
|
||||
void win_min(HWND hwnd, bool state){
|
||||
if (state) {
|
||||
ShowWindow(hwnd, SW_MINIMIZE);
|
||||
} else {
|
||||
ShowWindow(hwnd, SW_RESTORE);
|
||||
}
|
||||
}
|
||||
|
||||
void win_max(HWND hwnd, bool state){
|
||||
if (state) {
|
||||
ShowWindow(hwnd, SW_MAXIMIZE);
|
||||
} else {
|
||||
ShowWindow(hwnd, SW_RESTORE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void close_window(void){
|
||||
CloseWin();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue