How to load BMP in PictureBox in MFC with OpenGL

hello guys,

i want to load an image to picture box in MFC,
pls tell me how can i do that

By “MFC”, I assume you mean Microsoft Foundation Class Library. The answer to that is “I don’t know”. I doubt OpenGL is the right tool for that; MFC probably reads image files natively and OpenGL does not. To make OpenGL read an image file you need another library like FreeImage. As far as I know, OpenGL by itself is incapable of displaying BMP files. MFC probably does it on its own although I only did a little MFC many years ago. I thought about trying to learn it a year or two ago but it quickly went to the back of my priority list because Win 8 and Win 10 apparently don’t use it at all giving it very little future from what I understand.

I have done a lot more Win32 than MFC because when I started learning MFC I realized I was at an extreme disadvantage until I learned Win32. Then after learning Win32 I never really bothered going back to MFC.

But in Win32 there is this:

Not sure if this is the correct way to load a bitmap file in MFC or not, but it might be a place to start.