To All
I am sure there is a simple solution .. I am not seeing the 'default' icon that is 'burnt' into my executable on the MDI and MDI child windows. All I see is a 'blank' icon in the upper left corner of my application.
In the old 16 bit days .. the icon always appeared on my MDI and MDI childs .. This has not really bothered me until now
Just curious what I need to do to to either 'define' or 'redefine' my icon from the resource.
Thanks
Rick Lipkin
SC Dept of Health
Icon on MDI and MDI Child
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Rick,
For the main window you may do:
and add this to your RC:
test ICON "..\icons\fivewin.ico"
and the same for the mdichilds:
For the main window you may do:
Code: Select all
DEFINE ICON oIcon RESOURCE "test"
DEFINE WINDOW oWnd FROM 1, 1 TO 20, 70 TITLE "I am the MDI Frame" ;
MDI ;
MENU BuildMenu() ;
ICON oIcon
test ICON "..\icons\fivewin.ico"
and the same for the mdichilds:
Code: Select all
DEFINE ICON oIcon RESOURCE "test"
DEFINE WINDOW oWndChild MDICHILD OF oWnd ICON oIcon
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Antonio
All my icons are in a file called icons.rc which gets compiled to icons.res. I chose Icons.res to link into my executable.
I was hoping to use the icon resource from the executable ( since it is already burnt in ) ant not add it ( as well ) to my external .dll.
Is it possible to "grab" the icon from the executable ?? or would it be best to also import it into my external .dll and redefine it from there ??
Thanks
Rick Lipkin
All my icons are in a file called icons.rc which gets compiled to icons.res. I chose Icons.res to link into my executable.
I was hoping to use the icon resource from the executable ( since it is already burnt in ) ant not add it ( as well ) to my external .dll.
Is it possible to "grab" the icon from the executable ?? or would it be best to also import it into my external .dll and redefine it from there ??
Thanks
Rick Lipkin
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Antonio
I like the other idea better ... I will import the icons into my external .dll and burn them into the Executable as well because i am already setting the resources to that file anyway ..
I have been playing with the mdi childs and surprisingly some of the mdichilds seem to inherit the icon from the parent without defining the icon in the child .. wierd. It does not happen all the time and where I define the icon .. I use a Local variable object so it should not filter down to the other modules .. not a big deal .. just curious.
Thanks for your quick responce.
Rick Lipkin
I like the other idea better ... I will import the icons into my external .dll and burn them into the Executable as well because i am already setting the resources to that file anyway ..
I have been playing with the mdi childs and surprisingly some of the mdichilds seem to inherit the icon from the parent without defining the icon in the child .. wierd. It does not happen all the time and where I define the icon .. I use a Local variable object so it should not filter down to the other modules .. not a big deal .. just curious.
Thanks for your quick responce.
Rick Lipkin