HMG 3.2 (Stable)

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG 3.2 (Stable)

Post by Pablo César »

srvet_claudio wrote:I fixed!
I guess not yet my friend... please read my PM, seems there still details about MODAL windows and others windows at running preview... :(
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.2 (Stable)

Post by srvet_claudio »

srvet_claudio wrote:
mol wrote:I've found and error in hmg 3.2 / hmg 3.1.5.

Scenario:
1. Define Main window
2. Define modal window with panel window
3. All controls of panel windows are active
4. Print something from modal window with screen preview
5. Controls in panel window become unusable

What's going on?
I fixed!
In the end of the function _HMG_PRINTER_SHOWPREVIEW() (aprox. line 4672 of file h_controlmisc.prg) insert the following code between EnableWindow(ModalHandle) and SetFocus(ModalHandle):

Code: Select all

   FOR i := 1 To HMG_LEN ( _HMG_SYSDATA [ 67 ] )
      IF _HMG_SYSDATA [ 65 ] [i] == .F.
         IF _HMG_SYSDATA [ 69 ] [i] == 'P' .AND. _HMG_SYSDATA [ 70 ] [i] == ModalHandle   // Panel window into Modal window
            EnableWindow ( _HMG_SYSDATA [ 67 ] [i])   // Enable Panel window
         ENDIF
      ENDIF
   NEXT
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG 3.2 (Stable)

Post by Pablo César »

Hola Claudio,

Me voy hacer entender atravéz del video:
[youtube]sBZUmqWWbP0[/youtube]
Como no pude editar el video para agregar la descripcion en palabras, lo haré de forma narrativa.

1. Desde el comienzo del video ( 00:00 x 00:07 ).Verás que no es posible clicar y hacer foco en la ventana "win_main" despues de haber abierto la ventana "win_modal". Ok. Este comportamiento es normal.

2. ( 00:07 x 00:15 ) Despues de haber llamado el preview y bajar la ventana, se puede ver que no hacen focos las ventanas anteriores. Eso porque es de acuerdo con lo ultimo que enviaste. Ok (no habilita todas las ventanas). Este comportamiento tambien es normal.

3. ( 00:15 x 00:29 ) Pero al salir del preview, se puede notar que la ventana "win_modal" permite que se haga foco en la ventana "win_main". Lo que se deduce que la ventana "win_modal" dejó de tener alguna propiedad de MODAL al desabilitarla/habilitarla. Lo que no es normal. :(

Es a este comportamiento al que me referia. Anexo el ejecutable, de acuerdo tu ultima orientación. Espero que de esta vez me haya podido hacer entender...
Attachments
demo5.rar
(847.27 KiB) Downloaded 538 times
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.2 (Stable)

Post by srvet_claudio »

Pablo César wrote:3. ( 00:15 x 00:29 ) Pero al salir del preview, se puede notar que la ventana "win_modal" permite que se haga foco en la ventana "win_main". Lo que se deduce que la ventana "win_modal" dejó de tener alguna propiedad de MODAL al desabilitarla/habilitarla. Lo que no es normal.
Pablo,
you must be an error in your source code, works for me perfect.

Probably you have left in your source code this change:
Pablo César wrote: For whom wants to know about it. Please see h_controlmisc.prg file at line where is:

DisableWindow (_HMG_SYSDATA [ 67 ] ) // see 2 spaces after 67

Please replace for this:

EnableWindow (_HMG_SYSDATA [ 67 ] )


See the executable file.
Attachments
marek2.rar
(876.65 KiB) Downloaded 512 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG 3.2 (Stable)

Post by Pablo César »

srvet_claudio wrote:Pablo,
you must be an error in your source code, works for me perfect.

See the executable file.
Conferi, y puse entre las lineas que indicas en tu mensaje anterior ( entre EnableWindow(ModalHandle) y SetFocus(ModalHandle) ). Tambien lo puse antes como estaba originalmente y no me dió... :(
Screen.PNG
Screen.PNG (52.66 KiB) Viewed 10513 times
srvet_claudio wrote:In the end of the function _HMG_PRINTER_SHOWPREVIEW() (aprox. line 4672 of file h_controlmisc.prg) insert the following code between EnableWindow(ModalHandle) and SetFocus(ModalHandle):

Code: Select all

   FOR i := 1 To HMG_LEN ( _HMG_SYSDATA [ 67 ] )
      IF _HMG_SYSDATA [ 65 ] [i] == .F.
         IF _HMG_SYSDATA [ 69 ] [i] == 'P' .AND. _HMG_SYSDATA [ 70 ] [i] == ModalHandle   // Panel window into Modal window
            EnableWindow ( _HMG_SYSDATA [ 67 ] [i])   // Enable Panel window
         ENDIF
      ENDIF
   NEXT
Tambien removi:

If _HMG_SYSDATA [ 69 ] != 'X'

No sé más que es lo que puede ser. Disculpame... :(
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.2 (Stable)

Post by srvet_claudio »

Pablo César wrote:
srvet_claudio wrote:Pablo,
you must be an error in your source code, works for me perfect.

See the executable file.
Conferi, y puse entre las lineas que indicas en tu mensaje anterior ( entre EnableWindow(ModalHandle) y SetFocus(ModalHandle) ). Tambien lo puse antes como estaba originalmente y no me dió... :(
Screen.PNG
srvet_claudio wrote:In the end of the function _HMG_PRINTER_SHOWPREVIEW() (aprox. line 4672 of file h_controlmisc.prg) insert the following code between EnableWindow(ModalHandle) and SetFocus(ModalHandle):

Code: Select all

   FOR i := 1 To HMG_LEN ( _HMG_SYSDATA [ 67 ] )
      IF _HMG_SYSDATA [ 65 ] [i] == .F.
         IF _HMG_SYSDATA [ 69 ] [i] == 'P' .AND. _HMG_SYSDATA [ 70 ] [i] == ModalHandle   // Panel window into Modal window
            EnableWindow ( _HMG_SYSDATA [ 67 ] [i])   // Enable Panel window
         ENDIF
      ENDIF
   NEXT
Tambien removi:

If _HMG_SYSDATA [ 69 ] != 'X'

No sé más que es lo que puede ser. Disculpame... :(

Anexo mi h_controlmisc.prg por si quieres conferir...


En la linea 4309 de tu imagen debe decir originalmente: DisableWindow (_HMG_SYSDATA [ 67 ] ), en tu imagen dice EnableWindow (la cambiaste y no corregiste).
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG 3.2 (Stable)

Post by mol »

Please write jn English. I'm very often using tablet an smartphone for reading this forum (tablet now) and it is really hard to use google translator....
Besides, I think google translator is very poor while translating from spanish to english.

Ps. Many thanks for your discussion, I'll try this patch tomorrow.
Regards, Marek
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG 3.2 (Stable)

Post by mol »

I've tested with hmg 3.1.5 and it works fine for me.
Thank you, Claudio for your qiuck response!
Regards, Marek
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG 3.2 (Stable)

Post by mol »

Another problem I found, becomes when you define panel window on modal window. Modal window has declared virtual width and height.
When you scrolling modal window, panel window stays still in the same place on screen.
Panel window coordinates (row,col) are independend from its parent window. In my opinion, it's wrong.
See attached sample
Attachments
demo.zip
(1.19 KiB) Downloaded 414 times
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.2 (Stable)

Post by srvet_claudio »

mol wrote:Another problem I found, becomes when you define panel window on modal window. Modal window has declared virtual width and height.
When you scrolling modal window, panel window stays still in the same place on screen.
Panel window coordinates (row,col) are independend from its parent window. In my opinion, it's wrong.
See attached sample
Yes, you're right, also occurs with other types of windows besides the modal.
I will try to fix it.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
Post Reply