Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual C++ Win32 Prog Problem Urgent Help need :Dialog Box not Showing

Status
Not open for further replies.

cdgios

Technical User
Jul 17, 2002
40
0
0
US
Hello All, I have an issue with a DialogBox not showing when i execute an application. I have been struggling with this for day now. The DialogBox() function call returns (with TRUE) without going through any of the message processing code in the dialog box procedure. I have verified that the Dialog Box Procedure is being called. How can this happen?. I have several other dialog boxes within my application and they all work fine. I have painstakingly verified the code and it looks o.k. Let me know if you would like to look at the code and I will most happily post it.

Thanks for your help
best regards
chandra
 
Hi Chandra, have you looked at the properties of the dialog in the resource editor? Perhaps you have the "visible" field unchecked??????? Failing this, I would need to see a sample of the code you used.
 
You could always try calling the SetWindowPos function and pass it NULL,0,0,0,0,SWP_NOMOVE |SWP_NOSIZE | SWPNO_ZORDER | SWP_SHOWWINDOW.

This will show a window without moving, sizing or changing the zorder.

e.g
SetWindowPos(NULL,0,0,0,0,SWP_NOMOVE |SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW);

It might be best to call this in the show window function but to put a check it to stop it from looping forever

e.g

CDialog::OnShowWindow
{
if (!IsWindowVisible())
SetWindowPos(NULL,0,0,0,0,SWP_NOMOVE |SWP_NOSIZE|SWPNO_ZORDER | SWP_SHOWWINDOW);
}


Hope This Helps !! [ponytails]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top