Canvas + B3DSDK + EVENT_MOUSEMOVE
Archives Forums/Blitz3D SDK Programming/Canvas + B3DSDK + EVENT_MOUSEMOVE
| ||
Hi Anybody can help me ? :) I want to retrieve the event mousedown or mousemove with Canvas+ B3DSdk ? Uncomment the lines to see the problem in action. When B3D is not assigned to the canvas the events are ok. |
| ||
I wish we could tell the B3DSDK to ignore Windows events, and let us use MaxGUI/whatever to detect the events. |
| ||
Use C++ and everything will go fine... |
| ||
Not everybody can program in C++. I never could figure out how to get everything up and running. Maybe I'm just stupid. ;p |
| ||
I don't have maxgui, but can't you use the bbSetBlitz3DEventCallback ? http://www.blitzbasic.com/Community/posts.php?topic=72402 |
| ||
Maybe I'm just stupid Definitely not! I mentioned this just to emphasize that the SDK is more suitable to C++ and not to BMax. Hardness of C++ is a myth. You need only to clear some principles in your mind. Then all the power is at your hands! |
| ||
Have Fun Avant bbBeginBlitz3D() Before bbBeginBlitz3D() bbSetBlitz3DEventCallback(Int Byte Ptr BBEventHandler) et la fonction pour ecraser la gestion des Events And the function to overwrite Event Management Global MouseDown1:byte Global MouseHit1:Int function MouseHit1:int() local Ms1:int=MouseHit1 MouseHit1=0 return Ms1 end function Function BBEventHandler:Byte(hwnd , msg , wp , lp) "win32" Select msg ' +> MouseX/MouseY Case WM_MOUSEMOVE' = 512 Debuglog "MosX="+(lp & $FFFF)+" MosY="+(lp shr(16) & $FFFF) ' Mouse 1 Down Case WM_LBUTTONDOWN if MouseDown1=false MouseHit1:+1 MouseDown1=true Case WM_LBUTTONUP MouseDown1=false rem Fais la même chose avec : WM_MBUTTONUP/DOWN +> Bouton Molette WM_RBUTTONUP/DOWN +> Mouse 2 endrem Default ' Ici, tu peux lire tous les evenements de ta fenêtre windows ... utiles ou non ' le flag est enregistré dans la variable "msg" ' Les infos dans wp/lp End select Return -1 End function |