Click here to Skip to main content
15,913,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OnMouseWheel and OnSetCursor interaction Pin
Member 1325158810-Jan-21 13:56
Member 1325158810-Jan-21 13:56 
GeneralRe: OnMouseWheel and OnSetCursor interaction Pin
Richard MacCutchan10-Jan-21 22:45
mveRichard MacCutchan10-Jan-21 22:45 
GeneralRe: OnMouseWheel and OnSetCursor interaction Pin
Member 1325158811-Jan-21 17:05
Member 1325158811-Jan-21 17:05 
QuestionHow to get access to CMyView variables from CMainFrame in MFC Pin
Member 1503370431-Dec-20 6:15
Member 1503370431-Dec-20 6:15 
QuestionRe: How to get access to CMyView variables from CMainFrame in MFC Pin
David Crow31-Dec-20 8:41
David Crow31-Dec-20 8:41 
AnswerRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Member 1503370431-Dec-20 20:47
Member 1503370431-Dec-20 20:47 
QuestionRe: How to get access to CMyView variables from CMainFrame in MFC Pin
David Crow1-Jan-21 4:40
David Crow1-Jan-21 4:40 
AnswerRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Member 150337041-Jan-21 4:59
Member 150337041-Jan-21 4:59 
AnswerRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Richard MacCutchan31-Dec-20 21:26
mveRichard MacCutchan31-Dec-20 21:26 
GeneralRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Member 150337041-Jan-21 4:52
Member 150337041-Jan-21 4:52 
GeneralRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Richard MacCutchan1-Jan-21 4:55
mveRichard MacCutchan1-Jan-21 4:55 
GeneralRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Member 150337041-Jan-21 5:06
Member 150337041-Jan-21 5:06 
GeneralRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Richard MacCutchan1-Jan-21 5:13
mveRichard MacCutchan1-Jan-21 5:13 
GeneralRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Member 150337044-Jan-21 7:07
Member 150337044-Jan-21 7:07 
GeneralRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Richard MacCutchan4-Jan-21 9:46
mveRichard MacCutchan4-Jan-21 9:46 
AnswerRe: How to get access to CMyView variables from CMainFrame in MFC Pin
11917640 Member 4-Jan-21 22:29
11917640 Member 4-Jan-21 22:29 
GeneralRe: How to get access to CMyView variables from CMainFrame in MFC Pin
Member 150337045-Jan-21 2:44
Member 150337045-Jan-21 2:44 
Questionhaving problem to find an error Pin
bot-joy28-Dec-20 7:25
bot-joy28-Dec-20 7:25 
AnswerRe: having problem to find an error Pin
jeron128-Dec-20 7:40
jeron128-Dec-20 7:40 
AnswerRe: having problem to find an error Pin
CPallini28-Dec-20 20:22
mveCPallini28-Dec-20 20:22 
QuestionRe: having problem to find an error Pin
David Crow29-Dec-20 3:14
David Crow29-Dec-20 3:14 
AnswerRe: having problem to find an error Pin
Patrice T30-Dec-20 12:42
mvePatrice T30-Dec-20 12:42 
Questiongdi+ bitmap save on existing file - showing error Pin
Gopi Nath24-Dec-20 22:21
Gopi Nath24-Dec-20 22:21 
Hello,

I am trying to draw an image (2nd image) over the other image (existing image file - 1st image) using gdi+ bitmap and graphics and then saving (overwriting) the same 1st image file. But saving is not getting done, when i use GetLasError(), it shows error message,
"The process cannot access the file because it is being used by another process"

Here is the code what i am doing.

C++
<pre>Gdiplus::Bitmap *gpBitmap = new Gdiplus::Bitmap(mImagePath1); /// existing image file
Gdiplus::Graphics *gr = Gdiplus::Graphics::FromImage(gpBitmap);

Gdiplus::Bitmap img(mImagePath2); // second image 
Gdiplus::Bitmap* pThumbnail = static_cast<Gdiplus::Bitmap*>(img.GetThumbnailImage(32, 32, NULL, NULL));
gr->DrawImage(pThumbnail, newWpos, newHpos); // drawing the second image on some position of first image

Gdiplus::Status stat = gpBitmap->Save(mImagePath1, pClsid); // pClsid - image encoder set for png output


I tried making copy also, but same issue.

please suggest.

Regards,
Gopi.
AnswerRe: gdi+ bitmap save on existing file - showing error Pin
Richard MacCutchan24-Dec-20 23:33
mveRichard MacCutchan24-Dec-20 23:33 
GeneralSolved - gdi+ bitmap save on existing file - showing error Pin
Gopi Nath24-Dec-20 23:53
Gopi Nath24-Dec-20 23: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.