Bug in TBtnBmp and dialogs

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Bug in TBtnBmp and dialogs

Post by Enrico Maria Giordano »

In the following sample, please place the mouse pointer over the button and try to close the dialog using ALT-F4. It will not close.

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    DEFINE DIALOG oDlg

    @ 1, 1 BTNBMP;
           FILE "C:\FWH\BITMAPS\OPEN.BMP";
           NOBORDER

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Enrico,

Fixed :-)

Please add this code to Class TDialog:

Code: Select all

METHOD SysCommand( nWParam, nLParam ) CLASS TDialog

   if nWParam == SC_CLOSE .and. ::lModal
      if GetCapture() != 0  // New !
         ReleaseCapture()  // New !
      endif                       // New !
      return .f.
   endif

   ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Post by driessen »

Is it possible that the problem doesn't occur when creating dialogs from resources ?

I don't have the problem in my application.

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Michel,

Have you tested with FWH 7.12 ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

Antonio Linares wrote:Enrico,

Fixed :-)

Please add this code to Class TDialog:
Thank you!

EMG
norberto
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Post by norberto »

antonio, this is for 7.11 or 7.12 or too?
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Norberto,

For both and previous versions too
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply