Load a CBitmap dynamically

前端 未结 8 1794
情深已故
情深已故 2021-02-06 02:59

I have a Bitmap image that i want to load dynamically. But I am unable to load it.

CBitmap bmp;

bmp.LoadBitmap(\"c:\\\\aeimg\");

it does not

8条回答
  •  渐次进展
    2021-02-06 03:28

    It could be as simple as you forgetting to escape the backslash. Instead of

    bmp.LoadBitmap("c:\aeimg");
    

    use

    bmp.LoadBitmap("c:\\aeimg");
    

    Otherwise you're passing an invalid path to the LoadBitmap method.

提交回复
热议问题