Resource loading error

Gilles G. schaouette at free.fr
Thu Jul 12 01:41:49 PDT 2007


Hello,
I am trying to use some resources for a program using the windows API.
For instance, I just try to load an image.
the resource file test.rc looks like:
   1   BITMAP "logo.bmp"
I compile this resource file using rcc.exe test.rc, this create test.res
Then I try to use the resource in my program (test.d) like this:
    ghBmp = LoadBitmapA(ghWndMain, MAKEINTRESOURCEA(1));
    assert(ghBmp);
(I compile using dmd -oftest test.res test.d)
But I always got an assert error at run time.

Do you have any idea?
--
Gilles


More information about the Digitalmars-d-learn mailing list