To Antonio : Dialog with old caption

To Antonio : Dialog with old caption

Postby Silvio » Wed Apr 15, 2009 4: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: Select all  Expand view
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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: To Antonio : Dialog with old caption

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: To Antonio : Dialog with old caption

Postby Silvio » Thu Apr 16, 2009 10:52 am

look it please :
Image
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: To Antonio : Dialog with old caption

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: To Antonio : Dialog with old caption

Postby Silvio » Thu Apr 16, 2009 11:20 am

ok
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: To Antonio : Dialog with old caption

Postby Silvio » Thu Apr 16, 2009 7: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: Select all  Expand view

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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: To Antonio : Dialog with old caption

Postby Antonio Linares » Thu Apr 16, 2009 8:02 pm

Silvio,

Please review FWH\samples\TestMMov.prg
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: To Antonio : Dialog with old caption

Postby Silvio » Thu Apr 16, 2009 8:04 pm

sorry I not have this file
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: To Antonio : Dialog with old caption

Postby Antonio Linares » Thu Apr 16, 2009 8:26 pm

Silvio,

Code: Select all  Expand view

// 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: To Antonio : Dialog with old caption

Postby Silvio » Thu Apr 16, 2009 8: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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: To Antonio : Dialog with old caption

Postby Antonio Linares » Thu Apr 16, 2009 8:40 pm

Silvio,

Please review FWH\samples\TestSize.prg to control the size.
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: To Antonio : Dialog with old caption

Postby Silvio » Thu Apr 16, 2009 8:42 pm

sorry I not have this file
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: To Antonio : Dialog with old caption

Postby Antonio Linares » Thu Apr 16, 2009 9:20 pm

Code: Select all  Expand view

#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
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: No registered users and 84 guests