Click here to Skip to main content
16,011,608 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralFiles & strings Pin
roadragedave22-Apr-04 5:46
roadragedave22-Apr-04 5:46 
GeneralRe: Files & strings Pin
Navin22-Apr-04 6:17
Navin22-Apr-04 6:17 
GeneralRe: Files & strings Pin
roadragedave22-Apr-04 6:32
roadragedave22-Apr-04 6:32 
GeneralRe: Files & strings Pin
jmkhael22-Apr-04 6:17
jmkhael22-Apr-04 6:17 
GeneralRe: Files & strings Pin
roadragedave22-Apr-04 6:30
roadragedave22-Apr-04 6:30 
GeneralRe: Files & strings Pin
David Crow22-Apr-04 6:57
David Crow22-Apr-04 6:57 
GeneralRe: Files & strings Pin
roadragedave23-Apr-04 0:04
roadragedave23-Apr-04 0:04 
QuestionHow to get rid of flicker in a splitter wnd Pin
OutlawTornNMT22-Apr-04 5:24
OutlawTornNMT22-Apr-04 5:24 
Hey everyone how do I get rid of flickering in a childview in an mfc app? I have to views divided by a splitter bar. I've tried using CMemDC and I believe it gets rid of the flicker, however it seems to remap my view so stuff is drawn in a different location then what it is supposed to be.

my view's OnDraw looks like this

{
CMemDC pDC(dc);

CDocument* pDocBase = GetDocument();
CBaseStationDoc* pDoc = (CBaseStationDoc*)pDocBase;
CRect rcClient;

GetClientRect(&rcClient);

// Fill Background Color, Black
pDC->FillSolidRect(rcClient, RGB(0, 0, 0));

// Remap ViewportOrg to hor. center of client window and 100 pixels vertically top down.
int nXCoord = rcClient.Width()/2;
int nYCoord = rcClient.Height()/2;
pDC->SetViewportOrg(nXCoord, 100);

// Draw Robot Sensors
DrawSensors(nXCoord, nYCoord, pDC);

pDC->SetViewportOrg(nXCoord, nYCoord);

// Draw Sensor Table
DrawTableOfSensors(pDC);
}

When this code executes I can only see the bottom right quarter of what I normally see when the CMemDC line above is commented out, and dc is changed back to pDC

Any ideas?
AnswerRe: How to get rid of flicker in a splitter wnd Pin
Jim Crafton22-Apr-04 5:52
Jim Crafton22-Apr-04 5:52 
GeneralRe: How to get rid of flicker in a splitter wnd Pin
Anonymous22-Apr-04 15:59
Anonymous22-Apr-04 15:59 
Generalcharsets and Windows 98 Pin
Jim Crafton22-Apr-04 5:21
Jim Crafton22-Apr-04 5:21 
GeneralRe: charsets and Windows 98 Pin
Navin22-Apr-04 6:03
Navin22-Apr-04 6:03 
GeneralRe: charsets and Windows 98 Pin
Jim Crafton22-Apr-04 6:10
Jim Crafton22-Apr-04 6:10 
GeneralRe: charsets and Windows 98 Pin
Navin22-Apr-04 6:13
Navin22-Apr-04 6:13 
GeneralRe: charsets and Windows 98 Pin
Jim Crafton22-Apr-04 6:18
Jim Crafton22-Apr-04 6:18 
GeneralRe: charsets and Windows 98 Pin
Navin22-Apr-04 6:38
Navin22-Apr-04 6:38 
GeneralSimulating pressing ctrl + c Pin
ravjak22-Apr-04 5:12
ravjak22-Apr-04 5:12 
GeneralRe: Simulating pressing ctrl + c Pin
Anonymous22-Apr-04 8:56
Anonymous22-Apr-04 8:56 
GeneralRe: Simulating pressing ctrl + c done :-) Pin
ravjak22-Apr-04 11:18
ravjak22-Apr-04 11:18 
GeneralChanging Dialog Caption at run time Pin
C++NewBe22-Apr-04 4:01
C++NewBe22-Apr-04 4:01 
GeneralRe: Changing Dialog Caption at run time Pin
hasansheik22-Apr-04 4:07
hasansheik22-Apr-04 4:07 
GeneralRe: Changing Dialog Caption at run time Pin
David Crow22-Apr-04 4:12
David Crow22-Apr-04 4:12 
GeneralRe: Changing Dialog Caption at run time Pin
C++NewBe22-Apr-04 4:13
C++NewBe22-Apr-04 4:13 
GeneralRe: Changing Dialog Caption at run time Pin
Anonymous22-Apr-04 4:19
Anonymous22-Apr-04 4:19 
GeneralRe: Changing Dialog Caption at run time Pin
C++NewBe22-Apr-04 4:23
C++NewBe22-Apr-04 4:23 

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.