ReactOS  0.4.15-dev-1070-ge1a01de
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;
132  DEVMODEW *devmode = 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;
146  driver = displayW;
147  }
148  return CreateDCW( driver, device, port, devmode );
149 }
struct @1644::@1645 driver
Definition: devices.h:37
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR displayW[]
Definition: icm.c:30
DEVMODEW devmode
HDC hdc
Definition: main.c:9
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)
USHORT port
Definition: uri.c:228

◆ 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 }
HCURSOR hCursor
Definition: winuser.h:3183
WNDPROC lpfnWndProc
Definition: winuser.h:3178
LPCSTR lpszClassName
Definition: winuser.h:3186
WORD ATOM
Definition: dimm.idl:113
static LPMONITOREX pm
Definition: localmon.c:45
#define sprintf(buf, format,...)
Definition: sprintf.c:55
HINSTANCE hInstance
Definition: winuser.h:3181
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
LPCSTR m_lpszCursorID
Definition: atlwin.h:29
CHAR m_szAutoName[sizeof("ATL:")+sizeof(void *) *2]
Definition: atlwin.h:32
WNDCLASSEXA m_wc
Definition: atlwin.h:26
ATOM WINAPI RegisterClassExA(_In_ CONST WNDCLASSEXA *)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2059
BOOL WINAPI GetClassInfoExA(_In_opt_ HINSTANCE, _In_ LPCSTR, _Out_ LPWNDCLASSEXA)
LPCSTR m_lpszOrigName
Definition: atlwin.h:27

◆ 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 }
LPCWSTR m_lpszOrigName
Definition: atlwin.h:38
BOOL WINAPI GetClassInfoExW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _Out_ LPWNDCLASSEXW)
WORD ATOM
Definition: dimm.idl:113
WNDCLASSEXW m_wc
Definition: atlwin.h:37
static LPMONITOREX pm
Definition: localmon.c:45
LPCWSTR m_lpszCursorID
Definition: atlwin.h:40
WCHAR m_szAutoName[sizeof("ATL:")+sizeof(void *) *2]
Definition: atlwin.h:43
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
LPCWSTR lpszClassName
Definition: winuser.h:3201
#define TRACE(s)
Definition: solgame.cpp:4
#define swprintf(buf, format,...)
Definition: sprintf.c:56
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
HINSTANCE hInstance
Definition: winuser.h:3196
static const WCHAR L[]
Definition: oid.c:1250
HCURSOR hCursor
Definition: winuser.h:3198
WNDPROC lpfnWndProc
Definition: winuser.h:3193
#define ARRAY_SIZE(a)
Definition: main.h:24

Referenced by test_winclassinfo().

◆ AtlPixelToHiMetric()

void WINAPI AtlPixelToHiMetric ( const SIZEL lpSizeInPix,
LPSIZEL  lpSizeInHiMetric 
)