No announcement yet.

Resource Help Please Lance

  • Filter
  • Time
  • Show
Clear All
new posts

  • Dave Navarro
    You can not use %NULL for the instance handle. You have to use the instance handle of your application.

    Either use WinMain() instead of PbMain() or use GetModuleHandle() to get your instance handle.


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

    Leave a comment:

  • Guest's Avatar
    Guest started a topic Resource Help Please Lance

    Resource Help Please Lance


    I know this topic has been talked to death but I just can't figure it out!
    I have Found, Loaded, and Locked resources before but I just can't seem
    to do it with PBDLLv6.0. I have no Idea what i'm doing wrong here.

    #define FRONT 100
    FRONT RCDATA d:\front.raw

    PBDLL source:
    %FRONT = 100

    dim hres1 as long
    dim hres2 as long
    dim htexture as long

    hres1 = FindResource(%NULL, byval %FRONT, byval %RT_RCDATA)
    hres2 = LoadResource(%NULL, hres1)
    htexture = LockResource(hres2)

    LoadResource() and LockResource() both return the same number. I have
    checked GetLastError() but it always returns zero. After the calls the
    variables are as follows.

    hres1 = 4219112
    hres2 = 4219208
    htexture = 4219208

    Please Help!! I am completely stumped!