1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
24 #include <vcl/svapp.hxx>
26 #include <win/wincomp.hxx>
27 #include <win/saldata.hxx>
28 #include <win/salinst.h>
29 #include <win/salframe.h>
30 #include <win/salobj.h>
32 #include <comphelper/windowserrorstring.hxx>
34 static bool ImplIsSysWindowOrChild( HWND hWndParent
, HWND hWndChild
)
36 if ( hWndParent
== hWndChild
)
39 HWND hTempWnd
= ::GetParent( hWndChild
);
42 // stop searching if not a child window
43 if ( !(GetWindowStyle( hTempWnd
) & WS_CHILD
) )
45 if ( hTempWnd
== hWndParent
)
47 hTempWnd
= ::GetParent( hTempWnd
);
53 WinSalObject
* ImplFindSalObject( HWND hWndChild
)
55 SalData
* pSalData
= GetSalData();
56 WinSalObject
* pObject
= pSalData
->mpFirstObject
;
59 if ( ImplIsSysWindowOrChild( pObject
->mhWndChild
, hWndChild
) )
62 pObject
= pObject
->mpNextObject
;
68 WinSalFrame
* ImplFindSalObjectFrame( HWND hWnd
)
70 WinSalFrame
* pFrame
= nullptr;
71 WinSalObject
* pObject
= ImplFindSalObject( hWnd
);
74 // find matching frame
75 HWND hWnd2
= ::GetParent( pObject
->mhWnd
);
76 pFrame
= GetSalData()->mpFirstFrame
;
79 if ( pFrame
->mhWnd
== hWnd2
)
82 pFrame
= pFrame
->mpNextFrame
;
89 LRESULT CALLBACK
SalSysMsgProc( int nCode
, WPARAM wParam
, LPARAM lParam
)
91 // Used for Unicode and none Unicode
92 SalData
* pSalData
= GetSalData();
94 if ( (nCode
>= 0) && lParam
)
96 CWPSTRUCT
* pData
= reinterpret_cast<CWPSTRUCT
*>(lParam
);
97 if ( (pData
->message
!= WM_KEYDOWN
) &&
98 (pData
->message
!= WM_KEYUP
) )
99 pSalData
->mnSalObjWantKeyEvt
= 0;
102 // check if we need to process data for a SalObject-window
103 WinSalObject
* pObject
;
104 if ( pData
->message
== WM_SETFOCUS
)
106 pObject
= ImplFindSalObject( pData
->hwnd
);
109 pObject
->mhLastFocusWnd
= pData
->hwnd
;
110 if ( ImplSalYieldMutexTryToAcquire() )
112 pObject
->CallCallback( SalObjEvent::GetFocus
);
113 ImplSalYieldMutexRelease();
117 BOOL
const ret
= PostMessageW(pObject
->mhWnd
, SALOBJ_MSG_POSTFOCUS
, 0, 0);
118 SAL_WARN_IF(0 == ret
, "vcl", "ERROR: PostMessage() failed!");
122 else if ( pData
->message
== WM_KILLFOCUS
)
124 pObject
= ImplFindSalObject( pData
->hwnd
);
125 if ( pObject
&& !ImplFindSalObject( reinterpret_cast<HWND
>(pData
->wParam
) ) )
127 // only call LoseFocus, if truly no child window gets the focus
128 if ( !pData
->wParam
|| !ImplFindSalObject( reinterpret_cast<HWND
>(pData
->wParam
) ) )
130 if ( ImplSalYieldMutexTryToAcquire() )
132 pObject
->CallCallback( SalObjEvent::LoseFocus
);
133 ImplSalYieldMutexRelease();
137 BOOL
const ret
= PostMessageW(pObject
->mhWnd
, SALOBJ_MSG_POSTFOCUS
, 0, 0);
138 SAL_WARN_IF(0 == ret
, "vcl", "ERROR: PostMessage() failed!");
142 pObject
->mhLastFocusWnd
= reinterpret_cast<HWND
>(pData
->wParam
);
147 return CallNextHookEx( pSalData
->mhSalObjMsgHook
, nCode
, wParam
, lParam
);
150 bool ImplSalPreDispatchMsg( const MSG
* pMsg
)
152 // Used for Unicode and none Unicode
153 SalData
* pSalData
= GetSalData();
154 WinSalObject
* pObject
;
156 if ( (pMsg
->message
== WM_LBUTTONDOWN
) ||
157 (pMsg
->message
== WM_RBUTTONDOWN
) ||
158 (pMsg
->message
== WM_MBUTTONDOWN
) )
160 ImplSalYieldMutexAcquireWithWait();
161 pObject
= ImplFindSalObject( pMsg
->hwnd
);
162 if ( pObject
&& !pObject
->IsMouseTransparent() )
164 BOOL
const ret
= PostMessageW(pObject
->mhWnd
, SALOBJ_MSG_TOTOP
, 0, 0);
165 SAL_WARN_IF(0 == ret
, "vcl", "ERROR: PostMessage() failed!");
167 ImplSalYieldMutexRelease();
170 if ( (pMsg
->message
== WM_KEYDOWN
) ||
171 (pMsg
->message
== WM_KEYUP
) )
173 // process KeyEvents even if the control does not process them itself
174 // SysKeys are processed as WM_SYSCOMMAND
175 // Char-Events are not processed, as they are not accelerator-relevant
176 bool bWantedKeyCode
= FALSE
;
177 // A-Z, 0-9 only when combined with the Control-key
178 if ( ((pMsg
->wParam
>= 65) && (pMsg
->wParam
<= 90)) ||
179 ((pMsg
->wParam
>= 48) && (pMsg
->wParam
<= 57)) )
181 if ( GetKeyState( VK_CONTROL
) & 0x8000 )
182 bWantedKeyCode
= TRUE
;
184 else if ( ((pMsg
->wParam
>= VK_F1
) && (pMsg
->wParam
<= VK_F24
)) ||
185 ((pMsg
->wParam
>= VK_SPACE
) && (pMsg
->wParam
<= VK_HELP
)) ||
186 (pMsg
->wParam
== VK_BACK
) || (pMsg
->wParam
== VK_TAB
) ||
187 (pMsg
->wParam
== VK_CLEAR
) || (pMsg
->wParam
== VK_RETURN
) ||
188 (pMsg
->wParam
== VK_ESCAPE
) )
189 bWantedKeyCode
= TRUE
;
190 if ( bWantedKeyCode
)
192 ImplSalYieldMutexAcquireWithWait();
193 pObject
= ImplFindSalObject( pMsg
->hwnd
);
195 pSalData
->mnSalObjWantKeyEvt
= pMsg
->wParam
;
196 ImplSalYieldMutexRelease();
199 // check WM_SYSCHAR, to activate menu with Alt key
200 else if ( pMsg
->message
== WM_SYSCHAR
)
202 pSalData
->mnSalObjWantKeyEvt
= 0;
204 sal_uInt16 nKeyCode
= LOWORD( pMsg
->wParam
);
206 if ( ((nKeyCode
>= 48) && (nKeyCode
<= 57)) ||
207 ((nKeyCode
>= 65) && (nKeyCode
<= 90)) ||
208 ((nKeyCode
>= 97) && (nKeyCode
<= 122)) )
211 ImplSalYieldMutexAcquireWithWait();
212 pObject
= ImplFindSalObject( pMsg
->hwnd
);
215 if ( pMsg
->hwnd
== ::GetFocus() )
217 WinSalFrame
* pFrame
= ImplFindSalObjectFrame( pMsg
->hwnd
);
220 if ( ImplHandleSalObjSysCharMsg( pFrame
->mhWnd
, pMsg
->wParam
, pMsg
->lParam
) )
225 ImplSalYieldMutexRelease();
231 pSalData
->mnSalObjWantKeyEvt
= 0;
236 void ImplSalPostDispatchMsg( const MSG
* pMsg
)
238 // Used for Unicode and none Unicode
239 SalData
*pSalData
= GetSalData();
241 if ( (pMsg
->message
== WM_KEYDOWN
) || (pMsg
->message
== WM_KEYUP
) )
243 if ( pSalData
->mnSalObjWantKeyEvt
== pMsg
->wParam
)
245 pSalData
->mnSalObjWantKeyEvt
= 0;
246 if ( pMsg
->hwnd
== ::GetFocus() )
248 ImplSalYieldMutexAcquireWithWait();
249 WinSalFrame
* pFrame
= ImplFindSalObjectFrame( pMsg
->hwnd
);
251 ImplHandleSalObjKeyMsg( pFrame
->mhWnd
, pMsg
->message
, pMsg
->wParam
, pMsg
->lParam
);
252 ImplSalYieldMutexRelease();
257 pSalData
->mnSalObjWantKeyEvt
= 0;
260 LRESULT CALLBACK
SalSysObjWndProc( HWND hWnd
, UINT nMsg
, WPARAM wParam
, LPARAM lParam
, int& rDef
)
262 WinSalObject
* pSysObj
;
274 BeginPaint( hWnd
, &aPs
);
275 EndPaint( hWnd
, &aPs
);
280 case WM_PARENTNOTIFY
:
282 UINT nNotifyMsg
= LOWORD( wParam
);
283 if ( (nNotifyMsg
== WM_LBUTTONDOWN
) ||
284 (nNotifyMsg
== WM_RBUTTONDOWN
) ||
285 (nNotifyMsg
== WM_MBUTTONDOWN
) )
287 ImplSalYieldMutexAcquireWithWait();
288 pSysObj
= GetSalObjWindowPtr( hWnd
);
289 if ( pSysObj
&& !pSysObj
->IsMouseTransparent() )
290 pSysObj
->CallCallback( SalObjEvent::ToTop
);
291 ImplSalYieldMutexRelease();
296 case WM_MOUSEACTIVATE
:
298 ImplSalYieldMutexAcquireWithWait();
299 pSysObj
= GetSalObjWindowPtr( hWnd
);
300 if ( pSysObj
&& !pSysObj
->IsMouseTransparent() )
302 BOOL
const ret
= PostMessageW( hWnd
, SALOBJ_MSG_TOTOP
, 0, 0 );
303 SAL_WARN_IF(0 == ret
, "vcl", "ERROR: PostMessage() failed!");
305 ImplSalYieldMutexRelease();
309 case SALOBJ_MSG_TOTOP
:
310 if ( ImplSalYieldMutexTryToAcquire() )
312 pSysObj
= GetSalObjWindowPtr( hWnd
);
313 pSysObj
->CallCallback( SalObjEvent::ToTop
);
314 ImplSalYieldMutexRelease();
319 BOOL
const ret
= PostMessageW( hWnd
, SALOBJ_MSG_TOTOP
, 0, 0 );
320 SAL_WARN_IF(0 == ret
, "vcl", "ERROR: PostMessage() failed!");
324 case SALOBJ_MSG_POSTFOCUS
:
325 if ( ImplSalYieldMutexTryToAcquire() )
327 pSysObj
= GetSalObjWindowPtr( hWnd
);
328 HWND hFocusWnd
= ::GetFocus();
330 if ( hFocusWnd
&& ImplIsSysWindowOrChild( hWnd
, hFocusWnd
) )
331 nEvent
= SalObjEvent::GetFocus
;
333 nEvent
= SalObjEvent::LoseFocus
;
334 pSysObj
->CallCallback( nEvent
);
335 ImplSalYieldMutexRelease();
339 BOOL
const ret
= PostMessageW(hWnd
, SALOBJ_MSG_POSTFOCUS
, 0, 0);
340 SAL_WARN_IF(0 == ret
, "vcl", "ERROR: PostMessage() failed!");
347 HWND hWndChild
= GetWindow( hWnd
, GW_CHILD
);
350 SetWindowPos( hWndChild
,
351 nullptr, 0, 0, static_cast<int>(LOWORD( lParam
)), static_cast<int>(HIWORD( lParam
)),
352 SWP_NOZORDER
| SWP_NOACTIVATE
);
360 // Save the window instance at the window handle.
361 // Can also be used for the A-Version, because the struct
362 // to access lpCreateParams is the same structure
363 CREATESTRUCTW
* pStruct
= reinterpret_cast<CREATESTRUCTW
*>(lParam
);
364 pSysObj
= static_cast<WinSalObject
*>(pStruct
->lpCreateParams
);
365 SetSalObjWindowPtr( hWnd
, pSysObj
);
366 // set HWND already here,
367 // as instance data might be used during CreateWindow() events
368 pSysObj
->mhWnd
= hWnd
;
377 LRESULT CALLBACK
SalSysObjWndProcW( HWND hWnd
, UINT nMsg
, WPARAM wParam
, LPARAM lParam
)
380 LRESULT nRet
= SalSysObjWndProc( hWnd
, nMsg
, wParam
, lParam
, bDef
);
382 nRet
= DefWindowProcW( hWnd
, nMsg
, wParam
, lParam
);
386 LRESULT CALLBACK
SalSysObjChildWndProc( HWND hWnd
, UINT nMsg
, WPARAM wParam
, LPARAM lParam
, int& rDef
)
392 // clear background for plugins
395 WinSalObject
* pSysObj
= GetSalObjWindowPtr( ::GetParent( hWnd
) );
397 if( pSysObj
&& !pSysObj
->IsEraseBackgroundEnabled() )
399 // do not erase background
409 BeginPaint( hWnd
, &aPs
);
410 EndPaint( hWnd
, &aPs
);
423 WinSalObject
* pSysObj
;
424 pSysObj
= GetSalObjWindowPtr( ::GetParent( hWnd
) );
426 if( pSysObj
&& pSysObj
->IsMouseTransparent() )
428 // forward mouse events to parent frame
429 HWND hWndParent
= ::GetParent( pSysObj
->mhWnd
);
431 // transform coordinates
433 pt
.x
= static_cast<long>(LOWORD( lParam
));
434 pt
.y
= static_cast<long>(HIWORD( lParam
));
435 MapWindowPoints( hWnd
, hWndParent
, &pt
, 1 );
436 lParam
= MAKELPARAM( static_cast<WORD
>(pt
.x
), static_cast<WORD
>(pt
.y
) );
438 nRet
= SendMessageW( hWndParent
, nMsg
, wParam
, lParam
);
448 LRESULT CALLBACK
SalSysObjChildWndProcW( HWND hWnd
, UINT nMsg
, WPARAM wParam
, LPARAM lParam
)
451 LRESULT nRet
= SalSysObjChildWndProc( hWnd
, nMsg
, wParam
, lParam
, bDef
);
453 nRet
= DefWindowProcW( hWnd
, nMsg
, wParam
, lParam
);
457 SalObject
* ImplSalCreateObject( WinSalInstance
* pInst
, WinSalFrame
* pParent
)
459 SalData
* pSalData
= GetSalData();
461 // install hook, if it is the first SalObject
462 if ( !pSalData
->mpFirstObject
)
464 pSalData
->mhSalObjMsgHook
= SetWindowsHookExW( WH_CALLWNDPROC
,
467 pSalData
->mnAppThreadId
);
470 if ( !pSalData
->mbObjClassInit
)
472 WNDCLASSEXW aWndClassEx
;
473 aWndClassEx
.cbSize
= sizeof( aWndClassEx
);
474 aWndClassEx
.style
= 0;
475 aWndClassEx
.lpfnWndProc
= SalSysObjWndProcW
;
476 aWndClassEx
.cbClsExtra
= 0;
477 aWndClassEx
.cbWndExtra
= SAL_OBJECT_WNDEXTRA
;
478 aWndClassEx
.hInstance
= pSalData
->mhInst
;
479 aWndClassEx
.hIcon
= nullptr;
480 aWndClassEx
.hIconSm
= nullptr;
481 aWndClassEx
.hCursor
= LoadCursor( nullptr, IDC_ARROW
);
482 aWndClassEx
.hbrBackground
= nullptr;
483 aWndClassEx
.lpszMenuName
= nullptr;
484 aWndClassEx
.lpszClassName
= SAL_OBJECT_CLASSNAMEW
;
485 if ( RegisterClassExW( &aWndClassEx
) )
487 // Clean background first because of plugins.
488 aWndClassEx
.cbWndExtra
= 0;
489 aWndClassEx
.hbrBackground
= reinterpret_cast<HBRUSH
>(COLOR_WINDOW
+1);
490 aWndClassEx
.lpfnWndProc
= SalSysObjChildWndProcW
;
491 aWndClassEx
.lpszClassName
= SAL_OBJECT_CHILDCLASSNAMEW
;
492 if ( RegisterClassExW( &aWndClassEx
) )
493 pSalData
->mbObjClassInit
= true;
497 if ( pSalData
->mbObjClassInit
)
499 WinSalObject
* pObject
= new WinSalObject
;
501 // #135235# Clip siblings of this
502 // SystemChildWindow. Otherwise, DXCanvas (using a hidden
503 // SystemChildWindow) clobbers applets/plugins during
505 HWND hWnd
= CreateWindowExW( 0, SAL_OBJECT_CLASSNAMEW
, L
"",
506 WS_CHILD
| WS_CLIPSIBLINGS
, 0, 0, 0, 0,
507 pParent
->mhWnd
, nullptr,
508 pInst
->mhInst
, pObject
);
510 HWND hWndChild
= nullptr;
513 // #135235# Explicitly stack SystemChildWindows in
514 // the order they're created - since there's no notion
516 SetWindowPos(hWnd
,HWND_TOP
,0,0,0,0,
517 SWP_NOACTIVATE
|SWP_NOMOVE
|SWP_NOREDRAW
|SWP_NOSIZE
);
518 hWndChild
= CreateWindowExW( 0, SAL_OBJECT_CHILDCLASSNAMEW
, L
"",
519 WS_CHILD
| WS_CLIPCHILDREN
| WS_CLIPSIBLINGS
| WS_VISIBLE
,
522 pInst
->mhInst
, nullptr );
527 SAL_WARN("vcl", "CreateWindowExW failed: " << WindowsErrorString(GetLastError()));
535 pObject
->mhWnd
= hWnd
;
536 pObject
->mhWndChild
= hWndChild
;
537 pObject
->maSysData
.hWnd
= hWndChild
;
545 WinSalObject::WinSalObject()
547 SalData
* pSalData
= GetSalData();
550 mhWndChild
= nullptr;
551 mhLastFocusWnd
= nullptr;
552 maSysData
.nSize
= sizeof( SystemEnvData
);
553 mpStdClipRgnData
= nullptr;
555 // Insert object in objectlist
556 mpNextObject
= pSalData
->mpFirstObject
;
557 pSalData
->mpFirstObject
= this;
560 WinSalObject::~WinSalObject()
562 SalData
* pSalData
= GetSalData();
564 // remove frame from framelist
565 if ( this == pSalData
->mpFirstObject
)
567 pSalData
->mpFirstObject
= mpNextObject
;
569 // remove hook, if it is the last SalObject
570 if ( !pSalData
->mpFirstObject
)
571 UnhookWindowsHookEx( pSalData
->mhSalObjMsgHook
);
575 WinSalObject
* pTempObject
= pSalData
->mpFirstObject
;
576 while ( pTempObject
->mpNextObject
!= this )
577 pTempObject
= pTempObject
->mpNextObject
;
579 pTempObject
->mpNextObject
= mpNextObject
;
582 // destroy cache data
583 delete [] reinterpret_cast<BYTE
*>(mpStdClipRgnData
);
585 HWND hWndParent
= ::GetParent( mhWnd
);
588 DestroyWindow( mhWndChild
);
590 DestroyWindow( mhWnd
);
592 // reset palette, if no external child window is left,
593 // as they might have overwritten our palette
595 ::GetActiveWindow() == hWndParent
&&
596 !GetWindow( hWndParent
, GW_CHILD
) )
597 SendMessageW( hWndParent
, SAL_MSG_FORCEPALETTE
, 0, 0 );
600 void WinSalObject::ResetClipRegion()
602 SetWindowRgn( mhWnd
, nullptr, TRUE
);
605 void WinSalObject::BeginSetClipRegion( sal_uLong nRectCount
)
607 sal_uLong nRectBufSize
= sizeof(RECT
)*nRectCount
;
608 if ( nRectCount
< SAL_CLIPRECT_COUNT
)
610 if ( !mpStdClipRgnData
)
611 mpStdClipRgnData
= reinterpret_cast<RGNDATA
*>(new BYTE
[sizeof(RGNDATA
)-1+(SAL_CLIPRECT_COUNT
*sizeof(RECT
))]);
612 mpClipRgnData
= mpStdClipRgnData
;
615 mpClipRgnData
= reinterpret_cast<RGNDATA
*>(new BYTE
[sizeof(RGNDATA
)-1+nRectBufSize
]);
616 mpClipRgnData
->rdh
.dwSize
= sizeof( RGNDATAHEADER
);
617 mpClipRgnData
->rdh
.iType
= RDH_RECTANGLES
;
618 mpClipRgnData
->rdh
.nCount
= nRectCount
;
619 mpClipRgnData
->rdh
.nRgnSize
= nRectBufSize
;
620 SetRectEmpty( &(mpClipRgnData
->rdh
.rcBound
) );
621 mpNextClipRect
= reinterpret_cast<RECT
*>(&(mpClipRgnData
->Buffer
));
622 mbFirstClipRect
= TRUE
;
625 void WinSalObject::UnionClipRegion( long nX
, long nY
, long nWidth
, long nHeight
)
627 RECT
* pRect
= mpNextClipRect
;
628 RECT
* pBoundRect
= &(mpClipRgnData
->rdh
.rcBound
);
629 long nRight
= nX
+ nWidth
;
630 long nBottom
= nY
+ nHeight
;
632 if ( mbFirstClipRect
)
634 pBoundRect
->left
= nX
;
635 pBoundRect
->top
= nY
;
636 pBoundRect
->right
= nRight
;
637 pBoundRect
->bottom
= nBottom
;
638 mbFirstClipRect
= FALSE
;
642 if ( nX
< pBoundRect
->left
)
643 pBoundRect
->left
= static_cast<int>(nX
);
645 if ( nY
< pBoundRect
->top
)
646 pBoundRect
->top
= static_cast<int>(nY
);
648 if ( nRight
> pBoundRect
->right
)
649 pBoundRect
->right
= static_cast<int>(nRight
);
651 if ( nBottom
> pBoundRect
->bottom
)
652 pBoundRect
->bottom
= static_cast<int>(nBottom
);
655 pRect
->left
= static_cast<int>(nX
);
656 pRect
->top
= static_cast<int>(nY
);
657 pRect
->right
= static_cast<int>(nRight
);
658 pRect
->bottom
= static_cast<int>(nBottom
);
662 void WinSalObject::EndSetClipRegion()
666 // create a ClipRegion from the vcl::Region data
667 if ( mpClipRgnData
->rdh
.nCount
== 1 )
669 RECT
* pRect
= &(mpClipRgnData
->rdh
.rcBound
);
670 hRegion
= CreateRectRgn( pRect
->left
, pRect
->top
,
671 pRect
->right
, pRect
->bottom
);
675 sal_uLong nSize
= mpClipRgnData
->rdh
.nRgnSize
+sizeof(RGNDATAHEADER
);
676 hRegion
= ExtCreateRegion( nullptr, nSize
, mpClipRgnData
);
677 if ( mpClipRgnData
!= mpStdClipRgnData
)
678 delete [] reinterpret_cast<BYTE
*>(mpClipRgnData
);
681 SAL_WARN_IF( !hRegion
, "vcl", "SalObject::EndSetClipRegion() - Can't create ClipRegion" );
682 SetWindowRgn( mhWnd
, hRegion
, TRUE
);
685 void WinSalObject::SetPosSize( long nX
, long nY
, long nWidth
, long nHeight
)
687 sal_uLong nStyle
= 0;
688 bool bVisible
= (GetWindowStyle( mhWnd
) & WS_VISIBLE
) != 0;
691 ShowWindow( mhWnd
, SW_HIDE
);
692 nStyle
|= SWP_SHOWWINDOW
;
694 SetWindowPos( mhWnd
, nullptr,
695 static_cast<int>(nX
), static_cast<int>(nY
), static_cast<int>(nWidth
), static_cast<int>(nHeight
),
696 SWP_NOZORDER
| SWP_NOACTIVATE
| nStyle
);
699 void WinSalObject::Show( bool bVisible
)
702 ShowWindow( mhWnd
, SW_SHOWNORMAL
);
704 ShowWindow( mhWnd
, SW_HIDE
);
707 void WinSalObject::Enable( bool bEnable
)
709 EnableWindow( mhWnd
, bEnable
);
712 void WinSalObject::GrabFocus()
714 if ( mhLastFocusWnd
&&
715 IsWindow( mhLastFocusWnd
) &&
716 ImplIsSysWindowOrChild( mhWndChild
, mhLastFocusWnd
) )
717 ::SetFocus( mhLastFocusWnd
);
719 ::SetFocus( mhWndChild
);
722 const SystemEnvData
* WinSalObject::GetSystemData() const
727 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */