MDICHILD - Icons

MDICHILD - Icons

Postby nageswaragunupudi » Sun Sep 06, 2009 1:50 pm

Is there any way I can have different Icons for different MDICHILD windows ?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: MDICHILD - Icons

Postby Rick Lipkin » Sun Sep 06, 2009 2:31 pm

Rao

You will have to define each child with its own icon :

Code: Select all  Expand view

DEFINE ICON oICO RESOURCE "WALKING"

DEFINE WINDOW oWnd1 ;
       FROM 3,1 to 30,100 ;
       of oWndMdi         ;
       Menu Buildmenu();
       TITLE cTITLE       ;
       ICON oICO ;
       NoMinimize ;
       NoZoom ;
       MdiChild
 


Rick
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: MDICHILD - Icons

Postby Antonio Linares » Sun Sep 06, 2009 3:41 pm

Rao,

Fixed. It was a bug that may have been introduced in FWH recently.

These are the required changes in source\classes\mdichild.prg:
Code: Select all  Expand view

...
   if ! ::lRegistered
      ::lRegistered = RegisterClass( "TMDICHILD",;
                                     nOR( CS_VREDRAW, CS_HREDRAW, CS_DBLCLKS ),;
                                     0, 0, 0, 0, 0, "", GetMDIChlProc() )
   endif
...
   if oIcon != nil
      ::SendMsg( WM_SETICON, 0, oIcon:hIcon )
   endif
 

Thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: MDICHILD - Icons

Postby Rick Lipkin » Sun Sep 06, 2009 7:26 pm

Antonio

I have noticed from time to time that the child icons would appear and dissapear as inherited from the MDI .. I just never gave it much thought so I decided to define my own ..

Thanks ..
Rick

ps .. I know this may be a MS restriction .. but is there a way to inherit the aero glass frame from a MDI to its child ??
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: MDICHILD - Icons

Postby Antonio Linares » Sun Sep 06, 2009 9:53 pm

Rick,

I have noticed from time to time that the child icons would appear and dissapear as inherited from the MDI .. I just never gave it much thought so I decided to define my own ..

With the proposed and tested fix, it should work ok now.

ps .. I know this may be a MS restriction .. but is there a way to inherit the aero glass frame from a MDI to its child ??

No, sorry, it seems as a Windows behavior restriction.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 91 guests