Page 1 of 1

Initial 'utilities' Window showing

Posted: Wed Sep 26, 2007 3:26 am
by Jonathan Hodder
Has anyone encounted these two problems with the
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

// 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

//----------------------------------------------------------------------------//

Posted: Wed Sep 26, 2007 6:48 am
by Antonio Linares
Jonathan,

You have to link GTGUI.LIB instead of GTWIN.LIB

Posted: Wed Sep 26, 2007 6:49 am
by Antonio Linares
> I can post a jpg of the problem if someone could tell me a URL where
I could post it.

www.imageshack.us

upload your image there and copy here the resulting picture url

Posted: Wed Sep 26, 2007 10:54 pm
by Jonathan Hodder
Thanks That works

Posted: Thu Sep 27, 2007 12:00 am
by Jonathan Hodder
Still left with Window Icon problem.

View MDI window problem at

http://profile.imageshack.us/user/testmdi6

Posted: Thu Sep 27, 2007 10:43 pm
by Jonathan Hodder
Still left with Window Icon problem.

View MDI window problem at

http://profile.imageshack.us/user/testmdi6

Parent Icon shows correctly.
First child window icon shows correctly.
Second and third icons replicate the first child window - incorrectly.
Tried reassigning and refreshing second and third child icons
after opening without success.