user32: Duplicate DIALOG_Enable/DisableOwner implementation on the 16-bit side.
This commit is contained in:
parent
780ae3a6e4
commit
7f11441af9
|
@ -240,8 +240,6 @@ typedef struct tagDIALOGINFO
|
|||
#define DF_OWNERENABLED 0x0002
|
||||
|
||||
extern DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create ) DECLSPEC_HIDDEN;
|
||||
extern void DIALOG_EnableOwner( HWND hOwner ) DECLSPEC_HIDDEN;
|
||||
extern BOOL DIALOG_DisableOwner( HWND hOwner ) DECLSPEC_HIDDEN;
|
||||
extern INT DIALOG_DoDialogBox( HWND hwnd, HWND owner ) DECLSPEC_HIDDEN;
|
||||
|
||||
#endif /* __WINE_CONTROLS_H */
|
||||
|
|
|
@ -109,7 +109,7 @@ const struct builtin_class_descr DIALOG_builtin_class =
|
|||
* Helper function for modal dialogs to enable again the
|
||||
* owner of the dialog box.
|
||||
*/
|
||||
void DIALOG_EnableOwner( HWND hOwner )
|
||||
static void DIALOG_EnableOwner( HWND hOwner )
|
||||
{
|
||||
/* Owner must be a top-level window */
|
||||
if (hOwner)
|
||||
|
@ -125,7 +125,7 @@ void DIALOG_EnableOwner( HWND hOwner )
|
|||
* Helper function for modal dialogs to disable the
|
||||
* owner of the dialog box. Returns TRUE if owner was enabled.
|
||||
*/
|
||||
BOOL DIALOG_DisableOwner( HWND hOwner )
|
||||
static BOOL DIALOG_DisableOwner( HWND hOwner )
|
||||
{
|
||||
/* Owner must be a top-level window */
|
||||
if (hOwner)
|
||||
|
|
|
@ -65,6 +65,44 @@ typedef struct
|
|||
} DLG_TEMPLATE;
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DIALOG_EnableOwner
|
||||
*
|
||||
* Helper function for modal dialogs to enable again the
|
||||
* owner of the dialog box.
|
||||
*/
|
||||
static void DIALOG_EnableOwner( HWND hOwner )
|
||||
{
|
||||
/* Owner must be a top-level window */
|
||||
if (hOwner)
|
||||
hOwner = GetAncestor( hOwner, GA_ROOT );
|
||||
if (!hOwner) return;
|
||||
EnableWindow( hOwner, TRUE );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DIALOG_DisableOwner
|
||||
*
|
||||
* Helper function for modal dialogs to disable the
|
||||
* owner of the dialog box. Returns TRUE if owner was enabled.
|
||||
*/
|
||||
static BOOL DIALOG_DisableOwner( HWND hOwner )
|
||||
{
|
||||
/* Owner must be a top-level window */
|
||||
if (hOwner)
|
||||
hOwner = GetAncestor( hOwner, GA_ROOT );
|
||||
if (!hOwner) return FALSE;
|
||||
if (IsWindowEnabled( hOwner ))
|
||||
{
|
||||
EnableWindow( hOwner, FALSE );
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DIALOG_GetControl16
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue