latest FWH - compiled with the supplied xHarbour.
First : When running a program that opens an MDI window
it creates an initial 'utilities' window before running the program.
If you run the example I can see this as a black
background window with a car icon.
Secondly : The icons of all child windows take on the initial child windows icon.
Again If you run the example each child window should show its own
icon - they all show a printer on my computers.
I can post a jpg of the problem if someone could tell me a URL where
I could post it.
The example is compiled on W2K off an W2003 Server.
The application I'm working on is to be run on W2K W2003S and XP,
all of which show the same problem, so its to do with the FWH or xH versions.
Both FWH and xH have been downloaded from FW today.
Thanks
- Code: Select all Expand view RUN
// From Testmdi6.prg
//#DEFINE FW_LEAN_AND_MEAN
#INCLUDE "FiveWin.ch"
static oWnd, oChild4
//----------------------------------------------------------------------------//
function Main(cTestDir,cDrv)
local oChild1, oChild2, oChild3
local oBar
local oWnd0Icon, oWnd1Icon, oWnd2Icon, oWnd3Icon // Test window icons
DEFINE ICON oWnd0Icon RESOURCE "CAR" // Test window icons
DEFINE ICON oWnd1Icon RESOURCE "PRINTER" // Test window icons
DEFINE ICON oWnd2Icon RESOURCE "TASK" // Test window icons
DEFINE ICON oWnd3Icon RESOURCE "TRASH" // Test window icons
DEFINE WINDOW oWnd TITLE "Controlling MDI menus" MDI // ICON oWnd0Icon // Test window icons
DEFINE WINDOW oChild1 MDICHILD TITLE "First Child" ;
MENU BuildMenu1() MENUINFO 3 ICON oWnd1Icon // Test window icons
ACTIVATE WINDOW oChild1
DEFINE WINDOW oChild2 MDICHILD TITLE "Second Child" ; // No Menu for this
ICON oWnd2Icon // Test window icons
ACTIVATE WINDOW oChild2 ON PAINT oChild2:oIcon:=oWnd2Icon
DEFINE WINDOW oChild3 MDICHILD TITLE "Third Child" ;
MENU BuildMenu3() MENUINFO 2 ICON oWnd3Icon // Test window icons
ACTIVATE WINDOW oChild3
DEFINE BUTTONBAR oBar OF oWnd
DEFINE BUTTON OF oBar ACTION oChild1:SetFocus()
DEFINE BUTTON OF oBar ACTION oChild2:SetFocus()
DEFINE BUTTON OF oBar ACTION oChild3:SetFocus()
DEFINE BUTTON OF oBar GROUP ACTION NewChild()
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
function BuildMenu1()
local oMenu
MENU oMenu
MENUITEM "First"
MENUITEM "Child Menu"
MENUITEM "A SubMenu"
MENU
MENUITEM "I am"
MENUITEM "The first" ACTION MsgInfo( "first child" )
MENUITEM "Child Window"
MENUITEM "Menu"
ENDMENU
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function BuildMenu3()
local oMenu
MENU oMenu
MENUITEM "Third"
MENUITEM "Report Info"
MENU
MENUITEM "Child windows info here"
ENDMENU
MENUITEM "A SubMenu"
MENU
MENUITEM "I am"
MENUITEM "The third" ACTION MsgInfo( "Third child" )
MENUITEM "Child Window"
MENUITEM "Menu"
ENDMENU
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function NewChild()
DEFINE WINDOW oChild4 MDICHILD TITLE "First Child" MENU BuildMenu1()
ACTIVATE WINDOW oChild4
return nil
//----------------------------------------------------------------------------//