C++/Dwm Drop Shadow Edit Diff Refresh Backlink Random Search History Help Setting Hide Show Border 스타일이 None인 다이얼로그 윈도우(No Frame)에서 아래 코드로 그림자를 추가할 수 있다. typedef HRESULT (WINAPI *lpfnDwmSetWindowAttribute)(HWND hWnd, DWORD dwAttribute, _In_ LPCVOID pvAttribute, DWORD cbAttribute); typedef HRESULT (WINAPI *lpfnDwmExtendFrameIntoClientArea)(HWND hWnd, _In_ const MARGINS *pMarInset); lpfnDwmSetWindowAttribute DwmSetWindowAttribute = 0; lpfnDwmExtendFrameIntoClientArea DwmExtendFrameIntoClientArea = 0; HRESULT DwmDropShadow(HWND hWnd) { int attr = 2; HRESULT hr = S_OK; DwmSetWindowAttribute = (lpfnDwmSetWindowAttribute)GetProcAddress(GetModuleHandle(_T("dwmapi.dll")), "DwmSetWindowAttribute"); DwmExtendFrameIntoClientArea = (lpfnDwmExtendFrameIntoClientArea)GetProcAddress(GetModuleHandle(_T("dwmapi.dll")), "DwmExtendFrameIntoClientArea"); if (DwmSetWindowAttribute == 0 || DwmExtendFrameIntoClientArea == 0) return S_FALSE; hr = DwmSetWindowAttribute(hWnd, 2, &attr, sizeof(int)); if (SUCCEEDED(hr)) { MARGINS margins = {-1, -1, -1 , -1}; hr = DwmExtendFrameIntoClientArea(hWnd, &margins); return hr; } return hr; } Before [PNG image (31.41 KB)] After [PNG image (50.42 KB)] Desktop Window Manager (DWM) DwmDropShadow UI 이 글에는 0 개의 댓글이 있습니다. Please enable JavaScript to view the comments powered by Disqus. comments powered by Disqus