Click here to Skip to main content
15,923,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Changing m_pszHelpFilePath Pin
Toni7829-Apr-03 15:54
Toni7829-Apr-03 15:54 
GeneralRe: Changing m_pszHelpFilePath Pin
JensB30-Apr-03 1:33
JensB30-Apr-03 1:33 
GeneralSimple Question Pin
SatyaDY28-Apr-03 20:30
SatyaDY28-Apr-03 20:30 
GeneralRe: Simple Question Pin
jason9928-Apr-03 22:27
jason9928-Apr-03 22:27 
GeneralRe: Simple Question Pin
SatyaDY28-Apr-03 23:13
SatyaDY28-Apr-03 23:13 
GeneralRe: Simple Question Pin
Brian Shifrin28-Apr-03 23:40
Brian Shifrin28-Apr-03 23:40 
GeneralRe: Simple Question Pin
jason9929-Apr-03 2:33
jason9929-Apr-03 2:33 
GeneralRe: Simple Question Pin
John R. Shaw29-Apr-03 15:55
John R. Shaw29-Apr-03 15:55 
//Looks like you want to do flicker free drawing
//Which is the only reason for doing this
CDC MemDC;
CBitmap bmp;
CClientDC mydc(this);
MemDC.CreateCompatibleDC(&mydc);
bmp.CreateCompatibleBitmap(&mydc,1024,768);
CBitmap* pOldBmp = MemDC.SelectObject(&bmp);
// Draw rectangle
CBrush* pOldBrush = MemDC.SelectObject(&mybrush);
MemDC.Rectangle(myrect);
MemDC.SelectObject(&pOldBrush);
//TODO: Draw other things
//Blit to client DC
mydc.BitBlt(0,0,1024,768,&MemDC,0,0,SRCCOPY);
//Clean up
MemDC.SelectObject(&pOldBmp);
MemDC.DeleteDC();

Doing all of the above when you receive a WM_PAINT message is the slow way, but it works.

Find the article "Do a flicker-free drawing using MFC methods" here at codeproject. I have not read it but it should provide you with your answers.


Trust in the code Luke. Yea right!
GeneralRe: Simple Question Pin
SatyaDY30-Apr-03 0:48
SatyaDY30-Apr-03 0:48 
GeneralCreate a ENv variable-Help Pin
RaajaOfSelf28-Apr-03 20:29
RaajaOfSelf28-Apr-03 20:29 
GeneralRe: Create a ENv variable-Help Pin
Joaquín M López Muñoz28-Apr-03 20:52
Joaquín M López Muñoz28-Apr-03 20:52 
GeneralRe: Create a ENv variable-Help Pin
RaajaOfSelf28-Apr-03 21:01
RaajaOfSelf28-Apr-03 21:01 
GeneralRe: Create a ENv variable-Help Pin
basementman29-Apr-03 6:47
basementman29-Apr-03 6:47 
GeneralPrepend a letter to a char array using ASCII Pin
Brent Lamborn28-Apr-03 19:17
Brent Lamborn28-Apr-03 19:17 
GeneralRe: Prepend a letter to a char array using ASCII Pin
HJo29-Apr-03 0:35
HJo29-Apr-03 0:35 
GeneralRe: Prepend a letter to a char array using ASCII Pin
David Crow29-Apr-03 3:57
David Crow29-Apr-03 3:57 
Generalwinpcap giving the problem in sending packet Pin
summo28-Apr-03 19:10
summo28-Apr-03 19:10 
GeneralTo Open logfile in a notepad !!!!!!!!!!!!! Pin
summo28-Apr-03 18:48
summo28-Apr-03 18:48 
GeneralRe: To Open logfile in a notepad !!!!!!!!!!!!! Pin
Hans Dietrich28-Apr-03 19:04
mentorHans Dietrich28-Apr-03 19:04 
GeneralRe: To Open logfile in a notepad !!!!!!!!!!!!! Pin
Toni7828-Apr-03 19:23
Toni7828-Apr-03 19:23 
GeneralRe: To Open logfile in a notepad !!!!!!!!!!!!! Pin
Anonymous28-Apr-03 20:58
Anonymous28-Apr-03 20:58 
GeneralRe: To Open logfile in a notepad !!!!!!!!!!!!! Pin
Toni7828-Apr-03 21:14
Toni7828-Apr-03 21:14 
Generaltwips to pixels Pin
Anonymous28-Apr-03 17:25
Anonymous28-Apr-03 17:25 
GeneralRe: twips to pixels Pin
Ernest Laurentin28-Apr-03 18:45
Ernest Laurentin28-Apr-03 18:45 
GeneralThank you Pin
Toni7828-Apr-03 19:37
Toni7828-Apr-03 19: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.