Solved

Property Sheet position in a window

Posted on 1997-10-19
6
235 Views
Last Modified: 2013-11-20
Hi !!!
 
I've derived from CPropertySheet a class call CSheet, and add page derived from CPropertypage to CSheet ... (a normal Property box initialised form MFC)
 
But i want my Property Box diplayed initially  at the coordinate 0,0  and not in the middle of the screen ... How could i do this ? Please help :)
 
Thanx in advance!
0
Comment
Question by:SkizoWalker
[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
  • 4
  • 2
6 Comments
 
LVL 1

Accepted Solution

by:
ohell earned 50 total points
ID: 1308420
Number of ways to do this:

easiest: in OnInitDialog() of your CSheet(), call MoveWindow() with the appropriate coordinates, in your case (0, 0), which would bethe top left corner of the parent window (you have to remove the WS_CHILD attribute if you want the dialog box to go outside the creating window.). Be sure to do this AFTER the OnInitDialog() of CPropertySheet has been called.
Hope this helps
0
 

Author Comment

by:SkizoWalker
ID: 1308421
It isn't possible to reset the position by redefining the PreCreate - CWnd - Function ?
by changing the CRect values ?
If so , how is it possible ?

0
 

Author Comment

by:SkizoWalker
ID: 1308422
I just tried the MoveWindow command and got an undhlanded exception 0xC000005 !! Arrrgghh ...!!!
:) Please help ...

0
Industry Leaders: 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!

 

Author Comment

by:SkizoWalker
ID: 1308423
Finnaly it works , i am a real lamer :)) !!

0
 
LVL 1

Expert Comment

by:ohell
ID: 1308424
Like I said, there are a number of ways to do it...I wrote down the simplest that came to mind. But I'm curious why you were getting the exception...
0
 

Author Comment

by:SkizoWalker
ID: 1308425
It was because the function MoveWindow takes in parameters  (LPCRECT lpRect, BOOL bRepaint = TRUE) and not a x,y Position as paramters , that' caused a stupid exception when i tried MoveWindow(50,50) :))) !!!

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Creating Labels and Frequency list style reports in SAS code 9 113
sum28 challenge 31 117
Annoying "thing" blocks my view 4 133
moto 4g phone enable finger print 4 48
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…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 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