Thread: LoadBitmap function call is constantly failing for some reason

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User Swarvy's Avatar
    Join Date
    Apr 2008
    Location
    United Kingdom
    Posts
    195
    I don't understand why that works, and why it doesn't work with just hThisInstance. Why is that?

    Thank you very much. I've been trying to get that to work for ages, with no success.

  2. #2
    Registered User
    Join Date
    Sep 2008
    Location
    Near Paris
    Posts
    6
    Quote Originally Posted by Swarvy View Post
    I don't understand why that works, and why it doesn't work with just hThisInstance. Why is that?
    Your WinMain function has a hThisInstance parameter, but choosing the same name won't magically update the global variable. You have to choose two different names, and explicitly store the handle in the global variable.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 05-13-2011, 08:28 AM
  2. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  3. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  4. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  5. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM