Commit 7f11441a authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Duplicate DIALOG_Enable/DisableOwner implementation on the 16-bit side.

parent 780ae3a6
......@@ -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)
......
......@@ -66,6 +66,44 @@ typedef struct
/***********************************************************************
* 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
*
* Return the class and text of the control pointed to by ptr,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment