HMG 3.2 (Stable)
Posted: Sat Apr 19, 2014 11:43 pm
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!
Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
http://hmgforum.com/
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!
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,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 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 ] )
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
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...
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