background:
- a form that is maximized to not cover the taskbar, it will resize using:
to know where the taskbar is located and to not cover it.
- now, if I move the taskbar to the left side, I get a "paint" notification, and thats enough to call the function again to place the form from the right taskbar position.
but the problem is when I move back the taskbar to the bottom, I dont get any "paint" notification (or resize) or anything that would tell me something is happening, and the form will still "believe" the taskbar is on the left side.
I dont like the idea to monitoring Shell_TrayWnd with a timer, is there something else we could do?
subclassing? right now Im subclassing the mousewheel, so if its possible using subclassing I can just add something there, but not sure what. maybe form displacement?
- a form that is maximized to not cover the taskbar, it will resize using:
Code:
hwnd = FindWindow("Shell_TrayWnd", "")
GetWindowRect hwnd, rect
- now, if I move the taskbar to the left side, I get a "paint" notification, and thats enough to call the function again to place the form from the right taskbar position.
but the problem is when I move back the taskbar to the bottom, I dont get any "paint" notification (or resize) or anything that would tell me something is happening, and the form will still "believe" the taskbar is on the left side.
I dont like the idea to monitoring Shell_TrayWnd with a timer, is there something else we could do?
subclassing? right now Im subclassing the mousewheel, so if its possible using subclassing I can just add something there, but not sure what. maybe form displacement?