No announcement yet.

Hex to Dec? Links in RichEdit?

  • Filter
  • Time
  • Show
Clear All
new posts

    Hex to Dec? Links in RichEdit?

    I know you can use the HEX$ function to convert HEX to Dec, but how to you convert Dec to hex?

    Plus how would I go about adding links in my RichEdit Text boxes, so I could even change the cursor to the hand and everything when someone moved the mouse voer it. If you can tell me or have example code please reply!

    Thank you,
    Ryan M. Cross
    Head Webmaster Nofee Inc. Internet Services
    President Likuid Creations Ltd.

    Thank you,
    Ryan M. Cross

    ' HEX to DEC
    a$ = "1AB6"
    a& = VAL("&H0" + a$) ' leading 0 forces unsigned conversion
    ' DEC to HEX
    a& = 12345& ' explictly type-cast the numeric literal to LONG
    a$ = HEX$(a&)
    To change the cursor for a control, use the SetClassLong(%GCL_HCURSOR). Alternatively, you can either use instance-subclassing (SetWindowLong(%GWL_WNDPROC)) and change the cursor from within, or create a new class based on the target control class by superclassing the control.

    There have been examples on these techniques posted to the Source Code forum some time back (search for "subclass"), or read about it in a good API book, such as Rector/Newcomer's "Win32 Programming".

    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    mailto:[email protected]