Multiple Monitor Support for remembering WindowPos
Posted: Fri Aug 27, 2010 9:50 pm
Hello.
I am trying to tweak the Remember Window Position by using a negative value for the X location SPX=. I have tried this in decimal and hex format, and also using the function you have to automatically remember the program location on the screen. It appears you are ignoring the X location if its negative and going with a default of like -3 or -5 X.
Can you please modify your code to the ACTUAL upper left X location of the coretemp app and write this to the config (on close) and modify your read of the config so I can have it startup on my second monitor (to my left) of the primary? Its a PITA that it doesn't remember the actual location.
Upper left of monitor to the left is -1920, upper right of monitor on the right is +1920. Hope you understand.
The best way for you to do this is to get the location of upper left X of the main window of Coretemp and STORE this, even if it is a negative value, and write that to the config. Then on read, load that as you are but DO NOT do a check for a negative value like you are and override it, and simply pass that to the Set window position function.
BOOL WINAPI SetWindowPos(
__in HWND hWnd,
__in_opt HWND hWndInsertAfter,
__in int X,
__in int Y,
__in int cx,
__in int cy,
__in UINT uFlags
);
X=-1920
Thanks.
Dustin
I am trying to tweak the Remember Window Position by using a negative value for the X location SPX=. I have tried this in decimal and hex format, and also using the function you have to automatically remember the program location on the screen. It appears you are ignoring the X location if its negative and going with a default of like -3 or -5 X.
Can you please modify your code to the ACTUAL upper left X location of the coretemp app and write this to the config (on close) and modify your read of the config so I can have it startup on my second monitor (to my left) of the primary? Its a PITA that it doesn't remember the actual location.
Upper left of monitor to the left is -1920, upper right of monitor on the right is +1920. Hope you understand.
The best way for you to do this is to get the location of upper left X of the main window of Coretemp and STORE this, even if it is a negative value, and write that to the config. Then on read, load that as you are but DO NOT do a check for a negative value like you are and override it, and simply pass that to the Set window position function.
BOOL WINAPI SetWindowPos(
__in HWND hWnd,
__in_opt HWND hWndInsertAfter,
__in int X,
__in int Y,
__in int cx,
__in int cy,
__in UINT uFlags
);
X=-1920
Thanks.
Dustin