mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-19 19:59:09 +00:00
hsMessageBoxWithOwner functions use hsWindowHndl
This commit is contained in:
@ -97,7 +97,7 @@ public:
|
|||||||
|
|
||||||
bool hsMessageBox_SuppressPrompts = false;
|
bool hsMessageBox_SuppressPrompts = false;
|
||||||
|
|
||||||
int hsMessageBoxWithOwner(void * owner, const char message[], const char caption[], int kind, int icon)
|
int hsMessageBoxWithOwner(hsWindowHndl owner, const char message[], const char caption[], int kind, int icon)
|
||||||
{
|
{
|
||||||
if (hsMessageBox_SuppressPrompts)
|
if (hsMessageBox_SuppressPrompts)
|
||||||
return hsMBoxOk;
|
return hsMBoxOk;
|
||||||
@ -132,7 +132,7 @@ int hsMessageBoxWithOwner(void * owner, const char message[], const char caption
|
|||||||
flags |= MB_ICONERROR;
|
flags |= MB_ICONERROR;
|
||||||
|
|
||||||
hsMinimizeClientGuard guard;
|
hsMinimizeClientGuard guard;
|
||||||
int ans = MessageBox((HWND)owner, message, caption, flags);
|
int ans = MessageBox(owner, message, caption, flags);
|
||||||
|
|
||||||
switch (ans)
|
switch (ans)
|
||||||
{
|
{
|
||||||
@ -149,7 +149,7 @@ int hsMessageBoxWithOwner(void * owner, const char message[], const char caption
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int hsMessageBoxWithOwner(void * owner, const wchar_t message[], const wchar_t caption[], int kind, int icon)
|
int hsMessageBoxWithOwner(hsWindowHndl owner, const wchar_t message[], const wchar_t caption[], int kind, int icon)
|
||||||
{
|
{
|
||||||
if (hsMessageBox_SuppressPrompts)
|
if (hsMessageBox_SuppressPrompts)
|
||||||
return hsMBoxOk;
|
return hsMBoxOk;
|
||||||
@ -184,7 +184,7 @@ int hsMessageBoxWithOwner(void * owner, const wchar_t message[], const wchar_t c
|
|||||||
flags |= MB_ICONERROR;
|
flags |= MB_ICONERROR;
|
||||||
|
|
||||||
hsMinimizeClientGuard guard;
|
hsMinimizeClientGuard guard;
|
||||||
int ans = MessageBoxW((HWND)owner, message, caption, flags);
|
int ans = MessageBoxW(owner, message, caption, flags);
|
||||||
|
|
||||||
switch (ans)
|
switch (ans)
|
||||||
{
|
{
|
||||||
@ -203,20 +203,12 @@ int hsMessageBoxWithOwner(void * owner, const wchar_t message[], const wchar_t c
|
|||||||
|
|
||||||
int hsMessageBox(const char message[], const char caption[], int kind, int icon)
|
int hsMessageBox(const char message[], const char caption[], int kind, int icon)
|
||||||
{
|
{
|
||||||
#if HS_BUILD_FOR_WIN32
|
return hsMessageBoxWithOwner((hsWindowHndl)nil,message,caption,kind,icon);
|
||||||
return hsMessageBoxWithOwner(nil/*GetActiveWindow()*/,message,caption,kind,icon);
|
|
||||||
#else
|
|
||||||
return hsMessageBoxWithOwner(nil,message,caption,kind,icon);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int hsMessageBox(const wchar_t message[], const wchar_t caption[], int kind, int icon)
|
int hsMessageBox(const wchar_t message[], const wchar_t caption[], int kind, int icon)
|
||||||
{
|
{
|
||||||
#if HS_BUILD_FOR_WIN32
|
return hsMessageBoxWithOwner((hsWindowHndl)nil,message,caption,kind,icon);
|
||||||
return hsMessageBoxWithOwner(nil/*GetActiveWindow()*/,message,caption,kind,icon);
|
|
||||||
#else
|
|
||||||
return hsMessageBoxWithOwner(nil,message,caption,kind,icon);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline hsBool hsCompare(float a, float b, float delta)
|
inline hsBool hsCompare(float a, float b, float delta)
|
||||||
|
@ -126,8 +126,8 @@ enum { // RETURN VALUES FROM hsMessageBox
|
|||||||
extern bool hsMessageBox_SuppressPrompts;
|
extern bool hsMessageBox_SuppressPrompts;
|
||||||
int hsMessageBox(const char message[], const char caption[], int kind, int icon=hsMessageBoxIconAsterisk);
|
int hsMessageBox(const char message[], const char caption[], int kind, int icon=hsMessageBoxIconAsterisk);
|
||||||
int hsMessageBox(const wchar_t message[], const wchar_t caption[], int kind, int icon=hsMessageBoxIconAsterisk);
|
int hsMessageBox(const wchar_t message[], const wchar_t caption[], int kind, int icon=hsMessageBoxIconAsterisk);
|
||||||
int hsMessageBoxWithOwner(void* owner, const char message[], const char caption[], int kind, int icon=hsMessageBoxIconAsterisk);
|
int hsMessageBoxWithOwner(hsWindowHndl owner, const char message[], const char caption[], int kind, int icon=hsMessageBoxIconAsterisk);
|
||||||
int hsMessageBoxWithOwner(void* owner, const wchar_t message[], const wchar_t caption[], int kind, int icon=hsMessageBoxIconAsterisk);
|
int hsMessageBoxWithOwner(hsWindowHndl owner, const wchar_t message[], const wchar_t caption[], int kind, int icon=hsMessageBoxIconAsterisk);
|
||||||
|
|
||||||
inline hsBool hsCompare(float a, float b, float delta=0.0001);
|
inline hsBool hsCompare(float a, float b, float delta=0.0001);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user