hBitmap = LoadBitmap(NULL, saFileName);

ho come i cant load any bitmap using this function?

hBItmap is always null

The answer is pretty clear.

hInstance[in]Handle to the instance of the module whose executable file contains the bitmap to be loaded.

Since you're not passing a valid application instance, it's highly unlikely it's going to give you valid handle.

i tried that one 2. but still the bitmap remains null

What's the filename that you give it? If it's got any backslashes in it, they'll have to be escaped with another backslash. Oh, and do post some more code, please.

i found a function that loads bitmap. and i forgot where i put my code for that particular loading. il try to post it as soon as i can

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.