// showing the dialogs
// ----------------------------------------------------------------------------
-wxWindow *wxDialog::FindSuitableParent() const
-{
- // first try to use the currently active window
- HWND hwndFg = ::GetForegroundWindow();
- wxWindow *parent = hwndFg ? wxFindWinFromHandle((WXHWND)hwndFg)
- : NULL;
- if ( !parent )
- {
- // next try the main app window
- parent = wxTheApp->GetTopWindow();
- }
-
- // finally, check if the parent we found is really suitable
- if ( !parent || parent == (wxWindow *)this || !parent->IsShown() )
- {
- // don't use this one
- parent = NULL;
- }
-
- return parent;
-}
-
bool wxDialog::Show(bool show)
{
if ( show == IsShown() )
// show dialog modally
int wxDialog::ShowModal()
{
- wxASSERT_MSG( !IsModal(), _T("ShowModal() can't be called twice") );
+ wxASSERT_MSG( !IsModal(), wxT("ShowModal() can't be called twice") );
Show();
void wxDialog::EndModal(int retCode)
{
- wxASSERT_MSG( IsModal(), _T("EndModal() called for non modal dialog") );
+ wxASSERT_MSG( IsModal(), wxT("EndModal() called for non modal dialog") );
SetReturnCode(retCode);
// have been called yet)
wxASSERT_MSG( !IsShown() ||
::GetWindow((HWND)m_hGripper, GW_HWNDNEXT) == 0,
- _T("Bug in wxWidgets: gripper should be at the bottom of Z-order") );
+ wxT("Bug in wxWidgets: gripper should be at the bottom of Z-order") );
::DestroyWindow((HWND) m_hGripper);
m_hGripper = 0;
}
void wxDialog::ShowGripper(bool show)
{
- wxASSERT_MSG( m_hGripper, _T("shouldn't be called if we have no gripper") );
+ wxASSERT_MSG( m_hGripper, wxT("shouldn't be called if we have no gripper") );
if ( show )
ResizeGripper();
void wxDialog::ResizeGripper()
{
- wxASSERT_MSG( m_hGripper, _T("shouldn't be called if we have no gripper") );
+ wxASSERT_MSG( m_hGripper, wxT("shouldn't be called if we have no gripper") );
HWND hwndGripper = (HWND)m_hGripper;