Solved

tabbed dialog/prop page

Posted on 1997-09-15
5
251 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
Expand LInux Boot partition remotly 3 102
sameEnds challenge 3 187
zeroMAx challenge 20 124
Authenticate using sesu from script 7 106
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

679 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