Results 1 to 2 of 2

Thread: Powerbasic + OpenGL + Mouseposition

  1. #1
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    52
    Posts
    944
    Rep Power
    111

    Powerbasic + OpenGL + Mouseposition

    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
    Last edited by Lionheart008; 17-12-2023 at 09:34.
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  2. #2
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    52
    Posts
    944
    Rep Power
    111
    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
    '
    Last edited by Lionheart008; 17-12-2023 at 10:02.
    you can't always get what you want, but if you try sometimes you might find, you get what you need

Similar Threads

  1. PowerBasic 64bits
    By ErosOlmi in forum Power Basic
    Replies: 10
    Last Post: 18-12-2023, 16:04
  2. PowerBasic v9.07
    By primo in forum Power Basic
    Replies: 18
    Last Post: 04-01-2017, 15:58
  3. How to run a Dot Net 4.0 class from Powerbasic
    By zak in forum Software discussion
    Replies: 1
    Last Post: 17-12-2011, 11:27
  4. qt about powerbasic :)
    By Lionheart008 in forum Power Basic
    Replies: 5
    Last Post: 29-09-2009, 01:18
  5. What PowerBasic can do
    By ErosOlmi in forum Power Basic
    Replies: 7
    Last Post: 01-05-2009, 04:58

Members who have read this thread: 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •