ReactOS 0.4.15-dev-8096-ga0eec98
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 128 of file atl.c.

129{
130 static const WCHAR displayW[] = {'d','i','s','p','l','a','y',0};
131 const WCHAR *driver = NULL, *device = NULL, *port = NULL;
133
134 TRACE( "(%p, %p)\n", hdc, dv );
135
136 if (dv)
137 {
138 if (dv->tdDriverNameOffset) driver = (WCHAR *)((char *)dv + dv->tdDriverNameOffset);
139 if (dv->tdDeviceNameOffset) device = (WCHAR *)((char *)dv + dv->tdDeviceNameOffset);
140 if (dv->tdPortNameOffset) port = (WCHAR *)((char *)dv + dv->tdPortNameOffset);
141 if (dv->tdExtDevmodeOffset) devmode = (DEVMODEW *)((char *)dv + dv->tdExtDevmodeOffset);
142 }
143 else
144 {
145 if (hdc) return hdc;
147 }
148 return CreateDCW( driver, device, port, devmode );
149}
DEVMODEW devmode
#define NULL
Definition: types.h:112
USHORT port
Definition: uri.c:228
HDC hdc
Definition: main.c:9
static const WCHAR displayW[]
Definition: icm.c:30
struct @1673::@1674 driver
#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)
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ AtlHiMetricToPixel()

void WINAPI AtlHiMetricToPixel ( const SIZEL lpSizeInHiMetric,
LPSIZEL  lpSizeInPix 
)

◆ AtlModuleRegisterWndClassInfoA()

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

Definition at line 298 of file atl30.c.

299{
300 ATOM atom;
301
302 FIXME("%p %p %p semi-stub\n", pm, wci, pProc);
303
304 atom = wci->m_atom;
305 if (!atom)
306 {
307 WNDCLASSEXA wc;
308
309 TRACE("wci->m_wc.lpszClassName = %s\n", wci->m_wc.lpszClassName);
310
311 if (wci->m_lpszOrigName)
312 FIXME( "subclassing %s not implemented\n", debugstr_a(wci->m_lpszOrigName));
313
314 if (!wci->m_wc.lpszClassName)
315 {
316 sprintf(wci->m_szAutoName, "ATL:%p", wci);
317 TRACE("auto-generated class name %s\n", wci->m_szAutoName);
318 wci->m_wc.lpszClassName = wci->m_szAutoName;
319 }
320
321 atom = GetClassInfoExA(pm->m_hInst, wci->m_wc.lpszClassName, &wc);
322 if (!atom)
323 {
324 wci->m_wc.hInstance = pm->m_hInst;
325 wci->m_wc.hCursor = LoadCursorA( wci->m_bSystemCursor ? NULL : pm->m_hInst,
326 wci->m_lpszCursorID );
327 atom = RegisterClassExA(&wci->m_wc);
328 }
329 wci->pWndProc = wci->m_wc.lpfnWndProc;
330 wci->m_atom = atom;
331 }
332
333 if (wci->m_lpszOrigName) *pProc = wci->pWndProc;
334
335 TRACE("returning 0x%04x\n", atom);
336 return atom;
337}
#define FIXME(fmt,...)
Definition: debug.h:114
WORD ATOM
Definition: dimm.idl:113
#define debugstr_a
Definition: kernel32.h:31
static LPMONITOREX pm
Definition: localmon.c:45
#define sprintf(buf, format,...)
Definition: sprintf.c:55
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:3206
HCURSOR hCursor
Definition: winuser.h:3208
WNDPROC lpfnWndProc
Definition: winuser.h:3203
LPCSTR lpszClassName
Definition: winuser.h:3211
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:2121

◆ AtlModuleRegisterWndClassInfoW()

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

Definition at line 357 of file atl30.c.

358{
359 ATOM atom;
360
361 FIXME("%p %p %p semi-stub\n", pm, wci, pProc);
362
363 atom = wci->m_atom;
364 if (!atom)
365 {
366 WNDCLASSEXW wc;
367
368 TRACE("wci->m_wc.lpszClassName = %s\n", debugstr_w(wci->m_wc.lpszClassName));
369
370 if (wci->m_lpszOrigName)
371 FIXME( "subclassing %s not implemented\n", debugstr_w(wci->m_lpszOrigName));
372
373 if (!wci->m_wc.lpszClassName)
374 {
375#ifndef __REACTOS__
376 swprintf(wci->m_szAutoName, ARRAY_SIZE(wci->m_szAutoName), L"ATL:%p", wci);
377#else
378 swprintf(wci->m_szAutoName, L"ATL:%p", wci);
379#endif
380 TRACE("auto-generated class name %s\n", debugstr_w(wci->m_szAutoName));
381 wci->m_wc.lpszClassName = wci->m_szAutoName;
382 }
383
384 atom = GetClassInfoExW(pm->m_hInst, wci->m_wc.lpszClassName, &wc);
385 if (!atom)
386 {
387 wci->m_wc.hInstance = pm->m_hInst;
388 wci->m_wc.hCursor = LoadCursorW( wci->m_bSystemCursor ? NULL : pm->m_hInst,
389 wci->m_lpszCursorID );
390 atom = RegisterClassExW(&wci->m_wc);
391 }
392 wci->pWndProc = wci->m_wc.lpfnWndProc;
393 wci->m_atom = atom;
394 }
395
396 if (wci->m_lpszOrigName) *pProc = wci->pWndProc;
397
398 TRACE("returning 0x%04x\n", atom);
399 return atom;
400}
#define ARRAY_SIZE(A)
Definition: main.h:33
#define swprintf
Definition: precomp.h:40
#define debugstr_w
Definition: kernel32.h:32
#define L(x)
Definition: ntvdm.h:50
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:3226
WNDPROC lpfnWndProc
Definition: winuser.h:3218
HCURSOR hCursor
Definition: winuser.h:3223
HINSTANCE hInstance
Definition: winuser.h:3221
BOOL WINAPI GetClassInfoExW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _Out_ LPWNDCLASSEXW)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2136
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)

Referenced by test_winclassinfo().

◆ AtlPixelToHiMetric()

void WINAPI AtlPixelToHiMetric ( const SIZEL lpSizeInPix,
LPSIZEL  lpSizeInHiMetric 
)