Click here to Skip to main content
15,913,215 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to move MFC 4.2 MDIChild windows outside MDIClient? Pin
Mike Condra24-Oct-03 17:58
sussMike Condra24-Oct-03 17:58 
AnswerRe: How to move MFC 4.2 MDIChild windows outside MDIClient? Pin
Neville Franks24-Oct-03 23:43
Neville Franks24-Oct-03 23:43 
QuestionHow to move a CRectTracker in resppnse to the arrow keys? Pin
cdsmith24-Oct-03 16:20
cdsmith24-Oct-03 16:20 
GeneralUser-Defined Messages Pin
Douglass24-Oct-03 16:15
Douglass24-Oct-03 16:15 
GeneralRe: User-Defined Messages Pin
Neville Franks24-Oct-03 23:49
Neville Franks24-Oct-03 23:49 
GeneralDeriving from CDumpContext and << operator Pin
Ori K24-Oct-03 14:54
Ori K24-Oct-03 14:54 
Generalshowing graphics in view after closing dialog Pin
coda_x24-Oct-03 14:14
coda_x24-Oct-03 14:14 
GeneralRe: showing graphics in view after closing dialog Pin
vcplusplus24-Oct-03 15:28
vcplusplus24-Oct-03 15:28 
Try putting your code in OnDraw() instead of OnPaint(); It will also make your life easier when you decide to print your drawing.

Here is some code from the CView class. As you can see, OnPaint() and OnPrint() both call OnDraw(). I hope this helps.

void CView::OnPaint()
{
	// standard paint routine
	CPaintDC dc(this);
	OnPrepareDC(&dc);
	OnDraw(&dc);
}

void CView::OnPrint(CDC* pDC, CPrintInfo*)
{
	ASSERT_VALID(pDC);

	// Override and set printing variables based on page number
	OnDraw(pDC);                    // Call Draw
}

void CView::OnDraw(CDC*)
{
}

GeneralRe: showing graphics in view after closing dialog Pin
coda_x24-Oct-03 17:20
coda_x24-Oct-03 17:20 
GeneralRe: showing graphics in view after closing dialog Pin
vcplusplus25-Oct-03 6:18
vcplusplus25-Oct-03 6:18 
GeneralRe: showing graphics in view after closing dialog Pin
coda_x25-Oct-03 19:02
coda_x25-Oct-03 19:02 
GeneralRe: showing graphics in view after closing dialog Pin
vcplusplus25-Oct-03 23:49
vcplusplus25-Oct-03 23:49 
QuestionHow to display Real-Time data Pin
JAM0124-Oct-03 13:11
JAM0124-Oct-03 13:11 
AnswerRe: How to display Real-Time data Pin
vcplusplus24-Oct-03 15:35
vcplusplus24-Oct-03 15:35 
AnswerRe: How to display Real-Time data Pin
Azghar Hussain24-Oct-03 22:56
professionalAzghar Hussain24-Oct-03 22:56 
GeneralRe: How to display Real-Time data Pin
JAM0125-Oct-03 11:49
JAM0125-Oct-03 11:49 
GeneralRe: How to display Real-Time data Pin
Azghar Hussain25-Oct-03 17:09
professionalAzghar Hussain25-Oct-03 17:09 
GeneralHelp!! .Net building errors Pin
Anonymous24-Oct-03 10:36
Anonymous24-Oct-03 10:36 
Generaltrying to make a rainbow out of a palette Pin
ns24-Oct-03 10:29
ns24-Oct-03 10:29 
GeneralRe: trying to make a rainbow out of a palette Pin
igor196024-Oct-03 11:05
igor196024-Oct-03 11:05 
GeneralRe: trying to make a rainbow out of a palette Pin
Ravi Bhavnani25-Oct-03 17:40
professionalRavi Bhavnani25-Oct-03 17:40 
GeneralRe: trying to make a rainbow out of a palette Pin
ns3-Nov-03 5:23
ns3-Nov-03 5:23 
QuestionHow to hide a tab from the Property Sheet Pin
ElizabethC24-Oct-03 10:18
ElizabethC24-Oct-03 10:18 
AnswerRe: How to hide a tab from the Property Sheet Pin
vcplusplus24-Oct-03 15:38
vcplusplus24-Oct-03 15:38 
GeneralArrays, heap, delete and crash! Pin
Rickard Andersson2024-Oct-03 10:03
Rickard Andersson2024-Oct-03 10:03 

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.