?
Solved

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

Posted on 2001-08-20
7
Medium Priority
?
507 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
ID: 6406678
Please give me the answer ASAP.
thanks,
uttam
0
 
LVL 12

Expert Comment

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

Expert Comment

by:ShaunWilde
ID: 6407183
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Accepted Solution

by:
ShaunWilde earned 400 total points
ID: 6407184
you may need to move the message filter for your property sheet class to dialog
0
 

Expert Comment

by:thebigone
ID: 6409218
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
ID: 6409503
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
ID: 9521280
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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 summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses
Course of the Month14 days, 11 hours left to enroll

839 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