Thread: .ico (COMPLETE NOOB)

  1. #1
    Rage7531
    Guest

    Question .ico (COMPLETE NOOB)

    Hmm.. just started windows programming today... and can't seem to get an ICON to appear in the upper left corner of my window.

    I've made an .ico but it just wont show up...

    can someone tell me what exactly I need to make?
    Do I need a (.rc) file or (.res) file...?

    I tried writing a (.res)

    RES_Icon IMAGE_ICON "icon1.ico"

    and in my code

    wndclassex.hIcon = (HICON)LoadImage hinstance,MAKEINTRESOURCE(RES_Icon),IMAGE_ICON,0,0 ,LR_DEFAULTSIZE);

    and in (.rc)

    #define RES_Icon 101

    if i'm completely off just call me an idiot.... and ill go back and look at some tutorials somewhere...

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    >>wndclassex.hIcon = (HICON)LoadImage hinstance,MAKEINTRESOURCE(RES_Icon),IMAGE_ICON,0,0
    ,LR_DEFAULTSIZE);

    this should be:
    Code:
    wndclassex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(RES_Icon));
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  3. #3
    Rage7531
    Guest

    Talking Thanx

    Thanx, that is exactly what I needed... I got it working now figured out the .rc and .res files etc.. thnx for the help .. much appreciated

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. First phases complete for space combat
    By VirtualAce in forum Game Programming
    Replies: 5
    Last Post: 01-22-2009, 09:42 AM
  2. Complete C noob...and completely stuck lol
    By JST212 in forum C Programming
    Replies: 6
    Last Post: 03-02-2008, 10:54 AM
  3. Complete Noob Needs Help
    By Shinobi in forum Windows Programming
    Replies: 2
    Last Post: 01-22-2007, 05:40 AM
  4. Doom Lord engine complete!
    By Leeman_s in forum Game Programming
    Replies: 8
    Last Post: 05-12-2002, 12:44 AM
  5. doom lord engine complete!
    By Leeman_s in forum C++ Programming
    Replies: 4
    Last Post: 04-25-2002, 08:41 PM