Error in size of windows MDICHILD release 16.10

Post Reply
User avatar
mauri.menabue
Posts: 161
Joined: Thu Apr 17, 2008 2:38 pm

Error in size of windows MDICHILD release 16.10

Post by mauri.menabue »

Hi all

Try this example

Code: Select all | Expand



#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
Enrico Maria Giordano
Posts: 8753
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: Error in size of windows MDICHILD release 16.10

Post by Enrico Maria Giordano »

This is better:



Code: Select all | Expand

#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
Antonio Linares
Site Admin
Posts: 42510
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Error in size of windows MDICHILD release 16.10

Post by Antonio Linares »

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
mauri.menabue
Posts: 161
Joined: Thu Apr 17, 2008 2:38 pm

Re: Error in size of windows MDICHILD release 16.10

Post by mauri.menabue »

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
Antonio Linares
Site Admin
Posts: 42510
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Error in size of windows MDICHILD release 16.10

Post by Antonio Linares »

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: 42510
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Error in size of windows MDICHILD release 16.10

Post by Antonio Linares »

Maurizio,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 8753
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: Error in size of windows MDICHILD release 16.10

Post by Enrico Maria Giordano »

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

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

Re: Error in size of windows MDICHILD release 16.10

Post by mauri.menabue »

Hi

Antonio


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

Tia
User avatar
Antonio Linares
Site Admin
Posts: 42510
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Error in size of windows MDICHILD release 16.10

Post by Antonio Linares »

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: 42510
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Error in size of windows MDICHILD release 16.10

Post by Antonio Linares »

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
mauri.menabue
Posts: 161
Joined: Thu Apr 17, 2008 2:38 pm

Re: Error in size of windows MDICHILD release 16.10

Post by mauri.menabue »

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
Antonio Linares
Site Admin
Posts: 42510
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Error in size of windows MDICHILD release 16.10

Post by Antonio Linares »

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
mauri.menabue
Posts: 161
Joined: Thu Apr 17, 2008 2:38 pm

Re: Error in size of windows MDICHILD release 16.10

Post by mauri.menabue »

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
Antonio Linares
Site Admin
Posts: 42510
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Error in size of windows MDICHILD release 16.10

Post by Antonio Linares »

very good :-)

many thanks for your feedback
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply