|
in MDI,you can get the mainFrm pointer like that CFrameWnd *fw = (CFrameWnd *)AfxGetMainWnd().
or you can get the childFrm pointer.
then,you can change the size of Frame like that fm->MoveWindow(CRect).
but when the width of Frame is enought small(like 123),i find that we can't change the width of Frame.
you can try like this,fm->MoveWindow(0,0,50,50);
when you execute the sentence, you can find that it no effect.
who can tell me why?
|
|
|
|
|
in MDI,you can get the mainFrm pointer like that CFrameWnd *fw = (CFrameWnd *)AfxGetMainWnd().
or you can get the childFrm pointer.
then,you can change the size of Frame like that fm->MoveWindow(CRect).
but when the width of Frame is enought small(like 123),i find that we can't change the width of Frame.
you can try like this,fm->MoveWindow(0,0,50,50);
when you execute the sentence, you can find that it no effect.
who can tell why?
|
|
|
|
|
You may try SetWindowPos()
RinuRaj
|
|
|
|
|
MoveWindow actually calling SetWindowPos. So I don't think that there's an alternative effect on which failed in MoveWindow. Since this stuffs are moving related
-Sarath.
The more you can dream the more you can do - Michael Korda"
|
|
|
|
|
How initialized MDI project that when execute ,there is no window ?
how changed MDI Wizard that when execute project there is no CDocument or
CView instance! is that possible?
Best Regards.
MJM.
|
|
|
|
|
Hi,
Does anyone know of a good example or tutorial on how to write shell
extensions, especially a context menu extension?
Radhika.
|
|
|
|
|
read This[^] series of articles...
|
|
|
|
|
|
Thanks,
Is there any good example for doing shell extension to the context menu.
Thanks in advance,
Radhika.
|
|
|
|
|
hey, did you read my post ??
there is anything you want in the series
|
|
|
|
|
ya,i want to add a shell context menu in a SDI.How can i do it.
Radhika.
-- modified at 7:21 Monday 11th September, 2006
|
|
|
|
|
See here[^] maybe it is some helpful to you
|
|
|
|
|
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
|
|
|
|