I used spy++ to get this information:
WM_SHOWWINDOW fShow:True fuStatus:SW_PARENTOPENING.
Does anyone know how to convert this message into vb api call send message?
Printable View
I used spy++ to get this information:
WM_SHOWWINDOW fShow:True fuStatus:SW_PARENTOPENING.
Does anyone know how to convert this message into vb api call send message?
Those are messages sent via the SendMessage API, you need to look up these constants with your API viewer.
Good Luck
vb5, I realize that. I have sendmessage api declared, but I don't know what else to put in that sendmessage according to the above statement from spy++
- wParam
TRUE (nonzero) if the window is being shown, zero if it is being hidden.
- lParam
One of the following constants:
SW_OTHERUNZOOM: Indicates that the window is being uncovered because a maximize window
was restored or minimized.
SW_OTHERZOOM: Indicates that the window is being covered by another window that has been
maximized.
SW_PARENTCLOSING: Indicates that the parent window is being hidden or minimized.
SW_PARENTOPENING: Indicates that the parent window is being displayed.
So this is what I end up with:
SendMessage Hwnd, WM_SHOWWINDOW, 1, SW_PARENTOPENING
Is this correct?
It depends on what you want to do -- replicate the spy++ message?
Try it and see what happens!!
I am trying to do what the spy++ does in that piece of line.
Did you try it??
SendMessage Hwnd, WM_SHOWWINDOW, 1, SW_PARENTOPENING
Yes, tried this one but my window is still in minimized state :(
Per MSDN documentation
So, sending the message directly probably has no effect on actually showing the window. The window will most likely use this info for personal use, like maybe setting flags for example.Quote:
The WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown
See if this line of code helps. Maybe the window itself is trapping certain messages and handling them uniquely. Don't know why it would do that unless it custom drawing itself. The following will bypass the window (if it is subclassing) and send it directly to the window's default window procedure.
Speaking of subclassing, is the window subclassed? You can determine this from spy++ by looking at the general tab of the properties window:Code:Call DefWindowProc(hWnd, WM_SYSCOMMAND, SC_RESTORE, 0&)
Attachment 69754
Is hWnd is the hwnd of my window or of the system? How to get hwnd of the system?
hWnd is the window handle you are trying to restore from the tray.
Is there a way i can get the system hwnd?