I guess not yet my friend... please read my PM, seems there still details about MODAL windows and others windows at running preview...srvet_claudio wrote:I fixed!
HMG 3.2 (Stable)
Moderator: Rathinagiri
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
HMG 3.2 (Stable)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: HMG 3.2 (Stable)
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):srvet_claudio wrote:I fixed!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?
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
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
HMG 3.2 (Stable)
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...
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 582 times
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: HMG 3.2 (Stable)
Pablo,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.
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 552 times
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
HMG 3.2 (Stable)
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ó...srvet_claudio wrote:Pablo,
you must be an error in your source code, works for me perfect.
See the executable file.
Tambien removi: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
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
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: HMG 3.2 (Stable)
Pablo César wrote: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ó...srvet_claudio wrote:Pablo,
you must be an error in your source code, works for me perfect.
See the executable file.
Tambien removi: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
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).
Re: HMG 3.2 (Stable)
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
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
Re: HMG 3.2 (Stable)
I've tested with hmg 3.1.5 and it works fine for me.
Thank you, Claudio for your qiuck response!
Regards, Marek
Thank you, Claudio for your qiuck response!
Regards, Marek
Re: HMG 3.2 (Stable)
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
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 462 times
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: HMG 3.2 (Stable)
Yes, you're right, also occurs with other types of windows besides the modal.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
I will try to fix it.