mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
add min and max window support
This commit is contained in:
parent
b5f3ccb41f
commit
5c13636739
@ -57,6 +57,24 @@ bool is_valid(){
|
|||||||
// return z;
|
// 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){
|
void close_window(void){
|
||||||
CloseWin();
|
CloseWin();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user