WM_MINIMIZE abfangen
-
Hallo Leute,
Kann mir mal bitte einer Helfen ???
Mit der Suche habe ich nicht ganz das gefunden was ich möchte !!Ich möchte das wenn mein Dialog die Message WM_MINIMIZE sendet das das Programm nicht minimiert wird sonder die Methode OnMinimiren() aufgerufen wird !!
Danke für die Hilfe
Coolsero
-
die message heisst WM_WINDOWPOSCHANGED.
MSDN
CWnd::OnWindowPosChanged See Also
CWnd Overview | Class Members | Hierarchy Chart | WM_WINDOWPOSCHANGED
The framework calls this member function when the size, position, or Z-order has changed as a result of a call to the SetWindowPos member function or another window-management function.afx_msg void OnWindowPosChanged(
WINDOWPOS* lpwndpos
);
Parameters
lpwndpos
Points to a WINDOWPOS data structure that contains information about the window's new size and position.
Remarks
The default implementation sends the WM_SIZE and WM_MOVE messages to the window. These messages are not sent if an application handles the OnWindowPosChanged call without calling its base class. It is more efficient to perform any move or size change processing during the call to OnWindowPosChanged without calling its base class.Note This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.
darin kannst du über WM_SIZE
MSDN
WM_SIZE Notification
--------------------------------------------------------------------------------
The WM_SIZE message is sent to a window after its size has changed.
A window receives this message through its WindowProc function.
Syntax
WM_SIZE
WPARAM wParam
LPARAM lParam;Parameters
wParam
Specifies the type of resizing requested. This parameter can be one of the following values.
SIZE_MAXHIDE
Message is sent to all pop-up windows when some other window is maximized.
SIZE_MAXIMIZED
The window has been maximized.
SIZE_MAXSHOW
Message is sent to all pop-up windows when some other window has been restored to its former size.
SIZE_MINIMIZED
The window has been minimized.
SIZE_RESTORED
The window has been resized, but neither the SIZE_MINIMIZED nor SIZE_MAXIMIZED value applies.
lParam
The low-order word of lParam specifies the new width of the client area.
The high-order word of lParam specifies the new height of the client area.SIZE_MAXIMIZED abfragen.
-
Sorry alex-t,
So was habe ich auch schon alles beim Suchen gefunden doch bis jetzt werde ich da einfach nicht schlau draus !!
Kann mir einer weiterhelfen mit nem bissel Code ????
Danke Coolsero
-
Alternativ auch:
WM_SYSCOMMAND und wParam dann SC_MINIMIZE
-
dEUs schrieb:
Alternativ auch:
WM_SYSCOMMAND und wParam dann SC_MINIMIZEstimmt!
füge das in der OnSysCommand(UINT nID, LPARAM lParam) methode ein.if (nID == SC_MINIMIZE) { //deine aktion }
damit kommst du auf jeden fall weiter. gerade getestet.
-
alex-t schrieb:
stimmt!
Natürlich! :p
-
Danke leute,
Es funst