FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour check if a control is hidden or not
Posts: 107
Joined: Tue Sep 15, 2009 07:52 AM
check if a control is hidden or not
Posted: Mon Sep 24, 2018 08:15 AM
Could someone please tell me how to detect a hidden control?

I've tried:

Code (fw): Select all Collapse
REDEFINE BUTTONBMP ID 505 OF oFld:aDialogs[3] ;   //show images
         ACTION ( msgstop( GetNMHDRHWndFrom( oBmp[3]:oDlg ) ), ;
         Show_Hide_Img(.F., .T., oDbf, oDlg, @oBmp, @cText, aPedg, cImages) );
         BITMAP ".\images\camera.bmp" 
REDEFINE IMAGE oBmp[3]   ID 400 OF oFld:aDialogs[3] ADJUST UPDATE

msgstop( IsWindowVisible( oBmp[3]:oDlg ) )
msgstop( IsWindowVisible( ::oBmp[3]:oDlg ) )
msgstop( IsWindowVisible( oBmp[3]:oDlg:hWnd ) )
msgstop( IsWindowVisible( ::oBmp[3]:oDlg:hWnd ) )

msgstop( IsWindowVisible( oDlg:hWnd ) )  //<-- this works but I do not need to know if the dialog is hidden, but if the control oBmp [3] of the dialog oDlg has been hidden


I get "Error BASE/1004 Message not found: TIMAGE:ODLG"
Posts: 107
Joined: Tue Sep 15, 2009 07:52 AM
Re: check if a control is hidden or not
Posted: Mon Sep 24, 2018 08:39 AM
Since this was urgent I solve it like this:

Code (fw): Select all Collapse
LOCAL lHide:=.F.
...
REDEFINE BUTTONBMP ID 505 OF oFld:aDialogs[3] ;   //show images
         ACTION ( lHide:= !lHide, ;
         Show_Hide_Img(lHide, .T., oDbf, oDlg, @oBmp, @cText, aPedg, cImages) );
         BITMAP ".\images\camera.bmp"
REDEFINE IMAGE oBmp[3]   ID 400 OF oFld:aDialogs[3] ADJUST UPDATE
...


But it will be nice to know the "right" way

Thanks
Emiliano Llano Díaz
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: check if a control is hidden or not
Posted: Mon Sep 24, 2018 12:15 PM
Code (fw): Select all Collapse
msgstop( IsWindowVisible( oBmp[3]:hWnd ) )


EMG
Posts: 107
Joined: Tue Sep 15, 2009 07:52 AM
Re: check if a control is hidden or not
Posted: Tue Sep 25, 2018 06:11 AM
The only variation I did not try!

:-)

Thanks

ELLD

Code (fw): Select all Collapse
REDEFINE BUTTONBMP ID 505 OF oFld:aDialogs[3] ;   //Show photo
         ACTION Hide_Image( IsWindowVisible(oBmp[3]:hWnd), .T., oDbf, oDlg, @oBmp, @cText, aPedg, cImage) ;
         BITMAP ".\images\camera.bmp"
REDEFINE IMAGE oBmp[3]   ID 400 OF oFld:aDialogs[3] ADJUST UPDATE

Continue the discussion