一个图标有关问题
一个图标问题?
DrawlconEx这个函数总是错误为什么呀,错误是没有定义 这是为什么呀?
error: E:\zhang\shuai\shuai.cpp(39) : error C2065: 'DrawlconEx ' : undeclared identifier
#include "stdafx.h "
#include <shellapi.h>
#include <winuser.h>
//#include <usser32.lib>
//using namespace std;
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
HICON hIcon;
HDC hDC;
HWND hWnd;
HINSTANCE hInst;
hDC=GetDC(hWnd);
hIcon=ExtractIcon(hInst, "C:\\Windows\\System\\Shell32.DLL ",1);
DrawIcon(hDC,0,0,hIcon);
DrawlconEx(hDC,0,0,hIcon,NULL,DI_NORMAL);
// DrawlconEx();
return 0;
}
------解决方案--------------------
winuser.h
Public Declare Function DrawIconEx Lib "user32 " Alias "DrawIconEx " (ByVal hdc As Long, ByVal xLeft As Long, ByVal yTop As Long, ByVal hIcon As Long, ByVal cxWidth As Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long, ByVal hbrFlickerFreeDraw As Long, ByVal diFlags As Long) As Long
l-> I
DrawlconEx这个函数总是错误为什么呀,错误是没有定义 这是为什么呀?
error: E:\zhang\shuai\shuai.cpp(39) : error C2065: 'DrawlconEx ' : undeclared identifier
#include "stdafx.h "
#include <shellapi.h>
#include <winuser.h>
//#include <usser32.lib>
//using namespace std;
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
HICON hIcon;
HDC hDC;
HWND hWnd;
HINSTANCE hInst;
hDC=GetDC(hWnd);
hIcon=ExtractIcon(hInst, "C:\\Windows\\System\\Shell32.DLL ",1);
DrawIcon(hDC,0,0,hIcon);
DrawlconEx(hDC,0,0,hIcon,NULL,DI_NORMAL);
// DrawlconEx();
return 0;
}
------解决方案--------------------
winuser.h
Public Declare Function DrawIconEx Lib "user32 " Alias "DrawIconEx " (ByVal hdc As Long, ByVal xLeft As Long, ByVal yTop As Long, ByVal hIcon As Long, ByVal cxWidth As Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long, ByVal hbrFlickerFreeDraw As Long, ByVal diFlags As Long) As Long
l-> I