April 19, 2024, 11:14:06 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Drag and Drop example - mousemove event for pallette

Started by Allan, June 22, 2009, 05:16:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Allan

I have been reading through the example code for the drag and drop and have hit a brick wall trying to understand some of the code in the Mousemove (OnMMPalette())?


' lParam
' The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to
' the upper-left corner of the client area. (@mousex)

' The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to
' the upper-left corner of the client area  (@mousey)

' @LPARAM / @QUAL

Sub OnMMPalette(),INT
' @QUAL + LPARAM - Holds the X Y Coord of the Mouse
' if mouse L Button down
DEBUGPRINT STR$(@QUAL) + "  _  " + STR$(@LPARAM)
if @QUAL & 1
dragstart++


I do not understand how @Qual is = 1. If i use the right-button it will equal 2, No button @Qual = 0.

I thought those messages were supposed to be  in the WPARAM.

What am I missing here please?

Allan

LarryMc

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Allan

Yes, but isnt the left-button down supposed to be shown in the WPARAM?

Allan

Ionic Wind Support Team

Normally

@QUAL =@LPARAM
@CODE =@WPARAM

However for the mouse messages emergence translates wparam and lparam for you as such:

@QUAL = wparam
@MOUSEX = lParam & 0xFFFFu
@MOUSEY = (lParam >> 16) & 0xFFFFu

Old terminology, used by the Amiga QUAL = "Qualifier" , and it stuck with my languages.  Put into Emergence for IBasic Pro compatibility.  Listed in the users guide.

Emergence does a lot of internal processing, so you don't have to.

Paul.
Ionic Wind Support Team

Allan

Thanks for the understanding on the Mouse Messages.

I missed the part about  @QUAL = wparam  in the user guide.

Allan