Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Checking for attached device ( A: drive? ) Pin
Garth J Lancaster18-Jan-10 15:28
professionalGarth J Lancaster18-Jan-10 15:28 
GeneralRe: Checking for attached device ( A: drive? ) Pin
Peter Weyzen18-Jan-10 17:30
Peter Weyzen18-Jan-10 17:30 
GeneralRe: Checking for attached device ( A: drive? ) Pin
Garth J Lancaster18-Jan-10 17:33
professionalGarth J Lancaster18-Jan-10 17:33 
GeneralRe: Checking for attached device ( A: drive? ) Pin
Rozis19-Jan-10 2:53
Rozis19-Jan-10 2:53 
GeneralRe: Checking for attached device ( A: drive? ) Pin
Garth J Lancaster19-Jan-10 9:45
professionalGarth J Lancaster19-Jan-10 9:45 
QuestionRe: Checking for attached device ( A: drive? ) Pin
David Crow19-Jan-10 3:15
David Crow19-Jan-10 3:15 
AnswerRe: Checking for attached device ( A: drive? ) Pin
Garth J Lancaster19-Jan-10 10:13
professionalGarth J Lancaster19-Jan-10 10:13 
QuestionMFC CScrollView update problem when scrolling Pin
baumchen18-Jan-10 13:03
baumchen18-Jan-10 13:03 
Hi, folks

I met such a problem when implementing a CScrollView class.

what i want to do is to show two images in one CScrollView instance, so I have the following code (below only shows one image in the left part of the window).

void OnDraw(CDC* pDC)
{
CDC dcMem;
CRect lRect;

GetClientRect(lRect);
lRect.NormalizeRect();

dcMem.CreateCompatibleDC(pDC);

CBitmap* pOldBitmap = (CBitmap*) dcMem.SelectObject(m_SourceBitmap);
CPoint scrollPosition = GetScrollPosition();

pDC->BitBlt(scrollPosition.x, scrollPosition.y, lRect.Width() / 2, lRect.Height(), &dcMem, scrollPosition.x, scrollPosition.y, SRCCOPY);

DeleteDC(dcMem);
}


however, when I scroll the window, right half part of the window always has some problem, either too much background (scrolling left) or too few background (scrolling right).

when I hide and show the window, everything is fine.

alternatively, I tried calling Invalidate() from OnScroll, flicker happens because OnDraw is called multiple times.

anyone got a solution?

thanks!

baum
AnswerRe: MFC CScrollView update problem when scrolling Pin
Nelek18-Jan-10 20:53
protectorNelek18-Jan-10 20:53 
GeneralRe: MFC CScrollView update problem when scrolling Pin
baumchen19-Jan-10 8:01
baumchen19-Jan-10 8:01 
GeneralRe: MFC CScrollView update problem when scrolling Pin
Nelek19-Jan-10 21:00
protectorNelek19-Jan-10 21:00 
GeneralRe: MFC CScrollView update problem when scrolling Pin
baumchen20-Jan-10 11:12
baumchen20-Jan-10 11:12 
QuestionGetting Function Signatures from a DLL Pin
thatonegirl18-Jan-10 10:31
thatonegirl18-Jan-10 10:31 
AnswerRe: Getting Function Signatures from a DLL Pin
Stuart Dootson18-Jan-10 11:56
professionalStuart Dootson18-Jan-10 11:56 
GeneralRe: Getting Function Signatures from a DLL Pin
thatonegirl19-Jan-10 3:20
thatonegirl19-Jan-10 3:20 
AnswerRe: Getting Function Signatures from a DLL Pin
Garth J Lancaster18-Jan-10 15:31
professionalGarth J Lancaster18-Jan-10 15:31 
QuestionHow to read/process locked files? Pin
ZystemsK18-Jan-10 10:12
ZystemsK18-Jan-10 10:12 
QuestionRe: How to read/process locked files? Pin
David Crow18-Jan-10 10:29
David Crow18-Jan-10 10:29 
AnswerRe: How to read/process locked files? Pin
ZystemsK18-Jan-10 11:19
ZystemsK18-Jan-10 11:19 
AnswerRe: How to read/process locked files? Pin
Peter Weyzen18-Jan-10 14:09
Peter Weyzen18-Jan-10 14:09 
GeneralRe: How to read/process locked files? Pin
ZystemsK19-Jan-10 3:09
ZystemsK19-Jan-10 3:09 
GeneralRe: How to read/process locked files? Pin
ZystemsK19-Jan-10 4:19
ZystemsK19-Jan-10 4:19 
QuestionReading a file from disk in C Pin
Danzy8318-Jan-10 3:07
Danzy8318-Jan-10 3:07 
AnswerRe: Reading a file from disk in C Pin
Covean18-Jan-10 3:20
Covean18-Jan-10 3:20 
GeneralRe: Reading a file from disk in C Pin
Danzy8318-Jan-10 3:28
Danzy8318-Jan-10 3:28 

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.