FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To Antonio : Dialog with old caption
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
To Antonio : Dialog with old caption
Posted: Wed Apr 15, 2009 04:25 PM
I want create a simply WINDOW with the old caption (no 32 bit and not theme ), No modify ( dimensions), no system Menu
How I can make it ?

Code (fw): Select all Collapse
function Main()

   local oBar

   DEFINE WINDOW oWnd TITLE "TEST GENERATION" MDI  HSCROLL

   DEFINE BUTTONBAR oBar 3D SIZE 25, 25 OF oWnd

   DEFINE BUTTON OF oBar ACTION GenChild()

   ACTIVATE WINDOW oWnd MAXIMIZED

   return nil


   function GenChild()
   local oWndChild, oBar, oBmp
   DEFINE WINDOW oWndChild OF oWnd MDICHILD FROM 0,0 TO 20,200 COLOR "N/W"
   oWndChild:nstyle:=nOR( WS_CAPTION,4 )
   ACTIVATE WINDOW  oWndChild
   return nil
Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio : Dialog with old caption
Posted: Wed Apr 15, 2009 10:24 PM

Silvio,

> a simply WINDOW with the old caption

What is it the "old caption" ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: To Antonio : Dialog with old caption
Posted: Thu Apr 16, 2009 10:52 AM
look it please :
Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio : Dialog with old caption
Posted: Thu Apr 16, 2009 11:15 AM

Silvio,

You can create a WINDOW with no caption and buttons, and paint that rectangle yourself, the way you want it.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: To Antonio : Dialog with old caption
Posted: Thu Apr 16, 2009 11:20 AM

ok

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: To Antonio : Dialog with old caption
Posted: Thu Apr 16, 2009 07:59 PM
Antonio,
I try it but I not Know how not show the button and show old style
Can you help me How
Code (fw): Select all Collapse
 
CLASS TMyWindow FROM TWindow

    CLASSDATA lRegistered AS LOGICAL

    METHOD New( nTop, nLeft, nBottom, nRight, cTitle)

   ENDCLASS

METHOD New( nTop, nLeft, nBottom, nRight, cTitle)  CLASS TMyWindow

   ::nTop      = nTop * If( lPixel, 1, WIN_CHARPIX_H )
   ::nLeft     = nLeft * If( lPixel, 1, WIN_CHARPIX_W )
   ::nBottom   = nBottom * If( lPixel, 1, WIN_CHARPIX_H )
   ::nRight    = nRight * If( lPixel, 1, WIN_CHARPIX_W )

   ::nStyle    = nStyle
   ::cCaption  = cTitle
   ::oCursor   = oCursor
   ::oMenu     = oMenu
   ::oWnd      = oWnd
   ::oIcon     = oIcon
   ::lVisible  = .t.               // As soon as we create it, it exists!
   ::aControls = {}
   ::nLastKey  = 0
   ::lValidating = .f.

     SetWndDefault( Self )                   // Set Default DEFINEd Window

return Self
Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio : Dialog with old caption
Posted: Thu Apr 16, 2009 08:02 PM

Silvio,

Please review FWH\samples\TestMMov.prg

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: To Antonio : Dialog with old caption
Posted: Thu Apr 16, 2009 08:04 PM

sorry I not have this file

Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio : Dialog with old caption
Posted: Thu Apr 16, 2009 08:26 PM
Silvio,

Code (fw): Select all Collapse
// Moving a window, with the mouse, without a caption

#include "FiveWin.ch"

function Main()

   local oWnd, nRowPos, nColPos, lDrag := .F., oCrsHand

   DEFINE CURSOR oCrsHand HAND

   DEFINE WINDOW oWnd STYLE WS_POPUP COLOR "W/R"

   oWnd:bLClicked := { | nRow, nCol | nRowPos := nRow, nColPos := nCol, lDrag := .T., oWnd:oCursor := oCrsHand }
      
   oWnd:bMMoved = { | nRow, nCol | If( lDrag, oWnd:Move( oWnd:nTop + nRow - nRowPos,;
                                         oWnd:nLeft + nCol - nColPos ),) }   

   oWnd:bLButtonUp := { || lDrag := .F., oWnd:oCursor := nil }

   ACTIVATE WINDOW oWnd
      
return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: To Antonio : Dialog with old caption
Posted: Thu Apr 16, 2009 08:30 PM

I think You not understand me ,
I want create childwindow into a MDI window with No caption and no button and with old 16 bit style
and the user cannot modify the size (height and width)

Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio : Dialog with old caption
Posted: Thu Apr 16, 2009 08:40 PM

Silvio,

Please review FWH\samples\TestSize.prg to control the size.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: To Antonio : Dialog with old caption
Posted: Thu Apr 16, 2009 08:42 PM

sorry I not have this file

Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio : Dialog with old caption
Posted: Thu Apr 16, 2009 09:20 PM
Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local oWnd

   DEFINE WINDOW oWnd FROM 3, 6 TO 20, 70 ;
      TITLE "Welcome to FiveWin" ;
      COLOR "W+/B"

   @ 2, 2 SAY "Resize me" OF oWnd SIZE 100, 20

   oWnd:aMinMaxInfo = { 200, 200,;  // xMaxSize,      yMaxSize
                         50,  50,;  // xMaxPosition,  yMaxPosition
                         80,  80,;  // xMinTrackSize, yMinTrackSize
                        150, 150 }  // xMaxTrackSize, yMaxTrackSize

   ACTIVATE WINDOW oWnd MAXIMIZED

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion