若dll中有一函数
void F1()
{
}
现在要用这个函数创建一个窗口
void F1()
{
WNDCLASSEX wc = {sizeof(WNDCLASSEX), CS_CLASSDC, WinProc, 0L, 0L,
GetModuleHandle(NULL), NULL, NULL, NULL, NULL,
"DX Project 1", NULL};
RegisterClassEx(&wc);
.
.
.
}
错误如下:
Compiling...
StdAfx.cpp
Compiling...
cfir.cpp
E:\Temp\C++\cfir\cfir.cpp(208) : error C2065: 'WinProc' : undeclared identifier
E:\Temp\C++\cfir\cfir.cpp(208) : error C2440: 'initializing' : cannot convert from 'int' to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
E:\Temp\C++\cfir\cfir.cpp(209) : error C2440: 'initializing' : cannot convert from 'struct HINSTANCE__ *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
E:\Temp\C++\cfir\cfir.cpp(210) : error C2440: 'initializing' : cannot convert from 'char [13]' to 'struct HBRUSH__ *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.cfir.dll - 4 error(s), 0 warning(s)Help~~~
void F1()
{
}
现在要用这个函数创建一个窗口
void F1()
{
WNDCLASSEX wc = {sizeof(WNDCLASSEX), CS_CLASSDC, WinProc, 0L, 0L,
GetModuleHandle(NULL), NULL, NULL, NULL, NULL,
"DX Project 1", NULL};
RegisterClassEx(&wc);
.
.
.
}
错误如下:
Compiling...
StdAfx.cpp
Compiling...
cfir.cpp
E:\Temp\C++\cfir\cfir.cpp(208) : error C2065: 'WinProc' : undeclared identifier
E:\Temp\C++\cfir\cfir.cpp(208) : error C2440: 'initializing' : cannot convert from 'int' to 'long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
E:\Temp\C++\cfir\cfir.cpp(209) : error C2440: 'initializing' : cannot convert from 'struct HINSTANCE__ *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
E:\Temp\C++\cfir\cfir.cpp(210) : error C2440: 'initializing' : cannot convert from 'char [13]' to 'struct HBRUSH__ *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.cfir.dll - 4 error(s), 0 warning(s)Help~~~
解决方案 »
- use of undefined type 'bpf_hdr'???
- FFMPEG 0.11.1 WIN7 MINGW 编译成功,但不能执行??
- 主对话框,在主对话框基础上按钮产生模态对话框.数据之间的通信如何?
- 问一个奇怪的问题,程序首次运行很慢
- 一个很菜的问题,关于for中的变量定义,for(int i=0;;){}
- 好像vc中的工具栏只能是16像素高吗?如何使得工具栏的高度可以超过16像素,在那里设置呀?
- 用OpenGL显示三维DEM数据
- 笨猫学编程:如何在本窗口里面获得键盘消息?
- 一个gif的问题??
- 如何对Bitmap位图进行操作(拼图游戏)
- 一个让我挠头的问题
- 哪个老大用过GuiToolkit作过界面呀????帮帮忙!!
写完整你的sdk程序!