基础知识
可用SetProcessDPIAware()防止UI自动放大,代码如下:
http://blog.163.com/bestfighter_210@126/blog/static/103618872012311184446/
http://blog.csdn.net/okdou/article/details/2916586
HMODULE hUser32 = LoadLibrary(_T("user32.dll"));
// handle dpi on aero
	HMODULE hUser32 = LoadLibrary(_T("user32.dll"));
	typedef BOOL (*SetProcessDPIAwareFunc)();
	SetProcessDPIAwareFunc setDPIAware = (SetProcessDPIAwareFunc)GetProcAddress(hUser32, "SetProcessDPIAware");
	if (setDPIAware) setDPIAware();
	FreeLibrary(hUser32);
GetModuleFileName
http://baike.baidu.com/view/1285912.htm
获取一个已装载模板的完整路径名称 ,与函数 GetModuleFileNameExA略有不同.
获取 vnclang_server.dll方法
#define MAX_PATH 260
char szCurrentDir[MAX_PATH];
	char szCurrentDir_vnclangdll[MAX_PATH];
	if (GetModuleFileName(NULL, szCurrentDir, MAX_PATH))
	{
		char* p = strrchr(szCurrentDir, '\\');
		*p = '\0';
	}
	strcpy (szCurrentDir_vnclangdll,szCurrentDir);
	strcat (szCurrentDir_vnclangdll,"\\");
	strcat (szCurrentDir_vnclangdll,"vnclang_server.dll");
hInstResDLL = LoadLibrary(szCurrentDir_vnclangdll);
	if (hInstResDLL == NULL)
	{
		hInstResDLL = hInstance;
	}
//	RegisterLinkLabel(hInstResDLL);
    //Load all messages from ressource file
    Load_Localization(hInstResDLL) ;
 
                    
                 
                
            
         
 浙公网安备 33010602011771号
浙公网安备 33010602011771号