Author Topic: Query pos. data of a minimized window  (Read 5026 times)

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Query pos. data of a minimized window
« on: November 01, 2022, 08:51:20 pm »
Background: NEPMD supports save and restore of an EPM window. In the svn version I've even implemented to save and restore multiple EPM windows, but that doesn't matter.

That works with visible windows via WinQueryWindowPos (see NepmdQueryWindowPos in nepmdlib.c, line 1896) and WinSetWindowPos. (EPM is able to use C functions and window messages.)

Now I have a problem with minimized EPM windows. They open left bottom with small size, probably centered on 0, 0.

How can I query the pos. data for a minimized window and then also the minimized or maxmized state? (BTW: I found how to make minimized windows topmost, line 3688.)

OK, my own code for MakeWindowTopMost contains how to query the minimized state. It calls WinQueryWindowULong with QWL_STYLE. That one seems to be solved.
« Last Edit: November 01, 2022, 10:13:37 pm by Andreas Schnellbacher »

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: Query pos. data of a minimized window
« Reply #1 on: November 01, 2022, 10:59:59 pm »
WinQueryWindowUShort:
QWS_XRESTORE
QWS_YRESTORE
QWS_CXRESTORE
QWS_CYRESTORE

and you might have to force these values with WinSetWindowUShort on minimization, I am not sure.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Query pos. data of a minimized window
« Reply #2 on: November 02, 2022, 01:15:37 am »
Thanks, I'll try.