Solved

tabbed dialog/prop page

Posted on 1997-09-15
5
250 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
ID: 1306308
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
ID: 1306309
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
ID: 1306310
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
ID: 1306311
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
ID: 1306312
This is what experts exchange is all about! Thank you!!!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

840 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