做了一个png按钮类,在对话框里面测试正常。可是等到dll里面要用时却出现问题
实验得知GdiplusStartup没有正常启动
我原先是放到组件的对象构造函数中的,可是依然无法创建GDI+对象
根据MSDN的文档,dll办法有这么几个
1 Require your clients to call GdiplusStartup before they call the functions in your DLL and to call GdiplusShutdown when they have finished using your DLL. 2 Export your own startup function that calls GdiplusStartup and your own shutdown function that calls GdiplusShutdown. Require your clients to call your startup function before they call other functions in your DLL and to call your shutdown function when they have finished using your DLL. 3 Call GdiplusStartup and GdiplusShutdown in each of your functions that make GDI+ calls. 1和2我现在办不到,唯有3让我很困惑,加入我的类里有个GDI+对象成员,那么我该怎么做,
GdiplusStartup放到类的构造函数中仍然是错误的....