Click here to Skip to main content
16,012,061 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Disable Special key's Pin
gamitech22-Jun-04 13:34
gamitech22-Jun-04 13:34 
GeneralRe: Device context questions Pin
Pazzuzu21-Jun-04 3:46
Pazzuzu21-Jun-04 3:46 
GeneralRe: Device context questions Pin
Blake Miller21-Jun-04 3:59
Blake Miller21-Jun-04 3:59 
GeneralRe: Device context questions Pin
Pazzuzu21-Jun-04 4:06
Pazzuzu21-Jun-04 4:06 
Generalshow dialog in a dll Pin
yingkou21-Jun-04 3:22
yingkou21-Jun-04 3:22 
GeneralRe: show dialog in a dll Pin
rrrado21-Jun-04 3:51
rrrado21-Jun-04 3:51 
GeneralRe: show dialog in a dll Pin
wb21-Jun-04 10:59
wb21-Jun-04 10:59 
GeneralDevice context questions Pin
Pazzuzu21-Jun-04 3:18
Pazzuzu21-Jun-04 3:18 
Hi Guys,

Would like to what is wrong with the following...



[1]Iam drawing to a screen the contents of a page(say, 1st page) & some rectangles as well.(Mfc application-using deviceContext)
Now,I want to load a different page(say, 2nd page) with no figures.
How will I clear everything from screen for drawing the 2nd page,so that the 2nd page doesnt overlap on the contents of the first page...




[2]

// In the MFC generated OnDraw
// m_drawer is a pointer to my defined class to which Iam passing the DC for drawing.

void CMfcTestView::OnDraw(CDC* pDC)
{
CMfcTestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
m_drawer->AttachDC(pDC);
}
// Have another function to draw a line to screen on the button down action.

void CMfcTestView::OnLButtonDown(UINT nFlags, CPoint point)
{
CView::OnLButtonDown(nFlags, point);
m_drawer->DrawLine();
}

void DrawLine()
{
CPen newPen(PS_SOLID,2,RGB(color[0],color[1],color[2]));
CPen *pOldPen = m_deviceContext->SelectObject(&newPen);
//Drawing Line
// This call gives me a assertion failure in wingdi.cpp
m_deviceContext->MoveTo(offset,initialyPos);

}

There is no assertion failure when I call "m_drawer->DrawLine()" from OnDraw().
What could be the reason of this.....

Thanks..







GeneralRe: Device context questions Pin
Blake Miller21-Jun-04 3:23
Blake Miller21-Jun-04 3:23 
GeneralRe: Device context questions Pin
Pazzuzu21-Jun-04 3:26
Pazzuzu21-Jun-04 3:26 
GeneralRe: Device context questions Pin
Blake Miller21-Jun-04 3:40
Blake Miller21-Jun-04 3:40 
GeneralIE/WebBrowser control stealing focus Pin
rrrado21-Jun-04 2:21
rrrado21-Jun-04 2:21 
GeneralWinXP log in screen Pin
sirtimid21-Jun-04 2:15
sirtimid21-Jun-04 2:15 
GeneralRe: WinXP log in screen Pin
Antony M Kancidrowski21-Jun-04 2:44
Antony M Kancidrowski21-Jun-04 2:44 
GeneralMessage Closed Pin
21-Jun-04 2:59
Lars Lundstedt21-Jun-04 2:59 
GeneralRe: WinXP log in screen Pin
sirtimid21-Jun-04 3:14
sirtimid21-Jun-04 3:14 
GeneralRe: WinXP log in screen Pin
Maximilien21-Jun-04 3:26
Maximilien21-Jun-04 3:26 
GeneralRe: WinXP log in screen Pin
jmkhael21-Jun-04 3:44
jmkhael21-Jun-04 3:44 
GeneralDHTML + VC++ Pin
Anonymous21-Jun-04 2:01
Anonymous21-Jun-04 2:01 
GeneralRe: DHTML + VC++ Pin
Andrew Quinn AUS21-Jun-04 4:44
Andrew Quinn AUS21-Jun-04 4:44 
QuestionCan i redirect the ouput of Debug window to a Text file? Pin
uus9921-Jun-04 0:13
uus9921-Jun-04 0:13 
AnswerRe: Can i redirect the ouput of Debug window to a Text file? Pin
jmkhael21-Jun-04 0:56
jmkhael21-Jun-04 0:56 
Generalportscandetector Pin
ask_you20-Jun-04 23:54
ask_you20-Jun-04 23:54 
GeneralRe: portscandetector Pin
ThatsAlok21-Jun-04 0:51
ThatsAlok21-Jun-04 0:51 
GeneralRe: portscandetector Pin
gamitech22-Jun-04 13:37
gamitech22-Jun-04 13:37 

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.