36 operator const char*()
const {
return m_buffer.get_ptr();}
63 bool Open(HWND p_owner);
90 PFC_ASSERT( val %
sizeof(TItem) == 0 );
91 return val /
sizeof(TItem);
125 void create(
bool p_manualreset,
bool p_initialstate);
185 void load(HINSTANCE p_inst,
const TCHAR * p_id);
206 OffsetWindowOrgEx(m_dc, m_pt.x, m_pt.y, NULL);
209 OffsetWindowOrgEx(m_dc, -m_pt.x, -m_pt.y, NULL);
219 m_state = SaveDC(m_dc);
222 RestoreDC(m_dc,m_state);
246 ULONG STDMETHODCALLTYPE AddRef() {
247 return ++m_refcounter;
250 long val = --m_refcounter;
251 if (val == 0)
delete this;
262 template<
typename TPtr>
pfc::refcounter m_refcounter
bool IsKeyPressed(unsigned vk)
CGlobalLockScope(HGLOBAL p_handle)
BOOL winFormatSystemErrorMessage(pfc::string_base &p_out, DWORD p_code)
void load(HINSTANCE p_inst, const TCHAR *p_id)
win32_icon(const win32_icon &)
t_type replace_null_t(t_type &p_var)
CGlobalLockScopeT(HGLOBAL handle)
PFC_CLASS_NOT_COPYABLE(win32_accelerator, win32_accelerator)
typedef BOOL(WINAPI *pPowerSetRequest_t)(__in HANDLE PowerRequest
HANDLE get_handle() const
void uRemoveWindowStyle(HWND p_wnd, LONG p_style)
OffsetWindowOrgScope(HDC dc, const POINT &pt)
const win32_icon & operator=(const win32_icon &)
WORD GetWindowsVersionCode()
void uRemoveWindowExStyle(HWND p_wnd, LONG p_style)
bool IsWindowChildOf(HWND child, HWND parent)
t_type replace_t(t_type &p_var, const t_newval &p_newval)
void winPrefixPath(pfc::string_base &out, const char *p_path)
PFC_CLASS_NOT_COPYABLE_EX(SelectObjectScope) HDC m_dc
TEMPLATE_CONSTRUCTOR_FORWARD_FLOOD(ImplementCOMRefCounter, TBase) ULONG STDMETHODCALLTYPE AddRef()
typedef HANDLE(WINAPI *pPowerCreateRequest_t)(__in void *Context)
static int g_twoEventWait(win32_event &ev1, win32_event &ev2, double timeout)
void uSleepSeconds(double p_time, bool p_alertable)
const char * get_ptr() const
static bool g_wait_for(HANDLE p_event, double p_timeout_seconds)
Returns true when signaled, false on timeout.
void set(HANDLE p_handle)
void winUnPrefixPath(pfc::string_base &out, const char *p_path)
string8_fastalloc string_formatter
exception_com(HRESULT p_code, const char *msg)
exception_com(HRESULT p_code)
bool IsPointInsideControl(const POINT &pt, HWND wnd)
Simple implementation of a COM reference counter. The initial reference count is zero, so it can be used with pfc::com_ptr_t<> with plain operator=/constructor rather than attach().
static DWORD g_calculate_wait_time(double p_seconds)
SelectObjectScope(HDC p_dc, HGDIOBJ p_obj)
exception_win32(DWORD p_code)
void uAddWindowStyle(HWND p_wnd, LONG p_style)
void create(bool p_manualreset, bool p_initialstate)
unsigned GetHotkeyModifierFlags()
Returns current modifier keys pressed, using win32 MOD_* flags.
win32_icon(HICON p_initval)
bool wait_for(double p_timeout_seconds)
Returns true when signaled, false on timeout.
const win32_event & operator=(const win32_event &)
virtual ~ImplementCOMRefCounter()
ULONG STDMETHODCALLTYPE Release()
void uAddWindowExStyle(HWND p_wnd, LONG p_style)
void set_state(bool p_state)
unsigned MapDialogWidth(HWND p_dialog, unsigned p_value)