首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

CreateDC有关问题

2012-02-22 
CreateDC问题hPrinterCreateDC(TEXT( oki.dll ),NULL,TEXT( LPT1: ),&DevMode)error126,找不到指定

CreateDC问题
hPrinter   =   CreateDC(   TEXT( "oki.dll "),   NULL,   TEXT( "LPT1: "),   &DevMode   );
error126,找不到指定的模块名,即找不到oki.dll,但是我机器里面是有这个DLL的
哪位大虾有遇到过这种问题的啊

[解决办法]
HDC CreateDC(
LPCTSTR lpszDriver, // driver name
LPCTSTR lpszDevice, // device name
LPCTSTR lpszOutput, // not used; should be NULL
CONST DEVMODE *lpInitData // optional printer data
);

lpszDevice
[in] Pointer to a null-terminated character string that specifies the name of the specific output device being used, as shown by the Print Manager (for example, Epson FX-80). It is not the printer model name. The lpszDevice parameter must be used.
[解决办法]

hPrinter = CreateDC( TEXT( "oki.dll "), TEXT( "LPT1: "), NULL, &DevMode );
[解决办法]
#pragma comment(lib, "gdi32.lib ")

热点排行