ReactOS 0.4.17-dev-806-gffa4164
atlwin.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _ATL_WNDCLASSINFOA_TAG
 
struct  _ATL_WNDCLASSINFOW_TAG
 

Typedefs

typedef struct _ATL_WNDCLASSINFOA_TAG _ATL_WNDCLASSINFOA
 
typedef struct _ATL_WNDCLASSINFOW_TAG _ATL_WNDCLASSINFOW
 

Functions

ATOM WINAPI AtlModuleRegisterWndClassInfoA (_ATL_MODULEA *pm, _ATL_WNDCLASSINFOA *wci, WNDPROC *pProc)
 
ATOM WINAPI AtlModuleRegisterWndClassInfoW (_ATL_MODULEW *pm, _ATL_WNDCLASSINFOW *wci, WNDPROC *pProc)
 
HDC WINAPI AtlCreateTargetDC (HDC hdc, DVTARGETDEVICE *ptd)
 
void WINAPI AtlHiMetricToPixel (const SIZEL *lpSizeInHiMetric, LPSIZEL lpSizeInPix)
 
void WINAPI AtlPixelToHiMetric (const SIZEL *lpSizeInPix, LPSIZEL lpSizeInHiMetric)
 

Typedef Documentation

◆ _ATL_WNDCLASSINFOA

◆ _ATL_WNDCLASSINFOW

Function Documentation

◆ AtlCreateTargetDC()

HDC WINAPI AtlCreateTargetDC ( HDC  hdc,
DVTARGETDEVICE *  ptd 
)

Definition at line 125 of file atl.c.

126{
127 const WCHAR *driver = NULL, *device = NULL, *port = NULL;
129
130 TRACE( "(%p, %p)\n", hdc, dv );
131
132 if (dv)
133 {
134 if (dv->tdDriverNameOffset) driver = (WCHAR *)((char *)dv + dv->tdDriverNameOffset);
135 if (dv->tdDeviceNameOffset) device = (WCHAR *)((char *)dv + dv->tdDeviceNameOffset);
136 if (dv->tdPortNameOffset) port = (WCHAR *)((char *)dv + dv->tdPortNameOffset);
137 if (dv->tdExtDevmodeOffset) devmode = (DEVMODEW *)((char *)dv + dv->tdExtDevmodeOffset);
138 }
139 else
140 {
141 if (hdc) return hdc;
142 driver = L"display";
143 }
144 return CreateDCW( driver, device, port, devmode );
145}
DEVMODEW devmode
#define NULL
Definition: types.h:112
USHORT port
Definition: uri.c:210
#define L(x)
Definition: resources.c:13
HDC hdc
Definition: main.c:9
struct @1851::@1852 driver
short WCHAR
Definition: pedump.c:58
#define TRACE(s)
Definition: solgame.cpp:4
Definition: devices.h:37
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)

◆ AtlHiMetricToPixel()

void WINAPI AtlHiMetricToPixel ( const SIZEL lpSizeInHiMetric,
LPSIZEL  lpSizeInPix 
)

◆ AtlModuleRegisterWndClassInfoA()

ATOM WINAPI AtlModuleRegisterWndClassInfoA ( _ATL_MODULEA pm,
_ATL_WNDCLASSINFOA wci,
WNDPROC pProc 
)

Definition at line 296 of file atl30.c.

297{
298 ATOM atom;
299
300 FIXME("%p %p %p semi-stub\n", pm, wci, pProc);
301
302 atom = wci->m_atom;
303 if (!atom)
304 {
305 WNDCLASSEXA wc;
306
307 TRACE("wci->m_wc.lpszClassName = %s\n", wci->m_wc.lpszClassName);
308
309 if (wci->m_lpszOrigName)
310 FIXME( "subclassing %s not implemented\n", debugstr_a(wci->m_lpszOrigName));
311
312 if (!wci->m_wc.lpszClassName)
313 {
314 sprintf(wci->m_szAutoName, "ATL:%p", wci);
315 TRACE("auto-generated class name %s\n", wci->m_szAutoName);
316 wci->m_wc.lpszClassName = wci->m_szAutoName;
317 }
318
319 atom = GetClassInfoExA(pm->m_hInst, wci->m_wc.lpszClassName, &wc);
320 if (!atom)
321 {
322 wci->m_wc.hInstance = pm->m_hInst;
323 wci->m_wc.hCursor = LoadCursorA( wci->m_bSystemCursor ? NULL : pm->m_hInst,
324 wci->m_lpszCursorID );
325 atom = RegisterClassExA(&wci->m_wc);
326 }
327 wci->pWndProc = wci->m_wc.lpfnWndProc;
328 wci->m_atom = atom;
329 }
330
331 if (wci->m_lpszOrigName) *pProc = wci->pWndProc;
332
333 TRACE("returning 0x%04x\n", atom);
334 return atom;
335}
#define FIXME(fmt,...)
Definition: precomp.h:53
WORD ATOM
Definition: dimm.idl:113
#define debugstr_a
Definition: kernel32.h:31
static LPMONITOREX pm
Definition: localmon.c:45
#define sprintf
Definition: sprintf.c:45
LPCSTR m_lpszOrigName
Definition: atlwin.h:27
CHAR m_szAutoName[sizeof("ATL:")+sizeof(void *) *2]
Definition: atlwin.h:32
WNDCLASSEXA m_wc
Definition: atlwin.h:26
LPCSTR m_lpszCursorID
Definition: atlwin.h:29
HINSTANCE hInstance
Definition: winuser.h:3314
HCURSOR hCursor
Definition: winuser.h:3316
WNDPROC lpfnWndProc
Definition: winuser.h:3311
LPCSTR lpszClassName
Definition: winuser.h:3319
BOOL WINAPI GetClassInfoExA(_In_opt_ HINSTANCE, _In_ LPCSTR, _Out_ LPWNDCLASSEXA)
ATOM WINAPI RegisterClassExA(_In_ CONST WNDCLASSEXA *)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2459

◆ AtlModuleRegisterWndClassInfoW()

ATOM WINAPI AtlModuleRegisterWndClassInfoW ( _ATL_MODULEW pm,
_ATL_WNDCLASSINFOW wci,
WNDPROC pProc 
)

Definition at line 355 of file atl30.c.

356{
357 ATOM atom;
358
359 FIXME("%p %p %p semi-stub\n", pm, wci, pProc);
360
361 atom = wci->m_atom;
362 if (!atom)
363 {
364 WNDCLASSEXW wc;
365
366 TRACE("wci->m_wc.lpszClassName = %s\n", debugstr_w(wci->m_wc.lpszClassName));
367
368 if (wci->m_lpszOrigName)
369 FIXME( "subclassing %s not implemented\n", debugstr_w(wci->m_lpszOrigName));
370
371 if (!wci->m_wc.lpszClassName)
372 {
373 swprintf(wci->m_szAutoName, ARRAY_SIZE(wci->m_szAutoName), L"ATL:%p", wci);
374 TRACE("auto-generated class name %s\n", debugstr_w(wci->m_szAutoName));
375 wci->m_wc.lpszClassName = wci->m_szAutoName;
376 }
377
378 atom = GetClassInfoExW(pm->m_hInst, wci->m_wc.lpszClassName, &wc);
379 if (!atom)
380 {
381 wci->m_wc.hInstance = pm->m_hInst;
382 wci->m_wc.hCursor = LoadCursorW( wci->m_bSystemCursor ? NULL : pm->m_hInst,
383 wci->m_lpszCursorID );
384 atom = RegisterClassExW(&wci->m_wc);
385 }
386 wci->pWndProc = wci->m_wc.lpfnWndProc;
387 wci->m_atom = atom;
388 }
389
390 if (wci->m_lpszOrigName) *pProc = wci->pWndProc;
391
392 TRACE("returning 0x%04x\n", atom);
393 return atom;
394}
#define ARRAY_SIZE(A)
Definition: main.h:20
#define swprintf
Definition: precomp.h:40
#define debugstr_w
Definition: kernel32.h:32
LPCWSTR m_lpszCursorID
Definition: atlwin.h:40
WCHAR m_szAutoName[sizeof("ATL:")+sizeof(void *) *2]
Definition: atlwin.h:43
WNDCLASSEXW m_wc
Definition: atlwin.h:37
LPCWSTR m_lpszOrigName
Definition: atlwin.h:38
LPCWSTR lpszClassName
Definition: winuser.h:3334
WNDPROC lpfnWndProc
Definition: winuser.h:3326
HCURSOR hCursor
Definition: winuser.h:3331
HINSTANCE hInstance
Definition: winuser.h:3329
BOOL WINAPI GetClassInfoExW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _Out_ LPWNDCLASSEXW)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2474
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)

Referenced by test_winclassinfo().

◆ AtlPixelToHiMetric()

void WINAPI AtlPixelToHiMetric ( const SIZEL lpSizeInPix,
LPSIZEL  lpSizeInHiMetric 
)