static control: STN_ENABLE and STN_DISABLE notifications.

This commit is contained in:
Michael Kaufmann 2006-01-17 16:06:41 +01:00 committed by Alexandre Julliard
parent 2b8cda7162
commit 2ddbc7b6e0

View file

@ -31,10 +31,6 @@
* Styles
* - SS_RIGHTJUST
*
* Notifications
* - STN_DISABLE
* - STN_ENABLE
*
* Messages
* - STM_SETIMAGE: IMAGE_CURSOR
*/
@ -391,7 +387,17 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
break;
case WM_ENABLE:
InvalidateRect(hwnd, NULL, TRUE);
STATIC_TryPaintFcn( hwnd, full_style );
if (full_style & SS_NOTIFY) {
if (wParam) {
SendMessageW( GetParent(hwnd), WM_COMMAND,
MAKEWPARAM( GetWindowLongPtrW(hwnd,GWLP_ID), STN_ENABLE ), (LPARAM)hwnd);
}
else {
SendMessageW( GetParent(hwnd), WM_COMMAND,
MAKEWPARAM( GetWindowLongPtrW(hwnd,GWLP_ID), STN_DISABLE ), (LPARAM)hwnd);
}
}
break;
case WM_SYSCOLORCHANGE: