Thread: resources

  1. #1
    yes, I'm registered!!! algi's Avatar
    Join Date
    Nov 2004
    Location
    Ipswich
    Posts
    161

    resources

    i really don't like using resources so i was wondering if there was directly a way to add an icon to an application by type in the path of the icon. The tutorial gives me this but i can't get the resources to work so i was wondering whether there was a way to load the resource from location from the computer like "\\icons\\icon.ico".

    Tutorial
    Code:
    WndClsEx.hIcon         = LoadIcon(hInstance,
                                              MAKEINTRESOURCE(IDI_RESFUND));
    I started out with nothing and I still have most of it left.

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    >>i really don't like using resources

    why?


    MSDN
    "An application should implement custom icons as resources and should use the LoadIcon or LoadImage function, rather than create the icons at run-time. This approach avoids device dependence, simplifies localization, and enables applications to share icon bitmaps."

    To load an image from disk use

    hIcon = LoadImage(NULL,"c:\\somefolder\\icons\\ThisIcon.ic o",IMAGE_ICON,...,LR_LOADFROMFILE);

    remember to call DestroyIcon() at close
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Resources in Dev C++
    By JJFMJR in forum Windows Programming
    Replies: 7
    Last Post: 08-27-2007, 05:14 AM
  2. measuring system resources used by a function
    By Aran in forum C Programming
    Replies: 1
    Last Post: 03-13-2006, 05:35 PM
  3. Getting resources from another program.
    By Queatrix in forum C++ Programming
    Replies: 3
    Last Post: 02-11-2006, 09:00 PM
  4. Storing resources into a single file
    By LuckY in forum Game Programming
    Replies: 20
    Last Post: 08-14-2004, 11:28 PM
  5. Adding resources
    By nima_ranjbar in forum Windows Programming
    Replies: 0
    Last Post: 04-14-2002, 11:36 PM