Solved

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

Posted on 2001-08-20
7
439 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 9

Accepted Solution

by:
ShaunWilde earned 100 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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 Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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.

810 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