Bug in TBtnBmp and dialogs

Bug in TBtnBmp and dialogs

Postby Enrico Maria Giordano » Wed Dec 05, 2007 9:48 am

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  Expand view  RUN
#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
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Postby Antonio Linares » Tue Dec 11, 2007 11:15 am

Enrico,

Fixed :-)

Please add this code to Class TDialog:
Code: Select all  Expand view  RUN
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
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby driessen » Tue Dec 11, 2007 12:03 pm

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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Antonio Linares » Tue Dec 11, 2007 12:23 pm

Michel,

Have you tested with FWH 7.12 ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Tue Dec 11, 2007 1:28 pm

Antonio Linares wrote:Enrico,

Fixed :-)

Please add this code to Class TDialog:


Thank you!

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby norberto » Tue Dec 11, 2007 2:04 pm

antonio, this is for 7.11 or 7.12 or too?
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Postby Antonio Linares » Tue Dec 11, 2007 2:26 pm

Norberto,

For both and previous versions too
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42107
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 48 guests