Error in size of windows MDICHILD release 16.10

Error in size of windows MDICHILD release 16.10

Postby mauri.menabue » Fri Nov 18, 2016 10:24 pm

Hi all

Try this example

Code: Select all  Expand view  RUN


#include "FiveWin.ch"

*-------------------------------------------------------------------------------------------
Function Main  
*-------------------------------------------------------------------------------------------
   
   LOCAl oWnd
   
   DEFINE WINDOW oWnd         ;
          TITLE  "Main Form"  ;
          MDI        

   ACTIVATE WINDOW oWnd MAXIMIZED ON INIT NewForm(oWnd)
   
return(nil)


*-------------------------------------------------------------------------------------------
Function NewForm (oMadre)
*-------------------------------------------------------------------------------------------
   
   local oForm1
   local oForm2
   local oDlg
   local nX := 4 / nLoWord( GetDlgBaseUnits() )
   local nY := 8 / nHiWord( GetDlgBaseUnits() )
   
   DEFINE DIALOG oDlg ;
                 OF oMadre ;
                 FROM 100, 100 TO 700, 900 ;
                 PIXEL ;
                 TITLE "Dialog 1"

   @ 10*nY, 10*nX SAY "Codice articolo"  ;
                OF oDlg   ;
                UPDATE    ;
                PIXEL     ;
                SIZE 100 * nX, 20 * nY

   ACTIVATE DIALOG oDlg NOWAIT
   
*--------------------------------------------------------------------------------------
   
   DEFINE WINDOW oForm1 MDICHILD ;
                 OF oMadre ;
                 FROM 100, 100 TO 700, 900 ;
                 PIXEL ;
                 TITLE "New form 1"
   
   @ 10, 10 SAY "Codice articolo"  ;
            OF oForm1   ;
            PIXEL     ;
            UPDATE    ;
            DESIGN    ;
            SIZE 100, 20
                                                     
   ACTIVATE WINDOW oForm1  
   
*--------------------------------------------------------------------------------------

   DEFINE WINDOW oForm2 ;
                 FROM 100, 100 TO 700, 900 ;
                 PIXEL ;
                 TITLE "New form 2"
   
   @ 10, 10 SAY "Codice articolo"  ;
            OF oForm2   ;
            PIXEL     ;
            UPDATE    ;
            DESIGN    ;
            SIZE 100, 20

   ACTIVATE WINDOW oForm2  

return(nil)

 


the size of MDICHILD are wrong

thanks
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: Error in size of windows MDICHILD release 16.10

Postby Enrico Maria Giordano » Sat Nov 19, 2016 10:54 am

This is better:



Code: Select all  Expand view  RUN
#include "FiveWin.ch"


#define SM_CYCAPTION    4
#define SM_CYMENU      15


*-------------------------------------------------------------------------------------------
Function Main  
*-------------------------------------------------------------------------------------------
   
   LOCAl oWnd

   DEFINE WINDOW oWnd         ;
          TITLE  "Main Form"  ;
          MDI        

   ACTIVATE WINDOW oWnd MAXIMIZED ON INIT NewForm(oWnd)
   
return(nil)


*-------------------------------------------------------------------------------------------
Function NewForm (oMadre)
*-------------------------------------------------------------------------------------------
   
   local oForm1
   local oForm2
   local oDlg
   local nX := 4 / nLoWord( GetDlgBaseUnits() )
   local nY := 8 / nHiWord( GetDlgBaseUnits() )
   
   DEFINE DIALOG oDlg ;
                 OF oMadre ;
                 TITLE "Dialog 1"

   @ 10*nY, 10*nX SAY "Codice articolo"  ;
                OF oDlg   ;
                UPDATE    ;
                SIZE 100 * nX, 20 * nY

   ACTIVATE DIALOG oDlg NOWAIT ON INIT oDlg:Move( 100, 100, 900, 700 )
   
*--------------------------------------------------------------------------------------
   
   DEFINE WINDOW oForm1 MDICHILD ;
                 OF oMadre ;
                 TITLE "New form 1"
   
   @ 10, 10 SAY "Codice articolo"  ;
            OF oForm1   ;
            UPDATE    ;
            DESIGN    ;
            SIZE 100, 20
                                                     
   ACTIVATE WINDOW oForm1 ON INIT oForm1:Move( 100 - GETSYSMETRICS( SM_CYCAPTION ) - GETSYSMETRICS( SM_CYMENU ), 100, 900, 700 )
   
*--------------------------------------------------------------------------------------

   DEFINE WINDOW oForm2 ;
                 TITLE "New form 2"
   
   @ 10, 10 SAY "Codice articolo"  ;
            OF oForm2   ;
            UPDATE    ;
            DESIGN    ;
            SIZE 100, 20

   ACTIVATE WINDOW oForm2 ON INIT oForm2:Move( 100, 100, 900, 700 )

return(nil)


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Error in size of windows MDICHILD release 16.10

Postby Antonio Linares » Sun Nov 20, 2016 8:20 am

Here it looks fine

What is the error ? Could you post a screenshot ?

I have noticed that the EXE is not properly closed and has to be closed from the tasks manager
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error in size of windows MDICHILD release 16.10

Postby mauri.menabue » Sun Nov 20, 2016 12:42 pm

hi,

Antonio

in my example try to move say control defined in MDICHIL , the coordinates
and the rect do not reflect the real position of the object.

Also the size of the window are not correct, you must enter the changes
defined in the example of Enrico.

thank Maurizio
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: Error in size of windows MDICHILD release 16.10

Postby Antonio Linares » Sun Nov 20, 2016 5:33 pm

Maurizio,

A fix is required in function

HB_FUNC( CTRLDRAWFOCUS ) // ( hWnd, nOriginRow, nOriginCol, nMRow, nMCol, nMResize )

...

// if( lstrcmp( ClassName, "MDIClient" ) == 0 ) // MDIClient
// iParentsWithCaption++;

I am going to compare Enrico's and your code. I directly tested Enrico proposed example.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error in size of windows MDICHILD release 16.10

Postby Antonio Linares » Sun Nov 20, 2016 5:43 pm

Maurizio,

Enrico's proposed changes are fine for you ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error in size of windows MDICHILD release 16.10

Postby Enrico Maria Giordano » Sun Nov 20, 2016 6:52 pm

No, my changes are for dialog size only. There is another problem in drag the GET control on the MDICHILD.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Error in size of windows MDICHILD release 16.10

Postby mauri.menabue » Sun Nov 20, 2016 11:33 pm

Hi

Antonio


could you give me the bat file to compile the FIVEHC and FIVEH libraries
with BCC7.

Tia
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: Error in size of windows MDICHILD release 16.10

Postby Antonio Linares » Mon Nov 21, 2016 7:39 am

Maurizio,

For PRGs:
for %%f in (*.prg) do c:\harbour\bin\harbour %%f /n /ic:\fwh\include;c:\harbour\include
for %%f in (*.c) do c:\bcc7\bin\bcc32 -c -Ic:\bcc7\include;c:\harbour\include %%f
for %%f in (*.obj) do c:\bcc7\bin\tlib fiveh.lib -+ %%f /0 /P32,,

For C files:
for %%f in (*.c) do c:\bcc7\bin\bcc32 -c -Ic:\bcc7\include;c:\harbour\include %%f
for %%f in (*.obj) do c:\bcc7\bin\tlib fivehc.lib -+ %%f /0 /P32,,
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error in size of windows MDICHILD release 16.10

Postby Antonio Linares » Mon Nov 21, 2016 7:40 am

Enrico Maria Giordano wrote:...There is another problem in drag the GET control on the MDICHILD.

EMG


Already fixed on a previous post:

viewtopic.php?p=195650#p195650
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Re: Error in size of windows MDICHILD release 16.10

Postby mauri.menabue » Mon Nov 21, 2016 9:40 pm

Antonio
I try to compile C program in fwh\source\winapi
bat there are problem as example

setmult.c:
Error E2141 setmult.c 11: Declaration syntax error
*** 1 errors in Compile ***
Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc.
settext.c:
Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc.
shell.c:
Error E2141 shell.c 57: Declaration syntax error
*** 1 errors in Compile ***

..
and many other


please help me !

Tia
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: Error in size of windows MDICHILD release 16.10

Postby Antonio Linares » Tue Nov 22, 2016 8:09 am

Maurizio,

You can not rebuild FWH libs entirely as there are some internals modules that are not provided

The batch that I shown you it is just to modify and replace some modules
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error in size of windows MDICHILD release 16.10

Postby mauri.menabue » Tue Nov 22, 2016 3:23 pm

Hi Antonio
I only compiled ctrldraw and now the MDICHILD is OK !


The new implementations done in these months of FWH are really great!

thank Maurizio
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: Error in size of windows MDICHILD release 16.10

Postby Antonio Linares » Tue Nov 22, 2016 10:01 pm

very good :-)

many thanks for your feedback
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 75 guests