Click here to Skip to main content
15,915,336 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSimple dialo app, memory leak Pin
J.B.2-Dec-03 21:13
J.B.2-Dec-03 21:13 
GeneralRe: Simple dialo app, memory leak Pin
Anonymous2-Dec-03 21:22
Anonymous2-Dec-03 21:22 
GeneralRe: Simple dialo app, memory leak Pin
J.B.2-Dec-03 21:43
J.B.2-Dec-03 21:43 
GeneralRe: Simple dialo app, memory leak Pin
Marek Grzenkowicz2-Dec-03 21:23
Marek Grzenkowicz2-Dec-03 21:23 
Questionhow to get the message for window show? Pin
zecodela2-Dec-03 20:57
zecodela2-Dec-03 20:57 
AnswerRe: how to get the message for window show? Pin
BaldwinMartin2-Dec-03 22:50
BaldwinMartin2-Dec-03 22:50 
Generalscrolling logic Pin
R. Thomas2-Dec-03 20:48
R. Thomas2-Dec-03 20:48 
Questionmapping mode prob? Pin
R. Thomas2-Dec-03 20:40
R. Thomas2-Dec-03 20:40 
hi...i am facing a small prob..

void CEditorView::OnDraw(CDC* pDC)<br />
{<br />
	CEditorDoc* pDoc = GetDocument();<br />
	ASSERT_VALID(pDoc);<br />
	<br />
	//<br />
	//Set the mapping mode to LOENGLISH<br />
	//<br />
	pDC->SetMapMode(MM_LOENGLISH);<br />
<br />
	//<br />
	//Convert arguments to coordinates to MM_LOENGLISH units.<br />
	//<br />
	CPoint pos;<br />
	pos.x = pDoc->GetGridWidth()*100;<br />
	pos.y = pDoc->GetGridHeight();<br />
	pDC->DPtoLP(&pos);<br />
<br />
	//<br />
	//Draw the square the has to bound the grid<br />
	//<br />
//	CRect rect(10, -10, pos.x, pos.y);//getting wrong rect in this way..WHY?<br />
	CRect rect(10, -10, 2000, -1000);<br />
	pDC->Rectangle(rect);//rectangle drawn ok..,

when i do this
CRect rect(10, -10, pos.x, pos.y);
the rectangle that is drawn isboundless...i.e no mater how long i put the scroll bars..i still cant see the end of therect..wherea as if i do this
CRect rect(10, -10, 2000, 1000);
i can see the rectangle...
why is that???why cant i see the rect when iuse the first method??
tks for any help...

Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
John 3:16
"Therefore you also be ready, for the Son of Man is coming at an hour you do not expet."
Luke 12:40

QuestionHow do I make wrapper funtion such as &quot;sprintf&quot; without using &quot;va_arg&quot;? Pin
dowa2-Dec-03 19:53
dowa2-Dec-03 19:53 
AnswerRe: How do I make wrapper funtion such as &quot;sprintf&quot; without using &quot;va_arg&quot;? Pin
Anonymous2-Dec-03 21:33
Anonymous2-Dec-03 21:33 
AnswerRe: How do I make wrapper funtion such as &quot;sprintf&quot; without using &quot;va_arg&quot;? Pin
BaldwinMartin2-Dec-03 23:01
BaldwinMartin2-Dec-03 23:01 
AnswerRe: How do I make wrapper funtion such as &quot;sprintf&quot; without using &quot;va_arg&quot;? Pin
David Crow3-Dec-03 3:39
David Crow3-Dec-03 3:39 
AnswerRe: How do I make wrapper funtion such as &quot;sprintf&quot; without using &quot;va_arg&quot;? Pin
Tim Smith3-Dec-03 4:24
Tim Smith3-Dec-03 4:24 
GeneralGetUserName() fails in ATL COM object Pin
bryces2-Dec-03 19:47
bryces2-Dec-03 19:47 
GeneralRe: GetUserName() fails in ATL COM object Pin
Michael P Butler2-Dec-03 20:20
Michael P Butler2-Dec-03 20:20 
GeneralRe: GetUserName() fails in ATL COM object Pin
bryces2-Dec-03 21:09
bryces2-Dec-03 21:09 
GeneralRe: GetUserName() fails in ATL COM object Pin
BaldwinMartin2-Dec-03 23:21
BaldwinMartin2-Dec-03 23:21 
Generalgripper in top left corner of resiable combo box Pin
Suneet Chandok2-Dec-03 19:08
Suneet Chandok2-Dec-03 19:08 
GeneralDisplay a MessageBox in CDialog::OnActivate() Pin
Chris Ormerod2-Dec-03 18:16
Chris Ormerod2-Dec-03 18:16 
GeneralRe: Display a MessageBox in CDialog::OnActivate() Pin
Chris Ormerod2-Dec-03 18:22
Chris Ormerod2-Dec-03 18:22 
GeneralQuestion regarding inheritance Pin
lsanil2-Dec-03 17:24
lsanil2-Dec-03 17:24 
GeneralRe: Question regarding inheritance Pin
Christian Graus2-Dec-03 17:29
protectorChristian Graus2-Dec-03 17:29 
GeneralRe: Question regarding inheritance Pin
lsanil2-Dec-03 18:57
lsanil2-Dec-03 18:57 
GeneralRe: Question regarding inheritance Pin
lsanil2-Dec-03 19:05
lsanil2-Dec-03 19:05 
QuestionCFormView: adding a CHeaderCtrl? Pin
ckorda2-Dec-03 16:48
ckorda2-Dec-03 16:48 

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.