Click here to Skip to main content
15,921,530 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get Key name from Vitrual-Key code? Pin
Aidman11-Feb-03 8:50
Aidman11-Feb-03 8:50 
GeneralRe: How to get Key name from Vitrual-Key code? Pin
KaЯl11-Feb-03 21:39
KaЯl11-Feb-03 21:39 
GeneralRe: How to get Key name from Vitrual-Key code? Pin
Aidman12-Feb-03 5:26
Aidman12-Feb-03 5:26 
GeneralRe: How to get Key name from Vitrual-Key code? Pin
KaЯl12-Feb-03 5:32
KaЯl12-Feb-03 5:32 
GeneralWM_NCHITTEST in Dialog Box Pin
Silmeron8-Feb-03 12:48
Silmeron8-Feb-03 12:48 
GeneralRe: WM_NCHITTEST in Dialog Box Pin
Nish Nishant8-Feb-03 13:29
sitebuilderNish Nishant8-Feb-03 13:29 
GeneralRe: WM_NCHITTEST in Dialog Box Pin
Silmeron8-Feb-03 16:04
Silmeron8-Feb-03 16:04 
GeneralError displaying CFrameWnd Pin
raner8-Feb-03 8:00
raner8-Feb-03 8:00 
Hi

I'm a beginner in VC.

I created a CObject-derived class (CGraphPlotter below).One of its functions create an CFrameWnd object, draw something and then try to display it on the frame.Below is the extract..

But it runs into exception error and i think the problem lies with ShowWindow().I don't know what to do.Invalidate doesnt work too.Can anyone help?Thks.

void CGraphPlotter::CreatePlot(CString title)<br />
{<br />
	RECT rect;<br />
	POINT pt;<br />
	RECT windowSize;<br />
<br />
	CFrameWnd *pwndPlot = new CFrameWnd;<br />
<br />
	windowSize.left   = 0;<br />
	windowSize.top    = 0;<br />
	windowSize.bottom = 300;<br />
	windowSize.right  = 600;<br />
	<br />
	pwndPlot->Create(NULL,title,WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX,windowSize,NULL,NULL,0,NULL);<br />
		<br />
	pwndPlot->GetClientRect(&rect);<br />
	pt.x=rect.right;<br />
	pt.y=rect.bottom;<br />
<br />
	CPaintDC dc(pwndPlot);<br />
	CPen plotPen;<br />
	CPen *pOldPen;<br />
	POINT pt;<br />
<br />
	plotPen.CreatePen(PS_SOLID,0,RGB(200,0,0));<br />
	pOldPen=dc.SelectObject(&plotPen);<br />
<br />
	double m_sampleData[5];<br />
	int m_sampleXAxis[5];<br />
<br />
	dc.MoveTo(0,0);<br />
	for(int i=0;i<4;i++)<br />
	{<br />
		pt.x=m_sampleXAxis[i];<br />
		pt.y = m_sampleData[i];<br />
		dc.LineTo(pt);<br />
	}<br />
	<br />
	pwndPlot->ShowWindow(SW_SHOW);<br />
}

GeneralRe: Error displaying CFrameWnd Pin
User 98858-Feb-03 8:52
User 98858-Feb-03 8:52 
Generalhelp needed on CView and CFrameWnd Pin
raner8-Feb-03 18:42
raner8-Feb-03 18:42 
GeneralRe: help needed on CView and CFrameWnd Pin
User 988510-Feb-03 2:57
User 988510-Feb-03 2:57 
GeneralMFC memory Leak Pin
User 98858-Feb-03 7:37
User 98858-Feb-03 7:37 
GeneralRe: MFC memory Leak Pin
User 98858-Feb-03 7:49
User 98858-Feb-03 7:49 
GeneralRe: MFC memory Leak Pin
Michael Dunn8-Feb-03 9:54
sitebuilderMichael Dunn8-Feb-03 9:54 
GeneralRe: MFC memory Leak Pin
User 98858-Feb-03 10:02
User 98858-Feb-03 10:02 
GeneralRichEdit question ! Pin
Hadi Rezaee8-Feb-03 7:34
Hadi Rezaee8-Feb-03 7:34 
QuestionHow to get an added class to shwo up in class wizard Pin
nss8-Feb-03 2:29
nss8-Feb-03 2:29 
QuestionWhat is wrong with these SQL statements?? Pin
IrishSonic8-Feb-03 0:26
IrishSonic8-Feb-03 0:26 
AnswerRe: What is wrong with these SQL statements?? Pin
vin8-Feb-03 1:08
vin8-Feb-03 1:08 
AnswerRe: What is wrong with these SQL statements?? Pin
Ted Ferenc8-Feb-03 4:42
Ted Ferenc8-Feb-03 4:42 
GeneralHere is my code... Pin
IrishSonic8-Feb-03 7:35
IrishSonic8-Feb-03 7:35 
GeneralRe: Here is my code... Pin
Ted Ferenc8-Feb-03 10:09
Ted Ferenc8-Feb-03 10:09 
GeneralRe: Here is my code... Pin
Kelly Herald9-Feb-03 18:02
Kelly Herald9-Feb-03 18:02 
AnswerRe: What is wrong with these SQL statements?? Pin
JockeP9-Feb-03 6:08
JockeP9-Feb-03 6:08 
GeneralCAsyncSocket problem Pin
Kazz7-Feb-03 23:08
Kazz7-Feb-03 23:08 

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.