Click here to Skip to main content
15,906,097 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionOnly got a .dll file; Now what?? Pin
20-Aug-01 12:55
suss20-Aug-01 12:55 
AnswerRe: Only got a .dll file; Now what?? Pin
Ben Burnett20-Aug-01 14:18
Ben Burnett20-Aug-01 14:18 
AnswerRe: Only got a .dll file; Now what?? Pin
The_Server20-Aug-01 20:40
The_Server20-Aug-01 20:40 
AnswerRe: Only got a .dll file; Now what?? Pin
Mukkie21-Aug-01 7:08
Mukkie21-Aug-01 7:08 
QuestionHow to add non MFC classes to the Class Wizard Pin
20-Aug-01 12:26
suss20-Aug-01 12:26 
AnswerRe: How to add non MFC classes to the Class Wizard Pin
Orbital^20-Aug-01 20:52
Orbital^20-Aug-01 20:52 
AnswerRe: How to add non MFC classes to the Class Wizard Pin
Malcolm McMahon21-Aug-01 0:48
Malcolm McMahon21-Aug-01 0:48 
GeneralStretchBlt Pin
AJ12320-Aug-01 11:58
AJ12320-Aug-01 11:58 
Hi,

I am playing around with resizing bitmaps and the GDI. I am trying to resize a bitmap from disk and then

display it in a CStatic.



Code As Follows:




// LOAD BMP FROM DISC
// ******************

HBITMAP testbmp;
testbmp= (HBITMAP) LoadImage(0,"C:\\test.bmp",IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);


//CREATE SOURCE DC
//****************
CDC hdc;
hdc.CreateCompatibleDC(NULL);
hdc.SelectObject(testbmp);



//CREATE DESTINATION DC AND RELATED BMP
//*************************************

CDC destination ;

CBitmap bmp;
bmp.CreateCompatibleBitmap(&destination,100,100);

destination.CreateCompatibleDC(NULL);

CBitmap *old = destination.SelectObject(&bmp);


//PERFORM THE RESIZE
//******************

destination.StretchBlt(0,0,100,100,&destination,0,0,640,480,PATCOPY);
destination.SelectObject(&old);



//OUTPUT RESIZED BMP TO CSTATIC CONTROL
//*************************************
m_bmp.SetBitmap(*bmp);




Can anyone point out where I am going wrong

Cheers

Richard
GeneralRe: StretchBlt Pin
Christian Graus20-Aug-01 13:11
protectorChristian Graus20-Aug-01 13:11 
QuestionHow to Print two string Pin
nulldreamer20-Aug-01 10:57
nulldreamer20-Aug-01 10:57 
AnswerRe: How to Print two string Pin
20-Aug-01 12:29
suss20-Aug-01 12:29 
GeneralRe: How to Print two string Pin
nulldreamer20-Aug-01 21:10
nulldreamer20-Aug-01 21:10 
GeneralWindows Explorer ToolTips Pin
Ganesh Agrawal20-Aug-01 10:47
Ganesh Agrawal20-Aug-01 10:47 
GeneralRe: Windows Explorer ToolTips Pin
Michael Dunn20-Aug-01 22:17
sitebuilderMichael Dunn20-Aug-01 22:17 
Generalcolor picker Pin
20-Aug-01 10:39
suss20-Aug-01 10:39 
GeneralRe: color picker Pin
Christian Graus20-Aug-01 13:13
protectorChristian Graus20-Aug-01 13:13 
GeneralRe: color picker Pin
21-Aug-01 2:27
suss21-Aug-01 2:27 
GeneralProblem with this code Pin
RobJones20-Aug-01 9:48
RobJones20-Aug-01 9:48 
GeneralMFC Control "flickering" Pin
gh20-Aug-01 9:12
gh20-Aug-01 9:12 
GeneralDirectDraw tutorial and basic program Pin
20-Aug-01 8:36
suss20-Aug-01 8:36 
GeneralRe: DirectDraw tutorial and basic program Pin
Uwe Keim21-Aug-01 4:05
sitebuilderUwe Keim21-Aug-01 4:05 
GeneralArrow keys in CDialog Pin
Allen Sun20-Aug-01 8:34
Allen Sun20-Aug-01 8:34 
Generalsolved Pin
Allen Sun20-Aug-01 9:07
Allen Sun20-Aug-01 9:07 
QuestionChange the text color of the text in a statusbar pane? Pin
SnapRick20-Aug-01 7:49
SnapRick20-Aug-01 7:49 
QuestionCListCtrl: How can i hide a column? Pin
spelger20-Aug-01 7:09
spelger20-Aug-01 7:09 

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.