FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bug in bMMoved
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in bMMoved
Posted: Thu Jun 05, 2008 01:28 PM
In the following sample, nCol is correctly updated while moving the WINDOW but nRow is always zero:

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd

    DEFINE WINDOW oWnd;
           FROM 10,10 TO 20,70

    SET MESSAGE OF oWnd

    oWnd:bMoved = { | nRow, nCol | oWnd:SetMsg( LTrim( Str( nRow ) ) + ", " + LTrim( Str( nCol ) ) ) }

    ACTIVATE WINDOW oWnd

    RETURN NIL


EMG
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Bug in bMMoved
Posted: Thu Jun 05, 2008 01:40 PM

you write oWnd:bMoved =... my by oWnd:bMMoved

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in bMMoved
Posted: Thu Jun 05, 2008 04:50 PM

bMoved is evaluated when the window is moving while bMMoved is evaluated when the mouse is moving. They are two different events.

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bug in bMMoved
Posted: Thu Jun 05, 2008 05:09 PM
Enrico,

You are right, nRow shows as zero. But curiously FWH source code seems to be fine. From the Windows API docs:

WM_MOVE
xPos = (int) LOWORD(lParam); // horizontal position
yPos = (int) HIWORD(lParam); // vertical position

And this is the FWH code:
      case nMsg == WM_MOVE
           return ::Moved( nLoWord( nLParam ), nHiWord( nLParam ) )


Lets double check nLoWord() source code...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bug in bMMoved
Posted: Thu Jun 05, 2008 05:16 PM

And nLoWord() source code seems to be fine.

We have a mistery :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bug in bMMoved
Posted: Thu Jun 05, 2008 05:24 PM

Enrico,

Fixed. It was a little bug in the low level source code.

I email you the fixed lib, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in bMMoved
Posted: Thu Jun 05, 2008 05:27 PM
It seems that the code you cited is for XPP only, if I'm not wrong:

#ifdef __XPP__

METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TWindow


EMG
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in bMMoved
Posted: Thu Jun 05, 2008 05:28 PM
Antonio Linares wrote:Enrico,

Fixed. It was a little bug in the low level source code.

I email you the fixed lib, thanks


Thank you!

EMG
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in bMMoved
Posted: Thu Jun 05, 2008 05:54 PM
Antonio Linares wrote:Enrico,

Fixed. It was a little bug in the low level source code.

I email you the fixed lib, thanks


It works fine! Many thanks.

EMG
Posts: 167
Joined: Thu Mar 22, 2007 11:24 AM
Bug in bMMoved
Posted: Fri Jun 06, 2008 07:09 AM

This was already reported 9 october 2005 , also a error in fivewin.ch

ON MOVE from dialog or window

Hello,

Trying to use ON MOVE , you can try
Code:

include "fivewin.ch"

FUNC MAIN
LOCAL oWnd
DEFINE WINDOW oWnd FROM 10,10 TO 20,70
SET MESSAGE OF oWnd TO "TEST ON MOVE" CLOCK DATE KEYBOARD NOINSET
oWnd:bMoved := {|nRow,nCol|oWnd:setMsg(LTRIM(STR(nRow)) + " , " + LTRIM(STR(nCol)))}
ACTIVATE DIALOG oWnd
RETURN

Notes :

1) The result is WRONG , nRow is always 0

2) Trying to use the ON MOVE clause can never do the same , nRow or nCol can't be used.

It is only possible when fivewin.ch and dialog.ch are changed :
<oWnd>:bMoved [ := { | nRow,nCol | <uMove> } ], ;

3) I am convinced that this behaviour is a ERROR , i reported it already
a few days ago . Why no response ????????

Frank

Enrico Maria Giordano

I confirm the problem.

Patricio Avalos Aguirre

I confirm the problem.

FWH 2.6, xHarbour 0.99.5, Borland 5.5

Saludos
Patricio

Continue the discussion