ReactOS  0.4.14-dev-1007-g90d795b
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 @1619::@1620 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 #ifdef __REACTOS__
317  sprintf(wci->m_szAutoName, "ATL:%p", wci);
318 #else
319  sprintf(wci->m_szAutoName, "ATL%08lx", (UINT_PTR)wci);
320 #endif
321  TRACE("auto-generated class name %s\n", wci->m_szAutoName);
322  wci->m_wc.lpszClassName = wci->m_szAutoName;
323  }
324 
325  atom = GetClassInfoExA(pm->m_hInst, wci->m_wc.lpszClassName, &wc);
326  if (!atom)
327  {
328  wci->m_wc.hInstance = pm->m_hInst;
329  wci->m_wc.hCursor = LoadCursorA( wci->m_bSystemCursor ? NULL : pm->m_hInst,
330  wci->m_lpszCursorID );
331  atom = RegisterClassExA(&wci->m_wc);
332  }
333  wci->pWndProc = wci->m_wc.lpfnWndProc;
334  wci->m_atom = atom;
335  }
336 
337  if (wci->m_lpszOrigName) *pProc = wci->pWndProc;
338 
339  TRACE("returning 0x%04x\n", atom);
340  return atom;
341 }
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
CHAR m_szAutoName[14]
Definition: atlwin.h:35
#define sprintf(buf, format,...)
Definition: sprintf.c:55
HINSTANCE hInstance
Definition: winuser.h:3181
#define FIXME(fmt,...)
Definition: debug.h:110
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
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
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 361 of file atl30.c.

362 {
363  ATOM atom;
364 
365  FIXME("%p %p %p semi-stub\n", pm, wci, pProc);
366 
367  atom = wci->m_atom;
368  if (!atom)
369  {
370  WNDCLASSEXW wc;
371 
372  TRACE("wci->m_wc.lpszClassName = %s\n", debugstr_w(wci->m_wc.lpszClassName));
373 
374  if (wci->m_lpszOrigName)
375  FIXME( "subclassing %s not implemented\n", debugstr_w(wci->m_lpszOrigName));
376 
377  if (!wci->m_wc.lpszClassName)
378  {
379 #ifdef __REACTOS__
380  static const WCHAR szFormat[] = {'A','T','L',':','%','p',0};
381 #else
382  static const WCHAR szFormat[] = {'A','T','L','%','0','8','l','x',0};
383 #endif
384  swprintf(wci->m_szAutoName, szFormat, (UINT_PTR)wci);
385  TRACE("auto-generated class name %s\n", debugstr_w(wci->m_szAutoName));
386  wci->m_wc.lpszClassName = wci->m_szAutoName;
387  }
388 
389  atom = GetClassInfoExW(pm->m_hInst, wci->m_wc.lpszClassName, &wc);
390  if (!atom)
391  {
392  wci->m_wc.hInstance = pm->m_hInst;
393  wci->m_wc.hCursor = LoadCursorW( wci->m_bSystemCursor ? NULL : pm->m_hInst,
394  wci->m_lpszCursorID );
395  atom = RegisterClassExW(&wci->m_wc);
396  }
397  wci->pWndProc = wci->m_wc.lpfnWndProc;
398  wci->m_atom = atom;
399  }
400 
401  if (wci->m_lpszOrigName) *pProc = wci->pWndProc;
402 
403  TRACE("returning 0x%04x\n", atom);
404  return atom;
405 }
LPCWSTR m_lpszOrigName
Definition: atlwin.h:42
BOOL WINAPI GetClassInfoExW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _Out_ LPWNDCLASSEXW)
WORD ATOM
Definition: dimm.idl:113
WNDCLASSEXW m_wc
Definition: atlwin.h:41
static LPMONITOREX pm
Definition: localmon.c:45
LPCWSTR m_lpszCursorID
Definition: atlwin.h:44
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
WCHAR m_szAutoName[14]
Definition: atlwin.h:50
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
LPCWSTR lpszClassName
Definition: winuser.h:3201
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define swprintf(buf, format,...)
Definition: sprintf.c:56
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
HINSTANCE hInstance
Definition: winuser.h:3196
HCURSOR hCursor
Definition: winuser.h:3198
WNDPROC lpfnWndProc
Definition: winuser.h:3193

◆ AtlPixelToHiMetric()

void WINAPI AtlPixelToHiMetric ( const SIZEL lpSizeInPix,
LPSIZEL  lpSizeInHiMetric 
)