|
Mohammad A Gdeisat wrote: so I am worried that those icons are not freed until my application exits
yes, you are quite right.
Mohammad A Gdeisat wrote: so, is there a way to unload a loaded icon to free its memory???
No.
There is API DestroyIcon . Buts its for use for destroying icons created by methods other than LoadIcon , like CreateIconIndirect .
See, if you can use any such method.
|
|
|
|
|
Thanks for ur reply,
but what about using DeleteObject() API function? doesn't it free icon memory? I am working on Windows Mobile applications so the resources issue is very critical.
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
I doubt you can use DeleteObject . Its used on GDI objects like logical pen, brush, font, bitmap, region, or palette.
In case of Icon, you can use DestroyIcon ,provided icon is not shared.
Icon loaded using LoadIcon is shared. So can not use DestroyIcon .
I dont know, why and how you are using LoadIcon ?
Can you use some other method?
|
|
|
|
|
I'll be using LoadIcon() for loading icon resources in my application, but I will try to use another function when loading icons from disk files such that they can be destroyed when they are no longer necessary...
Thanks alot for your help
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Hallo,
I need help with interprocess communication. I want to send a message to another process and want to get back a return value, but I don't know how.
I would be very glad if s. o. could help me...
Yours Thomas
|
|
|
|
|
Hi,
you can use sockets using the socket() function, communicate with the other process just as if it is on a remote host, but use the IP "127.0.0.1"
Another way is to use Named Pipes..
There are many several ways like file-sharing or memory sharing but the above are the most common.
Good Luck,
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
And see WM_COPYDATA maybe it is some helpful to you
|
|
|
|
|
I need a API to pop a dialog,which can let the user select a file or a folder.
(The user can choose a file or a folder in the same dialog)
Both of GetOpenFileName Function and SHBrowseForFolder Function can just act the half -_-"
|
|
|
|
|
Can you be more specific.
|
|
|
|
|
well,I want a API to pop up a dialog,and from this dialog,the user can choose either a foler or a file(not only the file or only the folder), then, after the user has selected one (a file or a folder).
I can get the Path or the Name of the file(or the folder) which selected by the user.
thx~~~
|
|
|
|
|
Hope I understood your question
See Standard file open dialog with preview[^] of course its not your answer but you can see how to insert your controls to a file dialog(for example insert a editbox when user click on a file or folder you can show this file with path in this editbox) if its your answer ok but if its not your answer reply to me
|
|
|
|
|
Hi,
I havent seen an API like this, but maybe an idea can solve this...
maybe you can attach both API dialogs to a single parent dialog, I dont know if it works...but I think I have seen this in ACDSee and Winzip...
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
try this..
u can browse both file and folder
BROWSEINFO bi = {0};
bi.ulFlags = BIF_RETURNONLYFSDIRS|BIF_BROWSEINCLUDEFILES ;
LPITEMIDLIST pIt;
pIt = SHBrowseForFolder( &bi );
nave
|
|
|
|
|
How to copy files from one location to current dir using MFC?
Thanks
Raji
|
|
|
|
|
|
RajiRaghu wrote: How to copy files from one location to current dir using MFC?
GetCurrentDirectory will return current directory path!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hello!! i had already posted this question once but did not get much information and so i am posting the question again. can anyone tell me how to get the Manufacturer's serial number (and not the volume number) of Hard disk using C++? i am trying to retrive the hard disk serial number while using Windows9X. i have seen a code which does the same thing, but it does not work for windows9X. can anyone give me any information about this?? thanks..
vijay.
|
|
|
|
|
i think there are third party libraries which enumerate all hardware details in ue pc. google that! best of luck!
['Loka Samastha Sukhino Bhavanthu' - May all beings be happy and free]
|
|
|
|
|
aroli vijay wrote: i have seen a code which does the same thing, but it does not work for windows9X. can anyone give me any information about this?? thanks..
it seems you are using WMI classes! right!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
hello!! thank u for replying. yes, i used WMI classes to write the code but the code with WMI classes does not work for Windows9X. what else can i use instead of WMI classes??
vijay
|
|
|
|
|
So see here[^] maybe it is some helpful to you
|
|
|
|
|
thank u sir. will check this link for information. thnak u for your help
vijay
|
|
|
|
|
my system is to show an image,for instance, "shutter show", during the middle way of show, i would like to pause this show.so how to write this code.thank you!!!!
Li Zhiyuan
11/09/2006
|
|
|
|
|
li zhiyuan wrote: my system is to show an image,for instance, "shutter show", during the middle way of show, i would like to pause this show.so how to write this code.thank you!!!!
Sleep()
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|