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

C / C++ / MFC

 
GeneralRe: Sources of Filemon from sysinternals Pin
Dudi Avramov11-Sep-05 3:45
Dudi Avramov11-Sep-05 3:45 
QuestionDomain name Pin
Riily7-Sep-05 23:53
Riily7-Sep-05 23:53 
AnswerRe: Domain name Pin
ThatsAlok8-Sep-05 1:16
ThatsAlok8-Sep-05 1:16 
AnswerRe: Domain name Pin
Aamir Butt8-Sep-05 1:46
Aamir Butt8-Sep-05 1:46 
AnswerRe: Domain name Pin
ThatsAlok8-Sep-05 18:08
ThatsAlok8-Sep-05 18:08 
QuestionImage from CDC Pin
lanifis7-Sep-05 23:27
lanifis7-Sep-05 23:27 
AnswerRe: Image from CDC Pin
Mircea Puiu8-Sep-05 0:31
Mircea Puiu8-Sep-05 0:31 
AnswerRe: Image from CDC Pin
John R. Shaw8-Sep-05 23:50
John R. Shaw8-Sep-05 23:50 
CScrollView handles most of the problems, you should be able to keep it simple.

1) Add a CBitmap member to your view class.
2) Disable OnEraseBkgnd() (just return TRUE).
3) Create a screen compatible memory CDC.
4) Create your CDC compatible bitmap (size is upto you).
5) Select bitmap into CDC.
6) Draw on CDC.
7) Restore origanal bitmap to CDC.
8) Release CDC
9)
OnDraw(CDC* pDC)
{
....
   pDC->BitBlt(0,0,nWidth,nHeight,dcTemp,0,0,SRCCOPY);
   pDC->ExcludeClipRect(0,0,nWidth,nHeight);
    // Draw background
    CRect rcClip;
    pDC->GetClipBox(&rcClip);
    pDC->FillSolidRect(
	rcClip.left,rcClip.top,
	rcClip.Width(),rcClip.Height(),
	::GetSysColor(COLOR_WINDOW));
....
}


Well that should work.

You would normaly update the bitmap (create) in the OnInitialUpdate() or OnUpdate() functions as well as update the scrollbar limits. You'll want to write a seperate function UpdateScrollSizes() to update scrollbar limits, if you plan on adding a zoom feature.


INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
GeneralRe: Image from CDC Pin
lanifis11-Sep-05 21:44
lanifis11-Sep-05 21:44 
QuestionDialog for server and client Pin
Member 21610047-Sep-05 23:18
Member 21610047-Sep-05 23:18 
AnswerRe: Dialog for server and client Pin
ThatsAlok7-Sep-05 23:21
ThatsAlok7-Sep-05 23:21 
AnswerRe: Dialog for server and client Pin
David Crow8-Sep-05 2:53
David Crow8-Sep-05 2:53 
GeneralRe: Dialog for server and client Pin
Member 21610048-Sep-05 15:07
Member 21610048-Sep-05 15:07 
Questionsetting bitmap images on push buttons Pin
sayup7-Sep-05 21:45
sayup7-Sep-05 21:45 
AnswerRe: setting bitmap images on push buttons Pin
nguyenvhn7-Sep-05 22:11
nguyenvhn7-Sep-05 22:11 
AnswerRe: setting bitmap images on push buttons Pin
ThatsAlok7-Sep-05 23:18
ThatsAlok7-Sep-05 23:18 
AnswerRe: setting bitmap images on push buttons Pin
Eytukan7-Sep-05 23:59
Eytukan7-Sep-05 23:59 
AnswerRe: setting bitmap images on push buttons Pin
Eytukan8-Sep-05 0:02
Eytukan8-Sep-05 0:02 
AnswerRe: setting bitmap images on push buttons Pin
Lefteris_RG31208-Sep-05 1:24
Lefteris_RG31208-Sep-05 1:24 
AnswerRe: setting bitmap images on push buttons Pin
David Crow8-Sep-05 2:54
David Crow8-Sep-05 2:54 
Questionwintrust.h Pin
sunit57-Sep-05 21:21
sunit57-Sep-05 21:21 
AnswerRe: wintrust.h Pin
nguyenvhn7-Sep-05 22:07
nguyenvhn7-Sep-05 22:07 
GeneralRe: wintrust.h Pin
sunit57-Sep-05 22:48
sunit57-Sep-05 22:48 
GeneralRe: wintrust.h Pin
toxcct7-Sep-05 22:53
toxcct7-Sep-05 22:53 
AnswerRe: wintrust.h Pin
ThatsAlok7-Sep-05 23:17
ThatsAlok7-Sep-05 23:17 

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.