Click here to Skip to main content
15,897,226 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionwindows message - when the window was displayed Pin
daavena25-Feb-09 8:18
daavena25-Feb-09 8:18 
AnswerRe: windows message - when the window was displayed Pin
Stuart Dootson25-Feb-09 8:29
professionalStuart Dootson25-Feb-09 8:29 
GeneralRe: windows message - when the window was displayed Pin
daavena25-Feb-09 8:38
daavena25-Feb-09 8:38 
GeneralRe: windows message - when the window was displayed Pin
Stuart Dootson25-Feb-09 9:00
professionalStuart Dootson25-Feb-09 9:00 
GeneralRe: windows message - when the window was displayed Pin
daavena25-Feb-09 9:59
daavena25-Feb-09 9:59 
AnswerRe: windows message - when the window was displayed Pin
Iain Clarke, Warrior Programmer25-Feb-09 8:29
Iain Clarke, Warrior Programmer25-Feb-09 8:29 
GeneralRe: windows message - when the window was displayed Pin
daavena25-Feb-09 8:48
daavena25-Feb-09 8:48 
QuestionSetting the Window Orientation Pin
BobInNJ25-Feb-09 6:41
BobInNJ25-Feb-09 6:41 
Please consider the following code fragment written using C++ and MFC.

void<br />
GraphWindow::OnPaint()<br />
{<br />
	CPaintDC dc(this);<br />
	dc.TextOut( 50, 50, TEXT("A Parabola"), 11 );<br />
<br />
	dc.SetWindowOrg( -cx/2, -cy/2 );<br />
<br />
	CPen pen(PS_SOLID, 2, RGB(255, 0, 0) );<br />
	CPen *pOldPen = dc.SelectObject( &pen );<br />
	<br />
	dc.MoveTo( -10, 100 );<br />
	for( int i = -10; i<=10; i++ )<br />
		dc.LineTo( i, (i*i) );<br />
<br />
	dc.SelectObject( pOldPen );<br />
}<br />


This routine is suppose to graph the curve y = x^2. However, it graphs the function y = -x^2 because the windows orientation is that an increasing y value, moves down in the window. If I change the call to LineTo to the following, it works:
dc.LineTo( i, -(i*i) );
I believe that there is a call that will change the window orientation such that an increasing y value moves up rather than down. However, I have been unable to find the call. I am hoping that somebody can tell me what it is.

Thanks

Bob
AnswerRe: Setting the Window Orientation Pin
Iain Clarke, Warrior Programmer25-Feb-09 8:26
Iain Clarke, Warrior Programmer25-Feb-09 8:26 
GeneralRe: Setting the Window Orientation Pin
BobInNJ25-Feb-09 15:20
BobInNJ25-Feb-09 15:20 
GeneralRe: Setting the Window Orientation Pin
Iain Clarke, Warrior Programmer25-Feb-09 21:51
Iain Clarke, Warrior Programmer25-Feb-09 21:51 
QuestionIs there any way to subclass excel? Pin
SNI25-Feb-09 5:56
SNI25-Feb-09 5:56 
AnswerRe: Is there any way to subclass excel? Pin
Stuart Dootson25-Feb-09 8:35
professionalStuart Dootson25-Feb-09 8:35 
GeneralRe: Is there any way to subclass excel? Pin
SNI25-Feb-09 17:21
SNI25-Feb-09 17:21 
GeneralRe: Is there any way to subclass excel? Pin
Stuart Dootson25-Feb-09 21:59
professionalStuart Dootson25-Feb-09 21:59 
GeneralRe: Is there any way to subclass excel? Pin
SNI25-Feb-09 22:56
SNI25-Feb-09 22:56 
GeneralRe: Is there any way to subclass excel? Pin
Stuart Dootson25-Feb-09 23:14
professionalStuart Dootson25-Feb-09 23:14 
GeneralRe: Is there any way to subclass excel? Pin
SNI25-Feb-09 23:44
SNI25-Feb-09 23:44 
GeneralRe: Is there any way to subclass excel? Pin
Stuart Dootson26-Feb-09 2:20
professionalStuart Dootson26-Feb-09 2:20 
GeneralRe: Is there any way to subclass excel? Pin
SNI8-Mar-09 23:23
SNI8-Mar-09 23:23 
GeneralRe: Is there any way to subclass excel? Pin
Stuart Dootson9-Mar-09 3:32
professionalStuart Dootson9-Mar-09 3:32 
QuestionHow to remove path of Executable debug session in VS2005 Pin
pandit8425-Feb-09 4:55
pandit8425-Feb-09 4:55 
AnswerRe: How to remove path of Executable debug session in VS2005 Pin
«_Superman_»25-Feb-09 5:01
professional«_Superman_»25-Feb-09 5:01 
QuestionCMDIChildWnd maximizing and merging with main window Pin
prithaa25-Feb-09 4:52
prithaa25-Feb-09 4:52 
AnswerRe: CMDIChildWnd maximizing and merging with main window Pin
Stuart Dootson25-Feb-09 8:39
professionalStuart Dootson25-Feb-09 8:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.