diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-04-21 19:33:14 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-04-21 19:33:14 +0000 |
commit | 0d2f2928952c7bbebf163662fd4c8e3683c4e066 (patch) | |
tree | 3a17f5a0995226fc7d346d3d2c38505fb2f1ecd3 /plugins/Popup/src/popup_wnd2.cpp | |
parent | 6bf05d34ba416ec14f651c22cba8710e52125907 (diff) |
Popup+:
- minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@13019 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup/src/popup_wnd2.cpp')
-rw-r--r-- | plugins/Popup/src/popup_wnd2.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index 472de1de31..f041ecaf51 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -270,7 +270,6 @@ void PopupWnd2::update() // render popup
m_bmpBase->allocate(m_sz.cx, m_sz.cy);
HDC hdc = m_bmpBase->getDC();
- if (!skin) return;
SetBkMode(hdc, TRANSPARENT);
skin->display(m_bmpBase, this, m_options,
PopupSkin::DF_STATIC);
@@ -1034,14 +1033,15 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara (m_lptzTitle) ? m_lptzTitle : _T(""),
(m_lptzText) ? m_lptzText : _T(""));
- OpenClipboard(m_hwnd);
- EmptyClipboard();
- HGLOBAL clipbuffer = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, (tszText.GetLength() + 1) * sizeof(TCHAR));
- TCHAR *buffer = (TCHAR *)GlobalLock(clipbuffer);
- mir_tstrcpy(buffer, tszText);
- GlobalUnlock(clipbuffer);
- SetClipboardData(CF_UNICODETEXT, clipbuffer);
- CloseClipboard();
+ if (OpenClipboard(m_hwnd)) {
+ EmptyClipboard();
+ HGLOBAL clipbuffer = GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, (tszText.GetLength() + 1) * sizeof(TCHAR));
+ TCHAR *buffer = (TCHAR *)GlobalLock(clipbuffer);
+ mir_tstrcpy(buffer, tszText);
+ GlobalUnlock(clipbuffer);
+ SetClipboardData(CF_UNICODETEXT, clipbuffer);
+ CloseClipboard();
+ }
}
PUDeletePopup(m_hwnd);
break;
|