Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: chrome/test/activex_test_control/chrome_test_control.cc

Issue 200031: Take out the activex control. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/test/activex_test_control/chrome_test_control.h"
6
7 // CChromeTestControl
8 HRESULT ChromeTestControl::OnDraw(ATL_DRAWINFO& di) {
9 RECT& rc = *(RECT*)di.prcBounds;
10 // Set Clip region to the rectangle specified by di.prcBounds
11 HRGN rgn_old = NULL;
12 if (GetClipRgn(di.hdcDraw, rgn_old) != 1)
13 rgn_old = NULL;
14 bool select_old_rgn = false;
15
16 HRGN rgn_new = CreateRectRgn(rc.left, rc.top, rc.right, rc.bottom);
17
18 if (rgn_new != NULL)
19 select_old_rgn = (SelectClipRgn(di.hdcDraw, rgn_new) != ERROR);
20
21 Rectangle(di.hdcDraw, rc.left, rc.top, rc.right, rc.bottom);
22 SetTextAlign(di.hdcDraw, TA_CENTER|TA_BASELINE);
23 LPCTSTR pszText = _T("ATL 8.0 : ChromeTestControl");
24 TextOut(di.hdcDraw,
25 (rc.left + rc.right) / 2,
26 (rc.top + rc.bottom) / 2,
27 pszText,
28 lstrlen(pszText));
29
30 if (select_old_rgn)
31 SelectClipRgn(di.hdcDraw, rgn_old);
32
33 return S_OK;
34 }
OLDNEW
« no previous file with comments | « chrome/test/activex_test_control/chrome_test_control.bmp ('k') | chrome/test/activex_test_control/chrome_test_control.rgs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698