Displaying Bitmap Using CImage?
I have what should be a relatively simple problem, that of loading a bitmap from a directory and redisplaying it in a Window created in a WinMain function. (not MFC, just a Win32 project)
I CAN create the window, give it a title, and write text to it. I then got reasonably familiar with CImage class, created a global img object, and loaded the original bitmap in the WinMain by calling img.Load(). I checked the width and height using the relevant functions, and they agree with what I already know, so I think the load went OK.
I then thought it would be simple to go to the WM_PAINT case, as I do with the text, and call img.BitBlt, but I get an error, h-something is null. Is it obvious what I am missing?
One final thing: do any of you get particularly annoyed with having to wade through multiple websites, disparate commentary, etc., in order to do something which should be simple and straightforward???? It seems that many people need to do this simple task of bringing up an image outside of standard apps like Windows Picture Viewer, etc., yet each and every one of us stumbles around like this, wasting time over and over again. ARGH!! !! !! !