|
Hello,
I'm working to define a toolbar. I would like to modify the handle.
I have drawn a picture, put it inside the toolbar as handle but I could manage the picture as a handle. I Used a CStatic and then loaded a Bitmap into it.
Does somebody know how to get the picture ID to after allocate it as handle ?
titi
|
|
|
|
|
I am debugging a dll, and I can get to the break point I set. but when I hit the "step foward" or "step to" button, the MSVC get into the disassembly window immediately.
The code around the break point is correct, for expected result can be obtained when it is run not in debugging environment.
to my surprise, I can debug some portion of the program correctly.
I don't have any clue about what is going on. could anyone tell me the possible causes?
Thank you very much!!!
|
|
|
|
|
Could you pls specify the code where such a error occuring .
Also ensure that proper debug information is there for that DLL
RinuRaj
|
|
|
|
|
what is "proper debug infomation for the dll" ?
Thank you very much!!!
|
|
|
|
|
is the DLL compiled in debug mode ?
also, is the code outside the DLL around your breakpoint compiled in debug mode ?
also (2), do you have the sources of what the debugger steps into ?
|
|
|
|
|
thank you very much.
(1) the DLL definitely is copiled in the debug mode
(2) in fact, I am doing secondary development on Autodesk Inventor(a CAD software), so the code outside the dll is not compiled in debug mode. but this can not be the reason, for I have programmed for more than a month and every thing has been good. this problem occurs only today.
(3)sorry, I failed to understand your question (2) clearly.
|
|
|
|
|
Hi,
I am writing an application that loads a large amount of icons in its lifetime, and I use AfxGetApp()->LoadIcon() function to do this, so I am worried that those icons are not freed until my application exits which consumes much memory..
so, is there a way to unload a loaded icon to free its memory???
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
You can use DeleteObject function by passing the handle to the resource
-Sarath.
The more you can dream the more you can do - Michael Korda"
|
|
|
|
|
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.
|
|
|
|