Solved

How to put Buttons on a modeless property sheet in MFC?

Posted on 2001-08-20
7
413 Views
Last Modified: 2013-11-20
I am not able to put some buttons on a modeless property shett having 2 property pages. I am trying to add button at the bottom of the modeless property sheet . I have tryied doing GetWindowRect and MoveWindow in OnCreate of the propertysheet as suggested in the help.
0
Comment
Question by:uttamabhyankar
7 Comments
 

Author Comment

by:uttamabhyankar
Comment Utility
Please give me the answer ASAP.
thanks,
uttam
0
 
LVL 12

Expert Comment

by:migel
Comment Utility
Hi!
did you look at www.codeguru.com property sheet section?
0
 
LVL 9

Expert Comment

by:ShaunWilde
Comment Utility
Handle OnInitDialog and


BOOL CMySheet::OnInitDialog()
{
     CPropertySheet::OnInitDialog();
     
     
     
     RECT rc;
     GetWindowRect (&rc);
     
     rc.bottom += 40;
     
     MoveWindow (rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top);
     
     ScreenToClient (&rc);
     
     m_button.Create ("Press me",
          WS_CHILD | WS_VISIBLE | WS_TABSTOP,
          CRect (5, rc.bottom-35, 80, rc.bottom-10),
          this, 1000);
     
     return TRUE;  // return TRUE unless you set the focus to a control
     // EXCEPTION: OCX Property Pages should return FALSE
}

0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 9

Accepted Solution

by:
ShaunWilde earned 100 total points
Comment Utility
you may need to move the message filter for your property sheet class to dialog
0
 

Expert Comment

by:thebigone
Comment Utility
You can also embed the propsheet in a frame (I asked for that 2 weeks ago ...)

Refer to :


http://support.microsoft.com/support/kb/articles/Q234/5/45.ASP
0
 
LVL 1

Expert Comment

by:Tim_Musschoot
Comment Utility
There is an example of adding buttons to a modeless Dialog at the microsoft MSDN (look online(!) for CWaitDialog).  The method is equal for a property sheet.

Tim Musschoot
0
 
LVL 23

Expert Comment

by:Roshan Davis
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: ShaunWilde

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Roshan Davis
EE Cleanup Volunteer
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

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…
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

16 Experts available now in Live!

Get 1:1 Help Now