Loading ...
Sorry, an error occurred while loading the content.

955RE: [cc2-dev-l] Two questions

Expand Messages
  • Peter Olsson
    Apr 15, 2012

      Many (if not all) XP API functions will accept a string or a resource value.

      All file functions will accept the # and $-style.


      For FullFileName you can pass a resource value or a string for filename in the esi register.

      FetchImage will accept both shortened (# or $) and full paths.




      From: cc2-dev-l@yahoogroups.com [mailto:cc2-dev-l@yahoogroups.com] On Behalf Of BC Holmes
      Sent: Sunday, April 15, 2012 6:16 PM
      To: cc2-dev-l@yahoogroups.com
      Subject: [cc2-dev-l] Two questions



      Hi folks,

      I have a coupl'a questions about the XP API that I was hoping someone
      could shed some light on.

      First, in order to work with background images (and convert them into
      SVG image references), I'll need to resolve the file names into full
      file names (that is to say, convert a name that begins with a # or a $
      into a full file name).

      In the XP I used this code, which I shamelessly stole from some sample
      code that Peter shared with me:

      char FileName[260];

      __asm push ebx;
      __asm push esi;
      __asm push edi;

      __asm mov esi, RSC_CurSaveName;
      __asm lea edi, FileName;

      __asm pop edi;
      __asm pop esi;
      __asm pop ebx;

      The interesting part, here, is the RSC_CurSaveName, which seems to
      #define to a magic number, "3307" -- I assume that this magic number is
      well-understood by the FullFileName() function.

      Question: is there an API for resolving an image file name to a
      fully-qualified file name? (If necessary, I think I can resolve
      RSC_CurFileName and use that to manually resolve anything that begins
      with a '$'. I'm not sure how to resolve the '#' names, though).

      Second, I've found the _IImage.h file, and it looks like it can help me
      with some of my image needs. It looks like I invoke FetchImage and
      ReleaseImage when I want to play with an image.

      Question: does the file name that I provide to FetchImage start with '#'
      or '$'? Or should it be fully-qualified?

      BCing you
      B.C. Holmes \u2625 http://www.bcholmes.org/
      "All my life I've wanted to be somebody; I guess I should've been
      more specific." -- Lily Tomlin

    • Show all 3 messages in this topic