Click here to Skip to main content
15,900,816 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to get materials of Text To Speech Pin
Ajesh.Sreevalsa26-Jun-06 18:18
Ajesh.Sreevalsa26-Jun-06 18:18 
QuestionPlease wireless Signal Strength know~~ Pin
Jung Sung Uk26-Jun-06 14:32
Jung Sung Uk26-Jun-06 14:32 
QuestionChanging the color of a Button Control (Win32 API) Pin
capricious_00126-Jun-06 11:50
capricious_00126-Jun-06 11:50 
AnswerRe: Changing the color of a Button Control (Win32 API) Pin
alex.barylski26-Jun-06 16:12
alex.barylski26-Jun-06 16:12 
Questionchange files attributes Pin
RomTibi26-Jun-06 11:49
RomTibi26-Jun-06 11:49 
AnswerRe: change files attributes Pin
Michael Dunn26-Jun-06 11:59
sitebuilderMichael Dunn26-Jun-06 11:59 
AnswerRe: change files attributes Pin
Hamid_RT26-Jun-06 19:32
Hamid_RT26-Jun-06 19:32 
QuestionSaving Image to the same file. (GDI+) Pin
1980soyo26-Jun-06 11:35
1980soyo26-Jun-06 11:35 
Hello there.

I am writing picture editor and I have a problem with saving images to the same file.

Of course I can save them to the different file names, but not to the original filename.

So I've searched and found a page where are couple of steps that I have to do.

1. Open the image file
2. create a temporary in-memory image the same size as the original
3. obtain a Graphics object for the temporary image
4. Draw the original image onto the temporary one
5. dispose of the original
6. do any drawing you'd like on the image using the Graphics you have
7. Dispose of the Graphics
8. Write the temporary file to any filename and any format you please including the same name and format if you wish.

The idea is clear to me, and I know what I have to do, but I have one problem.

There is no such function as Dispose() in GDI+. It is in MFC of course, but not in GDI and I don't know how to "Close the file" so I can save the image under the same filename.

I've tried CloseHandle(HANDLE) function, but it seems it doesn't work.

Can anybody help me with this ?

soyo
AnswerRe: Saving Image to the same file. (GDI+) Pin
Ennis Ray Lynch, Jr.26-Jun-06 12:30
Ennis Ray Lynch, Jr.26-Jun-06 12:30 
AnswerRe: Saving Image to the same file. (GDI+) Pin
Joe Woodbury26-Jun-06 12:46
professionalJoe Woodbury26-Jun-06 12:46 
AnswerRe: Saving Image to the same file. (GDI+) Pin
1980soyo26-Jun-06 22:47
1980soyo26-Jun-06 22:47 
GeneralRe: Saving Image to the same file. (GDI+) Pin
Joe Woodbury27-Jun-06 6:06
professionalJoe Woodbury27-Jun-06 6:06 
Questiondeclaring a global variable Pin
Tara1426-Jun-06 8:31
Tara1426-Jun-06 8:31 
AnswerRe: declaring a global variable Pin
Jun Du26-Jun-06 8:48
Jun Du26-Jun-06 8:48 
GeneralRe: declaring a global variable [modified] Pin
Tara1426-Jun-06 9:06
Tara1426-Jun-06 9:06 
QuestionRe: declaring a global variable Pin
David Crow26-Jun-06 9:09
David Crow26-Jun-06 9:09 
AnswerRe: declaring a global variable Pin
Tara1426-Jun-06 9:15
Tara1426-Jun-06 9:15 
GeneralRe: declaring a global variable Pin
David Crow26-Jun-06 9:20
David Crow26-Jun-06 9:20 
GeneralRe: declaring a global variable Pin
Tara1426-Jun-06 10:19
Tara1426-Jun-06 10:19 
GeneralRe: declaring a global variable Pin
Anilkumar K V26-Jun-06 18:22
Anilkumar K V26-Jun-06 18:22 
GeneralRe: declaring a global variable Pin
Zac Howland26-Jun-06 9:29
Zac Howland26-Jun-06 9:29 
AnswerRe: declaring a global variable Pin
Jun Du26-Jun-06 9:25
Jun Du26-Jun-06 9:25 
GeneralRe: declaring a global variable Pin
Tara1426-Jun-06 9:44
Tara1426-Jun-06 9:44 
GeneralRe: declaring a global variable Pin
Zac Howland26-Jun-06 9:54
Zac Howland26-Jun-06 9:54 
GeneralRe: declaring a global variable Pin
Jun Du26-Jun-06 10:20
Jun Du26-Jun-06 10:20 

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.