Some simple questions

Archives Forums/Blitz3D SDK Programming/Some simple questions

Derek(Posted 2007) [#1]
I hope some of the people here can answer some simple questions for me.

If I use the sdk with PureBasic and only use, for instance, a quarter of the window set up using PureBasic for graphics to be displayed on, what happens to the mouse cursor when moved into and out of the graphics area?

Is it still displayed over the graphics or is it hidden?

Can the position of the cursor be returned using normal PB commands or ,once it is on a blitz generated part of the screen, would I then have to swap to blitz commands until the cursor is moved off of the graphics again?

I hope that is clear, basically I want to write some graphics software which is controllable using normal PB buttons and gadgets.

Thanks.


b32(Posted 2007) [#2]
I think you would need to use SetBlitz3DEventCallBack to do that. I'm not sure about the pb syntax, but it would be something similair to this:
bbSetBlitz3DEventCallBack(@bbCallBack())

Procedure bbCallBack(iHwnd, Message, wParam, lParam)

  Select Message
    Case #WM_MOUSEMOVE   
       .. ;mouse coords are in lParam (loword/hiword)
  EndSelect

EndProcedure

or:
Procedure bbCallBack(iHwnd, Message, wParam, lParam)

   wnd = ---> your main window HWND here <---
   PostMessage wnd, Message, wParam, lParam

EndProcedure

I suppose you'll need to create the b3d device in windowed mode, so then the mousecursor will be shown on the b3d area as well.


Derek(Posted 2007) [#3]
Ok, thanks, just so long as the b3d area doesn't take control of the cursor and not let it out of the area then that is fine.