View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Thu Dec 31, 2015 12:13 am Post subject: Minimise an open Window |
|
|
I would like to programmatically minimise a window I have created. I do not see any specific function to do this.
Is there one, or will I have to use WiN32API calls to accomplish that?
I'm looking to minimise the status window that opens for you automatically when the WINAPP starts. I have created the window , but putting [minimise] as a %ww option doesn't cause the window to be minimised from the start.
I already have a handle to the window. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu Dec 31, 2015 10:10 am Post subject: |
|
|
Try calling ShowWindow(hwnd, SW_SHOWMINIMIZED) with SW_SHOWMINIMIZED = 2. The interface for ShowWindow can be found for example in WIN32API.INS. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu Dec 31, 2015 1:39 pm Post subject: |
|
|
... and probably the call needs to go into the callback for %sc so that the window is fully formed before it is minimsed. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Thu Dec 31, 2015 4:05 pm Post subject: |
|
|
Thanks, Paul! This was what I was looking for.
Eddie, the callback via %sc was not needed. That said, I will keep it in mind if I run into some asynchronicity issues.
Bill |
|
Back to top |
|
|
|