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

C / C++ / MFC

 
GeneralRe: InternetQueryOption linking error Pin
si_6911-Aug-03 22:58
si_6911-Aug-03 22:58 
GeneralRe: InternetQueryOption linking error Pin
Steve S12-Aug-03 0:41
Steve S12-Aug-03 0:41 
GeneralGroup Box - Change color border Pin
JensB11-Aug-03 22:43
JensB11-Aug-03 22:43 
GeneralRe: Group Box - Change color border Pin
Iain Clarke, Warrior Programmer11-Aug-03 23:08
Iain Clarke, Warrior Programmer11-Aug-03 23:08 
GeneralRe: Group Box - Change color border Pin
JensB11-Aug-03 23:44
JensB11-Aug-03 23:44 
Generall Pin
Anonymous11-Aug-03 22:31
Anonymous11-Aug-03 22:31 
GeneralRe: l Pin
Rickard Andersson2011-Aug-03 22:39
Rickard Andersson2011-Aug-03 22:39 
GeneralHelp in Picture Pin
henli11-Aug-03 22:20
henli11-Aug-03 22:20 
I load image file (.jgep) into picture control by using this code;

m_image.Load(m_SavePath);
m_CPicture.SetBitmap((HBITMAP)m_image);

This code is same with vb.net code:

picoriginal.Image = Image.FromFile(m_SavePath)

After that I need to cut a portion of the image and put it into another picture control with this code;

hdcDest = ::GetDC( CpThis->m_CpDest->GetSafeHwnd() );
hdcSrc = ::GetDC( CpThis->m_CpSource->GetSafeHwnd() );

::SelectObject( hdcSrc, CpThis->m_BackSurface.hBmp );

::StretchBlt(hdcDest,0,0,300,400,hdcSrc,pointlx,
pointly,cutwidth,cutheight,SRCCOPY);

::DeleteDC( hdcSrc );
::ReleaseDC( CpThis->m_CpDest->GetSafeHwnd(), hdcDest );

With this code the portion oh the image that have been cut is handle by hdcDest.

The problem is how I can save the cutting image into the new file(.jpeg)?

I can do it in vb. net by using this code;

picresult.Image.Save(Apath & "\result.jpg", Imaging.ImageFormat.Jpeg)
savebmap.Save(Apath & "\resultraw.raw")

How to translate this code into vc++ code?

Any idea to solve my problem, I apreciate it. Thanks.
GeneralRe: Help in Picture Pin
Steve S12-Aug-03 0:31
Steve S12-Aug-03 0:31 
GeneralRe: Help in Picture Pin
henli12-Aug-03 5:03
henli12-Aug-03 5:03 
QuestionIs there free MCSD materials, questions (70-015)? Pin
vgrigor11-Aug-03 22:08
vgrigor11-Aug-03 22:08 
GeneralPopup menu question Pin
Cedric Moonen11-Aug-03 22:06
Cedric Moonen11-Aug-03 22:06 
GeneralRe: Popup menu question Pin
HPSI11-Aug-03 22:25
HPSI11-Aug-03 22:25 
GeneralRe: Popup menu question Pin
Cedric Moonen11-Aug-03 22:46
Cedric Moonen11-Aug-03 22:46 
Generallanguage classes for VC++6.0 Pin
Andrei Druta11-Aug-03 22:02
Andrei Druta11-Aug-03 22:02 
GeneralRe: language classes for VC++6.0 Pin
Steve S12-Aug-03 0:37
Steve S12-Aug-03 0:37 
GeneralRe: language classes for VC++6.0 Pin
Andrei Druta12-Aug-03 2:31
Andrei Druta12-Aug-03 2:31 
GeneralRe: language classes for VC++6.0 Pin
David Crow12-Aug-03 4:25
David Crow12-Aug-03 4:25 
GeneralRe: language classes for VC++6.0 Pin
YaronNir12-Aug-03 1:21
YaronNir12-Aug-03 1:21 
GeneralRe: language classes for VC++6.0 Pin
Andrei Druta12-Aug-03 2:33
Andrei Druta12-Aug-03 2:33 
GeneralDrawing on DialogBox Pin
El'Cachubrey11-Aug-03 21:57
El'Cachubrey11-Aug-03 21:57 
Generalnonblocking server and FD_WRITE Pin
Rickard Andersson2011-Aug-03 21:03
Rickard Andersson2011-Aug-03 21:03 
GeneralRe: nonblocking server and FD_WRITE Pin
geo_m11-Aug-03 22:29
geo_m11-Aug-03 22:29 
GeneralRe: nonblocking server and FD_WRITE Pin
Rickard Andersson2011-Aug-03 22:44
Rickard Andersson2011-Aug-03 22:44 
GeneralRe: nonblocking server and FD_WRITE Pin
geo_m12-Aug-03 0:53
geo_m12-Aug-03 0:53 

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.