MDI without caption

MDI without caption

Postby Marco Turco » Sat Apr 23, 2011 9:06 am

Hi all,
coult it be possible to create a mdi window without caption and without the system menu ?
I tried using the NOCAPTION and NOSYSMENU flags but the following error appairs at startup.

Path and name: K:\fwh\samples\testmdi.exe (32 bits)
Size: 1,477,632 bytes
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 04/23/11, 11:01:37
Error description: Error BASE/1004 Class: 'NIL' has no exported method: OWNDCLIENT
Args:
[ 1] = U

Any ideas ?


Thanks in advance
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: MDI without caption

Postby nageswaragunupudi » Sat Apr 23, 2011 12:54 pm

Most likely cause could be omission of "MDICHILD OF WndMain()" or if the code is "MDICHILD OF oWndMain", oWndMain could be NIL.

NOCAPTION clause for MDICHILD works as expected.

Please try this code.
Code: Select all  Expand view
#include "FiveWin.Ch"

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

function Main()

   local oWnd, oBar

   DEFINE WINDOW oWnd MDI
   DEFINE BUTTONBAR oBar OF oWnd 2007
   DEFINE BUTTON OF oBar PROMPT "C" ACTION Child()
   SET MESSAGE OF oWnd TO '' 2007
   ACTIVATE WINDOW ownd

return nil

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

static function Child()

   local oWnd

   DEFINE WINDOW oWnd MDICHILD OF WndMain() ;
      NOCAPTION NOSYSMENU ;
      COLOR CLR_BLACK,CLR_HBLUE

   ACTIVATE WINDOW oWnd

return nil

//----------------------------------------------------------------------------//
 
Regards

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

Re: MDI without caption

Postby Marco Turco » Sun Apr 24, 2011 1:50 pm

Yes, but I would like remove the sysmenu and border from the main window,
like this to be clear

function Main()

local oWnd, oBar

DEFINE WINDOW oWnd MDI NOSYSMENU NOCAPTION
DEFINE BUTTONBAR oBar OF oWnd 2007
DEFINE BUTTON OF oBar PROMPT "C" ACTION Child()
SET MESSAGE OF oWnd TO '' 2007
ACTIVATE WINDOW ownd

return nil

Do you know any way to make this ? With this code the error appairs.
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: MDI without caption

Postby ukoenig » Sun Apr 24, 2011 4:35 pm

Marco,

like You can see in the Include-file, I think it is not possible on MDI-frame.
Instead, to show just a empty Screen, You can use a Dialog like :

DEFINE IMAGE oTmp FILENAME c_Path + "\bitmaps\Backgrd.jpg"

DEFINE DIALOG oDlg FROM 0, 0 TO 720, 1004 PIXEL ; // TRANSPARENT ;
STYLE WS_POPUP | WS_VISIBLE // | WS_DLGFRAME | WS_THICKFRAME // Frame disabled
oBrush1 := TBrush():new( ,,,, ResizeBmp( oTmp:hBitmap, 1004, 720, .T. ) )
oDlg:Setbrush( oBrush1 )
oTmp:End()


All Dialogs on Top of to the Main-dialog will need :
...
DEFINE DIALOG oDlg1 FROM 90, 60 TO 390, 500 PIXEL
...
...
ACTIVATE DIALOG oDlg1 NOWAIT ;
...
You can have a look at the new Image-viewer, how to use it.

The Include-section for MDI-windows from Fivewin.ch ( only Border defined ) :

#xcommand DEFINE WINDOW <oWnd> ;
[ FROM <nTop>, <nLeft> TO <nBottom>, <nRight> ] ;
[ TITLE <cTitle> ] ;
[ STYLE <nStyle> ] ;
[ MENU <oMenu> ] ;
[ BRUSH <oBrush> ] ;
[ ICON <oIcon> ] ;
[ MDI ] ;
[ <color: COLOR, COLORS> <nClrFore> [,<nClrBack>] ] ;
[ <vScroll: VSCROLL, VERTICAL SCROLL> ] ;
[ <hScroll: HSCROLL, HORIZONTAL SCROLL> ] ;
[ MENUINFO <nMenuInfo> ] ;
[ [ BORDER ] <border: NONE, SINGLE> ] ;
[ OF <oParent> ] ;
[ <pixel: PIXEL> ] ;

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: MDI without caption

Postby Marco Turco » Mon Apr 25, 2011 12:27 pm

Hi,
solved using oWnd:oMenu:End() on the window activation.
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: MDI without caption

Postby ukoenig » Mon Apr 25, 2011 1:09 pm

Marco,

that doesn't disable the SYSMENU of the MDI-frame !!!
NOSYSMENU doesn't work on MDI-frame.

Image

Best Regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: MDI without caption

Postby Marco Turco » Mon Apr 25, 2011 3:27 pm

Hi,
I only need to disable the main menu because I don't need to create a MDI window I'm using directly oWnd:oWndClient to operate on the MDI.
So it's going well for my case.
Best Regards,

Marco Turco
SOFTWARE XP LLP
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 88 guests