Solved

tabbed dialog/prop page

Posted on 1997-09-15
5
237 Views
Last Modified: 2013-11-19
I want my main application window to be a tabbed dialog.
I have some this as a property sheet (i.e. main app window is a CPropertySheet descendant), but that is not the look I want for the app - I don't want the OK, Cancel, Apply & Help buttons, and I want a system menu, and a status bar down the bottom.

So instead, I tried to create a MODELESS property sheet inside my main dialog window. I did this from OnInitDialog, with the property sheet as a member of the main dialog class, as in

CMainDlg::OnInitDialog() {
  ...
  m_propSheet.Create(this, WS_CHILD|WS_VISIBLE);
  ...
}

Now this seems to work some of the time, but very often, the application suddenly goes into a tailspin, and starts hard looping. I use Debug/Break to see what it is doing, and it it just appears to be in the Message Loop (although I can't really tell whose).

Am I doing anything wrong?
Is there a better way?

Thanks,

DW
0
Comment
Question by:davidoz
  • 2
  • 2
5 Comments
 
LVL 10

Expert Comment

by:RONSLOW
Comment Utility
Turn on message tracing to help determine what message are happening.

Also what sort of action triggers this problem (changing tabs?, pressing a button?)  What does the app look like when this happens - is it painting ok?  If you put another app window over the top of it and then remove it, does your app paint ok?
0
 

Author Comment

by:davidoz
Comment Utility
How to turn on message tracing (VC++5), and for which messages? And then what do I look for?
I'm not sure what causes it: I think it happens when i move the focus to a different app, but also at other times.
Once it does happen, the app does not respond, and does not repaint - the CPU meter goes to 100%
0
 
LVL 10

Expert Comment

by:RONSLOW
Comment Utility
Tools menu - MFC Tracer - turn on the options you want.

Also, add suitable TRACE statements to parts of your code that generate or respond to messages and command so you can see better what is happening.

0
 
LVL 1

Accepted Solution

by:
kargo earned 100 total points
Comment Utility
There is a known bug when using the property sheet control as a modeless dialog.  There is a fix in the MS KB that describes handling a message.  The KB article is Q149501.
0
 

Author Comment

by:davidoz
Comment Utility
This is what experts exchange is all about! Thank you!!!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now