本文介绍了从dll调用时,CreateCompatibleDC返回0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!

 HDC backdc; 
HDC screendc;
backdc = CreateCompatibleDC(screendc);
if (backdc == 0 {
ShowMessage(GetLastError());
}
}



告诉我为什么从dll调用此函数失败并返回0?但是,如果在自定义应用程序中运行此代码 - 一切正常。

解决方案

Hello!

HDC backdc;
HDC screendc;
backdc = CreateCompatibleDC(screendc);
   if(backdc == 0{
   ShowMessage(GetLastError());
   }
}


Tell me why when calling from dll this function fails and returns 0? However, if run this code in a custom application - everything works fine.

解决方案


这篇关于从dll调用时,CreateCompatibleDC返回0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 20:29
查看更多