Click here to Skip to main content
15,915,319 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: MFC CScrollView update problem when scrolling Pin
Nelek18-Jan-10 20:53
protectorNelek18-Jan-10 20:53 
I don't know for sure if this will help you, but I used this (simplified version) and for me was working good.

	CClientDC dc(this); // Window to be drawn
	CDC dcNormMem; // To handle the bitmap
	dcNormMem.CreateCompatibleDC (&dc); // Assigning it to the window in compatible mode

	CString szTempText = "";
	CPoint cpTempPos, cpTempTextPos, cpScrollPoint = GetScrollPosition ();
	CBitmap bmNormIn;
	BITMAP bmNormTemp;

	if (bmNormIn.m_hObject != NULL)
		bmNormIn.DeleteObject ();		// Avoid duplicities

	// Load and select the bitmap to be placed
	bmNormIn.LoadBitmap (IDB_NORMIN);  // Bitmap was in the resources
	bmNormIn.GetObject(sizeof(bmNormTemp), &bmNormTemp);	
	dcNormMem.SelectObject(&bmNormIn);

	// Correct Coordinates -> position on the screen
	cpTempPos.x = pDoc->m_cmlInputSet[nIn].m_cpInCoord.x - cpScrollPoint.x;
	cpTempPos.y = pDoc->m_cmlInputSet[nIn].m_cpInCoord.y - cpScrollPoint.y;
			
	// Place the bitmap on the correct position
	dc.BitBlt(cpTempPos.x, cpTempPos.y, bmNormTemp.bmWidth, bmNormTemp.bmHeight, &dcNormMem, 0, 0, SRCCOPY);
	
	// Configuring and placing Name-Label of the Input
	szTempText = pDoc->m_cmlInputSet[nIn].m_szInName;
	dc.SetTextColor(RGB(0,0,0));
	dc.TextOut (cpTempPos.x, cpTempPos.y + SIGHEIGHT + 1, szTempText);
.
//... more code
.
	dcNormMem.DeleteDC();
	ReleaseDC(&dc);


and

BOOL CMyView::OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll) 
{	
	Invalidate ();
	UpdateWindow ();

	return CScrollView::OnScroll(nScrollCode, nPos, bDoScroll);
}


And for me was working good, I had up to 48 tiny Bitmaps on the screen and the Scroll of the window worked fine.

Regards.
--------
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.

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 
GeneralRe: Reading a file from disk in C Pin
Covean18-Jan-10 3:37
Covean18-Jan-10 3: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.