Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

tabbed dialog/prop page

Posted on 1997-09-15
5
Medium Priority
?
264 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

715 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