Click here to Skip to main content
15,919,434 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: modeless dialog Pin
FarPointer25-Sep-05 4:12
FarPointer25-Sep-05 4:12 
AnswerRe: modeless dialog Pin
vikas amin25-Sep-05 23:32
vikas amin25-Sep-05 23:32 
Questionchar * = new char[] take me an ERROR!!!! Pin
firefoxrabbit24-Sep-05 22:59
firefoxrabbit24-Sep-05 22:59 
AnswerRe: char * = new char[] take me an ERROR!!!! Pin
James_12325-Sep-05 0:21
James_12325-Sep-05 0:21 
QuestionProgress bar Pin
samira forooghi24-Sep-05 21:33
samira forooghi24-Sep-05 21:33 
AnswerRe: Progress bar Pin
Anonymous25-Sep-05 3:23
Anonymous25-Sep-05 3:23 
AnswerRe: Progress bar Pin
Ravi Bhavnani25-Sep-05 4:51
professionalRavi Bhavnani25-Sep-05 4:51 
QuestionDouble buffering dc with user mapping mode Pin
edanvoye24-Sep-05 18:00
edanvoye24-Sep-05 18:00 
The following OnPaint code works very well with single buffering. With it I can zoom in and out, and pan the view. The drawing code doesn't have to be aware of the zoom factor or any other coordinate. But how do I turn this into double buffering ? what mapping mode whould I use on the memory dc ?

CPaintDC outputdc( this );

// Client rect (size of window on screen)
CRect clientRect;
GetClientRect( &clientRect );

// Virtual rect (page coordinates)
CRect virtualRect;
virtualRect.left = m_CenterPos.x - (clientRect.Width()*m_fZoomFactor)/2;
virtualRect.right = m_CenterPos.x + (clientRect.Width()*m_fZoomFactor)/2;
virtualRect.top = m_CenterPos.y - (clientRect.Height()*m_fZoomFactor)/2;
virtualRect.bottom = m_CenterPos.y + (clientRect.Height()*m_fZoomFactor)/2;

// Sets the mapping mode for the specified center position and zoom factor
SetMapMode(outputdc, MM_ISOTROPIC);
SetWindowExtEx(outputdc, virtualRect.Width(), virtualRect.Height(), NULL);
SetViewportExtEx(outputdc, clientRect.Width(), clientRect.Height(), NULL);
SetWindowOrgEx(outputdc, virtualRect.left, virtualRect.top, NULL);

// Draw
EraseBackground( &outputdc, virtualRect );
m_GraphData.DrawData(&outputdc);

AnswerRe: Double buffering dc with user mapping mode Pin
Mircea Puiu25-Sep-05 6:10
Mircea Puiu25-Sep-05 6:10 
AnswerRe: Double buffering dc with user mapping mode Pin
ha_ha_ha25-Sep-05 7:24
ha_ha_ha25-Sep-05 7:24 
Questionretrieving data from MainFrame class? Pin
charmandwisdom24-Sep-05 17:14
charmandwisdom24-Sep-05 17:14 
AnswerRe: retrieving data from MainFrame class? Pin
Jack Puppy24-Sep-05 17:30
Jack Puppy24-Sep-05 17:30 
GeneralRe: retrieving data from MainFrame class? Pin
charmandwisdom25-Sep-05 3:10
charmandwisdom25-Sep-05 3:10 
Questionhow to unite .dbf files Pin
cofd24-Sep-05 17:09
cofd24-Sep-05 17:09 
AnswerRe: how to unite .dbf files Pin
Anonymous24-Sep-05 18:59
Anonymous24-Sep-05 18:59 
QuestionCan GetDC & CClientDC replace each other? Pin
followait24-Sep-05 16:43
followait24-Sep-05 16:43 
AnswerRe: Can GetDC & CClientDC replace each other? Pin
Mircea Puiu25-Sep-05 6:13
Mircea Puiu25-Sep-05 6:13 
AnswerRe: Can GetDC & CClientDC replace each other? Pin
Jose Lamas Rios25-Sep-05 17:04
Jose Lamas Rios25-Sep-05 17:04 
Questionhow to minimize window on app startup Pin
Laffis24-Sep-05 11:29
Laffis24-Sep-05 11:29 
GeneralRe: how to minimize window on app startup Pin
Jörgen Sigvardsson24-Sep-05 12:27
Jörgen Sigvardsson24-Sep-05 12:27 
QuestionPrint HTML from console app Pin
Stas24-Sep-05 11:29
Stas24-Sep-05 11:29 
QuestionScrollWindow question Pin
followait24-Sep-05 4:34
followait24-Sep-05 4:34 
AnswerRe: ScrollWindow question Pin
vikas amin24-Sep-05 4:39
vikas amin24-Sep-05 4:39 
GeneralRe: ScrollWindow question Pin
followait24-Sep-05 5:08
followait24-Sep-05 5:08 
GeneralRe: ScrollWindow question Pin
vikas amin24-Sep-05 5:57
vikas amin24-Sep-05 5:57 

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.