PDA

View Full Version : Powerbasic + OpenGL + Mouseposition



Lionheart008
16-12-2023, 22:27
Hey Petr...

I am looking for a simple Powerbasic OpenGL example how to Display Mouse Position in SetWindowText hwnd for example...

(powerbasic)
...
CASE %WM_MOUSEMOVE
' Display the mouse position in the status window
szText = "Mouse Position:" & STR$(LOWRD(CB.LPARAM)) & "," & STR$(HIWRD(CB.LPARAM))
SetWindowText hStatus, szText
EXIT FUNCTION
...

need translation more for openGL setup with mouse position


String s "xpos " + Str(loword(lparam)) + " yPos: , " + Str(hiword(lparam)) Works for a usual window frame in oxygen but Not for an OpenGL window frame

Would be great to get Help best Thing will BE a Powerbasic Code snippets.. I have lost nearly all File since ten years ago

Best regards Frank

Lionheart008
17-12-2023, 09:59
OK have solved IT already

OpenGL Modus powerbasic

LOCAL szText AS ASCIIZ*128

CASE %WM_MOUSEMOVE
' Display the mouse position in the status window
'szText = "Mouse Position:" & STR$(LOWRD(CB.LPARAM)) & "," & STR$(HIWRD(CB.LPARAM))
szText = "Mouse Position:" & STR$(LO(WORD, lParam)) & "," & STR$(HI(WORD, lParam))
SetWindowText hwnd,szText

Nice sunday Bye Frank
'