- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我对WTL很陌生这是我的主对话框的 onCreate 代码
int Cwin32_mfcDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialogEx::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
MARGINS mar = {0};
mar.cyBottomHeight = 100;
DwmExtendFrameIntoClientArea(m_hWnd,&mar);
return 0;
}
但是当我尝试编译我的项目时,我得到了这个错误
error LNK2019: unresolved external symbol __imp__DwmExtendFrameIntoClientArea@8 referenced in function "public: int __thiscall Cwin32_mfcDlg::OnCreate(struct tagCREATESTRUCTA *)" (?OnCreate@Cwin32_mfcDlg@@QAEHPAUtagCREATESTRUCTA@@@Z)
这里是输出:
1>------ Build started: Project: win32_mfc, Configuration: Debug Win32 ------
1>Build started 5/24/2012 1:08:43 AM.
1>InitializeBuildStatus:
1> Touching "Debug\win32_mfc.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1> win32_mfcDlg.cpp
1>ResourceCompile:
1> All outputs are up-to-date.
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>win32_mfcDlg.obj : error LNK2019: unresolved external symbol __imp__DwmExtendFrameIntoClientArea@8 referenced in function "public: int __thiscall Cwin32_mfcDlg::OnCreate(struct tagCREATESTRUCTA *)" (?OnCreate@Cwin32_mfcDlg@@QAEHPAUtagCREATESTRUCTA@@@Z)
1>D:\projects\C++\Projects\Team_projects\Bill\net\ttt\win32_mfc\Debug\win32_mfc.exe : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.48
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
这是我的 StdAfx.h 代码:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#pragma once
#ifndef _SECURE_ATL
#define _SECURE_ATL 1
#endif
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#endif
#include "targetver.h"
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
// turns off MFC's hiding of some common and often safely ignored warning messages
#define _AFX_ALL_WARNINGS
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <afxcontrolbars.h> // MFC support for ribbons and control bars
#include <dwmapi.h> // DWM APIs
//#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
//#endif
此项目在 MFC 和 Visual Studio 2010 以及 Windows 7 x64 中
最佳答案
来自DwmExtendFrameIntoClientArea()
您需要链接到 Dwmapi.lib
。
关于c++ - DwmExtendFrameIntoClientArea 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10727627/
我对WTL很陌生这是我的主对话框的 onCreate 代码 int Cwin32_mfcDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (C
正如我们所知,一些现代应用程序(IE9、Firefox 4、Chrome、Paint.NET 等)使用 DwmExtendFrameIntoClientArea 来实现 Aero 玻璃效果。 不过,您
在窗口上调用 DwmExtendFrameIntoClientArea 后,如何在保持 Aero 模式的同时再次关闭它? 我尝试调用 DwmExtendFrameIntoClientArea 并将所有
我在使用 DwmExtendFrameIntoClientArea 扩展窗框时遇到了一些麻烦在 Windows 10 上。下图显示了我得到的行为: 白色标题栏颜色从顶部延伸,而从侧面和底部延伸到窗口的
在启用 Aero Glass 的情况下使用 DwmExtendFrameIntoClientArea API 调用效果很好。但是,我希望它在禁用 Aero Glass 时也能正常工作,就像它在 Win
我一直在关注 MSDN's guide to using the DWM API to extend the frame into the client area ,但重做了,这样我就可以在我有一些工
我是一名优秀的程序员,十分优秀!