diff options
| author | nyamatongwe <unknown> | 2013-01-27 10:36:21 +1100 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2013-01-27 10:36:21 +1100 | 
| commit | 26f81567bcf74c7af1cedfabf4884cdfc9f4d69e (patch) | |
| tree | b57087ab032b1fa549b9db04b2e45d48dd9a70bf /win32/PlatWin.cxx | |
| parent | 04954d0f6994ded50d4cd0e7117631b127939680 (diff) | |
| download | scintilla-mirror-26f81567bcf74c7af1cedfabf4884cdfc9f4d69e.tar.gz | |
Check result from CreateDCRenderTarget.
Diffstat (limited to 'win32/PlatWin.cxx')
| -rw-r--r-- | win32/PlatWin.cxx | 28 | 
1 files changed, 15 insertions, 13 deletions
| diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index c1cd38f71..f7d68b921 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -2462,20 +2462,22 @@ void ListBoxX::Draw(DRAWITEMSTRUCT *pDrawItem) {  						);  					ID2D1DCRenderTarget *pDCRT = 0;  					HRESULT hr = pD2DFactory->CreateDCRenderTarget(&props, &pDCRT); -					RECT rcWindow; -					GetClientRect(pDrawItem->hwndItem, &rcWindow); -					hr = pDCRT->BindDC(pDrawItem->hDC, &rcWindow);  					if (SUCCEEDED(hr)) { -						surfaceItem->Init(pDCRT, pDrawItem->hwndItem); -						pDCRT->BeginDraw(); -						int left = pDrawItem->rcItem.left + ItemInset.x + ImageInset.x; -						PRectangle rcImage(left, pDrawItem->rcItem.top, -							left + images.GetWidth(), pDrawItem->rcItem.bottom); -						surfaceItem->DrawRGBAImage(rcImage, -							pimage->GetWidth(), pimage->GetHeight(), pimage->Pixels()); -						delete surfaceItem; -						pDCRT->EndDraw(); -						pDCRT->Release(); +						RECT rcWindow; +						GetClientRect(pDrawItem->hwndItem, &rcWindow); +						hr = pDCRT->BindDC(pDrawItem->hDC, &rcWindow); +						if (SUCCEEDED(hr)) { +							surfaceItem->Init(pDCRT, pDrawItem->hwndItem); +							pDCRT->BeginDraw(); +							int left = pDrawItem->rcItem.left + ItemInset.x + ImageInset.x; +							PRectangle rcImage(left, pDrawItem->rcItem.top, +								left + images.GetWidth(), pDrawItem->rcItem.bottom); +							surfaceItem->DrawRGBAImage(rcImage, +								pimage->GetWidth(), pimage->GetHeight(), pimage->Pixels()); +							delete surfaceItem; +							pDCRT->EndDraw(); +							pDCRT->Release(); +						}  					}  #endif  				} | 
