Click here to Skip to main content
15,909,242 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can chk Dialog box is open? Pin
Nibu babu thomas2-Feb-09 18:00
Nibu babu thomas2-Feb-09 18:00 
GeneralRe: How can chk Dialog box is open? Pin
Le@rner2-Feb-09 18:15
Le@rner2-Feb-09 18:15 
GeneralRe: How can chk Dialog box is open? Pin
Nibu babu thomas2-Feb-09 18:16
Nibu babu thomas2-Feb-09 18:16 
GeneralRe: How can chk Dialog box is open? Pin
Le@rner2-Feb-09 18:21
Le@rner2-Feb-09 18:21 
GeneralRe: How can chk Dialog box is open? Pin
Nibu babu thomas2-Feb-09 18:38
Nibu babu thomas2-Feb-09 18:38 
"_$h@nky_" wrote:
_AFXWIN_INLINE BOOL CWnd::IsWindowVisible() const
{ ASSERT(::IsWindow(m_hWnd)); return ::IsWindowVisible(m_hWnd); }


Call IsWindow before IsWindowVisible since the check for visibility can only be done on a valid window handle.

Should be something like
if( !::IsWindow( m_Dlg.GetSafeHwnd() ))
{
  // Window handle invalid recreate...
  m_Dlg.DoModal();
}
else if( !::IsWindowVisible( m_Dlg.GetSafeHwnd() ))
{
  // Don't know how much this will be useful since modal dialog boxes 
  // are always destroyed on close
  m_Dlg.ShowWindow(SW_SHOW);
}// End if



Nibu babu thomas
Microsoft MVP for VC++


Code must be written to be read, not by the compiler, but by another human being.

Programming Blog: http://nibuthomas.wordpress.com

GeneralRe: How can chk Dialog box is open? Pin
Le@rner2-Feb-09 18:49
Le@rner2-Feb-09 18:49 
GeneralRe: How can chk Dialog box is open? Pin
SandipG 2-Feb-09 19:29
SandipG 2-Feb-09 19:29 
AnswerRe: How can chk Dialog box is open? Pin
Sarath C2-Feb-09 18:20
Sarath C2-Feb-09 18:20 
AnswerRe: How can chk Dialog box is open? Pin
_AnsHUMAN_ 2-Feb-09 18:30
_AnsHUMAN_ 2-Feb-09 18:30 
GeneralRe: How can chk Dialog box is open? [modified] Pin
Le@rner2-Feb-09 18:32
Le@rner2-Feb-09 18:32 
GeneralRe: How can chk Dialog box is open? Pin
_AnsHUMAN_ 2-Feb-09 19:29
_AnsHUMAN_ 2-Feb-09 19:29 
QuestionINI FILE in vc++6 Pin
hrishiS2-Feb-09 17:05
hrishiS2-Feb-09 17:05 
AnswerRe: INI FILE in vc++6 Pin
Sarath C2-Feb-09 18:16
Sarath C2-Feb-09 18:16 
GeneralRe: INI FILE in vc++6 Pin
hrishiS2-Feb-09 18:19
hrishiS2-Feb-09 18:19 
AnswerRe: INI FILE in vc++6 Pin
aks.2-Feb-09 18:47
aks.2-Feb-09 18:47 
GeneralRe: INI FILE in vc++6 Pin
hrishiS2-Feb-09 19:01
hrishiS2-Feb-09 19:01 
GeneralRe: INI FILE in vc++6 Pin
aks.2-Feb-09 22:13
aks.2-Feb-09 22:13 
AnswerRe: INI FILE in vc++6 Pin
Hamid_RT3-Feb-09 20:37
Hamid_RT3-Feb-09 20:37 
Questionwinapi on mobile device Pin
johntoschack2-Feb-09 12:02
johntoschack2-Feb-09 12:02 
AnswerRe: winapi on mobile device Pin
«_Superman_»2-Feb-09 16:23
professional«_Superman_»2-Feb-09 16:23 
GeneralRe: winapi on mobile device Pin
johntoschack2-Feb-09 21:00
johntoschack2-Feb-09 21:00 
QuestionSlow Vista Drawing Pin
Koolski2-Feb-09 8:42
Koolski2-Feb-09 8:42 
AnswerRe: Slow Vista Drawing Pin
Sarath C2-Feb-09 16:58
Sarath C2-Feb-09 16:58 
GeneralRe: Slow Vista Drawing Pin
Koolski3-Feb-09 1:27
Koolski3-Feb-09 1:27 
QuestionRe: Slow Vista Drawing Pin
Koolski3-Feb-09 4:07
Koolski3-Feb-09 4:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.