本文整理汇总了C++中MAKEINTATOM函数的典型用法代码示例。如果您正苦于以下问题:C++ MAKEINTATOM函数的具体用法?C++ MAKEINTATOM怎么用?C++ MAKEINTATOM使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MAKEINTATOM函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ThemeDetroyWndContext
void ThemeDetroyWndContext(HWND hWnd)
{
PWND_CONTEXT pContext;
DWORD ProcessId;
/*Do not destroy WND_CONTEXT of a window that belong to another process */
GetWindowThreadProcessId(hWnd, &ProcessId);
if(ProcessId != GetCurrentProcessId())
{
return;
}
pContext = (PWND_CONTEXT)GetPropW(hWnd, (LPCWSTR)MAKEINTATOM(atWndContrext));
if(pContext == NULL)
{
return;
}
if(pContext->HasThemeRgn)
{
user32ApiHook.SetWindowRgn(hWnd, 0, TRUE);
}
HeapFree(GetProcessHeap(), 0, pContext);
SetPropW( hWnd, (LPCWSTR)MAKEINTATOM(atWndContrext), NULL);
}
示例2: Unload
MIRAPI int Unload(void)
{
int i;
for (i = SIZEOF(popupServices); i--; )
DestroyServiceFunction(popupServices[i].handle);
SrmmMenu_Unload();
UnhookEvent(hOptionsInitialize);
UnhookEvent(hModulesLoaded);
UnhookEvent(hOkToExit);
UnhookEvent(hEventStatusChanged);
UnhookEvent(hIconsChanged);
UnhookEvent(hFontsChanged);
UnhookEvent(hTBLoaded);
DestroyServiceFunction(hShowHistory);
DestroyServiceFunction(hTogglePopup);
DestroyServiceFunction(hGetStatus);
DestroyServiceFunction(hSquareFad);
DeleteObject(fonts.title);
DeleteObject(fonts.clock);
DeleteObject(fonts.text);
DeleteObject(fonts.action);
DeleteObject(fonts.actionHover);
DeleteObject(hbmNoAvatar);
FreeLibrary(hDwmapiDll);
FreeLibrary(hUserDll);
FreeLibrary(hMsimgDll);
// FreeLibrary(hKernelDll);
FreeLibrary(hGdiDll);
if(PopUpOptions.SkinPack) mir_free(PopUpOptions.SkinPack);
mir_free(PopUpOptions.Effect);
OptAdv_UnregisterVfx();
UnloadPopupThread();
UnloadPopupWnd2();
PopupHistoryUnload();
UnregisterClass (MAKEINTATOM(g_wndClass.cPopupWnd2),hInst);
UnregisterClassW(L"PopupEditBox",hInst);
UnregisterClass (MAKEINTATOM(g_wndClass.cPopupMenuHostWnd),hInst);
UnregisterClass (MAKEINTATOM(g_wndClass.cPopupThreadManagerWnd),hInst);
UnregisterClass (MAKEINTATOM(g_wndClass.cPopupPreviewBoxWndclass),hInst);
UnregisterClass (MAKEINTATOM(g_wndClass.cPopupPlusDlgBox),hInst);
UnloadGDIPlus();
UnloadActions();
CloseHandle(hMainThread);
return 0;
}
示例3: khm_create_main_window
void
khm_create_main_window(void) {
wchar_t buf[1024];
khm_handle csp_cw = NULL;
RECT r;
LoadString(khm_hInstance, IDS_MAIN_WINDOW_TITLE,
buf, ARRAYLENGTH(buf));
khm_hwnd_null =
CreateWindow(MAKEINTATOM(khm_null_window_class),
buf,
0, /* Style */
0, 0, /* x, y */
100, 100, /* width, height */
NULL, /* parent */
NULL, /* menu */
NULL, /* HINSTANCE */
0); /* lparam */
if (!khm_hwnd_null)
return;
if (KHM_SUCCEEDED(khc_open_space(NULL, L"CredWindow",
KHM_PERM_READ,
&csp_cw))) {
khm_int32 t;
if (KHM_SUCCEEDED(khc_read_int32(csp_cw, L"DefaultWindowMode", &t))) {
khm_set_main_window_mode(t);
}
khc_close_space(csp_cw);
}
khm_get_main_window_rect(&r);
khm_hwnd_main =
CreateWindowEx(WS_EX_OVERLAPPEDWINDOW | WS_EX_APPWINDOW,
MAKEINTATOM(khm_main_window_class),
buf,
WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN |
WS_CLIPSIBLINGS,
r.left, r.top,
r.right - r.left,
r.bottom - r.top,
khm_hwnd_null,
NULL,
NULL,
NULL);
khui_set_main_window(khm_hwnd_main);
}
示例4: UnregisterClass
void VLCFullScreenWnd::UnRegisterWndClassName()
{
if(0 != _fullscreen_wndclass_atom){
UnregisterClass(MAKEINTATOM(_fullscreen_wndclass_atom), _hinstance);
_fullscreen_wndclass_atom = 0;
}
if(0 != _fullscreen_controls_wndclass_atom){
UnregisterClass(MAKEINTATOM(_fullscreen_controls_wndclass_atom), _hinstance);
_fullscreen_controls_wndclass_atom = 0;
}
}
示例5: StoreNewWindowRect
void StoreNewWindowRect(HWND hWnd, HDWP hDwp, LPCRECT pRect)
{
ATLASSERT( ::IsWindow(hWnd) );
ATLASSERT( pRect != NULL );
SetProp( hWnd, MAKEINTATOM(g_atomPropHDWP), (HANDLE) hDwp );
HANDLE hptTopLeft = (HANDLE) MAKELONG( (SHORT) pRect->left, (SHORT) pRect->top ),
hptBottomRight = (HANDLE) MAKELONG( (SHORT) pRect->right, (SHORT) pRect->bottom );
SetProp( hWnd, MAKEINTATOM(g_atomPropTopLeft), hptTopLeft );
SetProp( hWnd, MAKEINTATOM(g_atomPropBottomRight), hptBottomRight );
}
示例6: _SetWindowContextHelpId
BOOL _SetWindowContextHelpId(PWND pWnd, DWORD dwContextId)
{
//If dwContextId is NULL, then this implies that the caller wants to
// remove the dwContextId associated with this Window.
if(dwContextId == 0) {
InternalRemoveProp(pWnd, MAKEINTATOM(gpsi->atomContextHelpIdProp),
PROPF_INTERNAL);
return(TRUE);
}
return (InternalSetProp(pWnd, MAKEINTATOM(gpsi->atomContextHelpIdProp),
(HANDLE)LongToHandle( dwContextId ), PROPF_INTERNAL | PROPF_NOPOOL));
}
示例7: UnregisterClasses
bool CFidgetApp::UnregisterClasses(void)
{
bool b = true;
if (0 != m_atmMain)
{
if (FALSE == UnregisterClass(MAKEINTATOM(m_atmMain), m_hInstance))
{
b = false;
}
m_atmMain = 0;
}
if (0 != m_atmSession)
{
if (FALSE == UnregisterClass(MAKEINTATOM(m_atmSession), m_hInstance))
{
b = false;
}
m_atmSession = 0;
}
if (0 != m_atmOutput)
{
if (FALSE == UnregisterClass(MAKEINTATOM(m_atmOutput), m_hInstance))
{
b = false;
}
m_atmOutput = 0;
}
if (0 != m_atmInput)
{
if (FALSE == UnregisterClass(MAKEINTATOM(m_atmInput), m_hInstance))
{
b = false;
}
m_atmInput = 0;
}
if (NULL != m_brushBlack)
{
if (FALSE == DeleteObject(m_brushBlack))
{
b = false;
}
m_brushBlack = NULL;
}
return b;
}
示例8: __declspec
/* DllMain is invoked by every process in the entire system that is hooked
* by our window hooks, notably the tty processes' context, and by the user
* who wants tty messages (the app). Keep it light and simple.
*/
BOOL __declspec(dllexport) APIENTRY DllMain(HINSTANCE hModule, ULONG ulReason,
LPVOID pctx)
{
if (ulReason == DLL_PROCESS_ATTACH)
{
//hmodThis = hModule;
if (!hookwndmsg) {
origwndprop = MAKEINTATOM(GlobalAddAtom("Win9xConHookOrigProc"));
hookwndprop = MAKEINTATOM(GlobalAddAtom("Win9xConHookThunkWnd"));
hookwndmsg = RegisterWindowMessage("Win9xConHookMsg");
}
#ifdef DBG
// DbgPrintf("H ProcessAttach:%8.8x\r\n",
// GetCurrentProcessId());
#endif
}
else if ( ulReason == DLL_PROCESS_DETACH )
{
#ifdef DBG
// DbgPrintf("H ProcessDetach:%8.8x\r\n", GetCurrentProcessId());
#endif
if (monitor_hwnd)
SendMessage(monitor_hwnd, WM_DESTROY, 0, 0);
if (is_subclassed)
SendMessage(hwtty, hookwndmsg, 0, (LPARAM)hwtty);
if (hmodHook)
{
if (hhkGetMessage) {
UnhookWindowsHookEx(hhkGetMessage);
hhkGetMessage = NULL;
}
//if (hhkCallWndProc) {
// UnhookWindowsHookEx(hhkCallWndProc);
// hhkCallWndProc = NULL;
//}
FreeLibrary(hmodHook);
hmodHook = NULL;
}
if (is_service)
RegisterWindows9xService(FALSE);
if (hookwndmsg) {
GlobalDeleteAtom((ATOM)origwndprop);
GlobalDeleteAtom((ATOM)hookwndprop);
hookwndmsg = 0;
}
}
return TRUE;
}
示例9: _etk_create_window
LRESULT _etk_create_window(EWin32GraphicsEngine *win32Engine, etk_win32_gdi_callback_t *callback)
{
if(win32Engine == NULL || callback == NULL ||
callback->command != WM_ETK_MESSAGE_CREATE_WINDOW || callback->win == NULL) return FALSE;
EAutolock <EWin32GraphicsEngine> autolock(win32Engine);
if(autolock.IsLocked() == false || win32Engine->InitCheck() != E_OK) return FALSE;
LONG style = _etk_get_window_style(E_TITLED_WINDOW_LOOK);
LONG styleEx = _etk_get_window_style_ex(E_TITLED_WINDOW_LOOK);
RECT r;
r.left = callback->x;
r.top = callback->y;
r.right = callback->x + (int)callback->w;
r.bottom = callback->y + (int)callback->h;
AdjustWindowRectEx(&r, style, FALSE, styleEx);
if((callback->win->win32Window = CreateWindowEx(styleEx, MAKEINTATOM(win32Engine->win32RegisterClass), "", style,
r.left, r.top, r.right - r.left + 1, r.bottom - r.top + 1,
NULL, NULL, win32Engine->win32Hinstance, NULL)) == NULL) return FALSE;
callback->win->fLook = E_TITLED_WINDOW_LOOK;
// FIXME: maybe 64-bit pointer
SetWindowLong(callback->win->win32Window, 0, reinterpret_cast<long>(win32Engine));
SetWindowLong(callback->win->win32Window, GWL_USERDATA, reinterpret_cast<long>(callback->win));
return TRUE;
}
示例10: CreateOpenGLContext
bool CreateOpenGLContext()
{
PIXELFORMATDESCRIPTOR pfd;
RECT rect = { 0, 0, 10, 10 };
WNDCLASSEX wcex;
wcex.cbSize = sizeof ( WNDCLASSEX );
wcex.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
wcex.lpfnWndProc = ( WNDPROC ) DefWindowProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = GetModuleHandle ( NULL );
wcex.hIcon = LoadIcon ( NULL, IDI_WINLOGO );
wcex.hCursor = LoadCursor ( NULL, IDC_ARROW );
wcex.hbrBackground = NULL;
wcex.lpszMenuName = NULL;
wcex.lpszClassName = "glUnitTest";
wcex.hIconSm = NULL;
atom = RegisterClassEx ( &wcex );
hWnd = CreateWindowEx ( WS_EX_APPWINDOW | WS_EX_WINDOWEDGE,
MAKEINTATOM ( atom ), "OpenGL Unit Testing Window",
WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
0, 0, // Location
rect.right - rect.left, rect.bottom - rect.top, // dimensions
NULL,
NULL,
GetModuleHandle ( NULL ),
NULL );
hDC = GetDC ( hWnd );
pfd.nSize = sizeof ( PIXELFORMATDESCRIPTOR );
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 32;
pfd.cRedBits = 0;
pfd.cRedShift = 0;
pfd.cGreenBits = 0;
pfd.cGreenShift = 0;
pfd.cBlueBits = 0;
pfd.cBlueShift = 0;
pfd.cAlphaBits = 0;
pfd.cAlphaShift = 0;
pfd.cAccumBits = 0;
pfd.cAccumRedBits = 0;
pfd.cAccumGreenBits = 0;
pfd.cAccumBlueBits = 0;
pfd.cAccumAlphaBits = 0;
pfd.cDepthBits = 32;
pfd.cStencilBits = 0;
pfd.cAuxBuffers = 0;
pfd.iLayerType = PFD_MAIN_PLANE;
pfd.bReserved = 0;
pfd.dwLayerMask = 0;
pfd.dwVisibleMask = 0;
pfd.dwDamageMask = 0;
int pf = ChoosePixelFormat ( hDC, &pfd );
SetPixelFormat ( hDC, pf, &pfd );
hRC = wglCreateContext ( hDC );
wglMakeCurrent ( hDC, hRC );
return true;
}
示例11: mHwnd
Window::Window(const wchar_t* title)
: mHwnd()
{
const auto hInstance = static_cast<HINSTANCE>(GetModuleHandle(nullptr));
if (0 == sWndClass)
{
const auto wndClassName = L"Ten18::Window";
WNDCLASSEX wcex = {};
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.lpfnWndProc = &Window::WndProc;
wcex.hInstance = hInstance;
wcex.lpszClassName = wndClassName;
Ten18_EXPECT.NotZero = sWndClass = RegisterClassEx(&wcex);
}
const auto style = WS_OVERLAPPEDWINDOW;
const auto styleEx = WS_EX_OVERLAPPEDWINDOW;
Ten18_EXPECT.NotNull = mHwnd = CreateWindowEx(styleEx, MAKEINTATOM(sWndClass), title, style,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
nullptr, nullptr, hInstance, this);
Input::RawInput::Register(mHwnd);
Ten18_EXPECT.Zero = ShowWindow(mHwnd, SW_SHOWDEFAULT);
Ten18_EXPECT.NotZero = UpdateWindow(mHwnd);
InterlockedIncrement(&sWndCount);
}
示例12: Win32WindowImpl
WindowImpl* Win32GUIFactory::createWindowImpl(Window* in_window)
{
WindowImpl* impl = new Win32WindowImpl(in_window);
RECT size;
size.left = 0;
size.right = in_window->width-1;
size.top = 0;
size.bottom = in_window->height-1;
// no menu
AdjustWindowRect(&size, WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX, false);
HWND success = CreateWindow(
MAKEINTATOM(Win32WindowImpl::classAtom), in_window->title,
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0,
size.right- size.left+1, size.bottom - size.top+1,
NULL, NULL,
(HINSTANCE) Win32WindowImpl::moduleHandle, (LPVOID) impl
);
if (!success) {
printMessage("gui/win32: unable to create window failed");
return NULL;
}
return impl;
}
示例13: _T
HWND uie_albumart::create_or_transfer_window(HWND wnd_parent, const uie::window_host_ptr & p_host, const ui_helpers::window_position_t & p_position)
{
if (m_hWnd == NULL) {
static const TCHAR g_class_name[] = _T("foo_uie_albumart.dll window class");
static ATOM g_class_atom = 0;
if (g_class_atom == 0)
{
WNDCLASS wc;
memset(&wc,0,sizeof(wc));
wc.style = CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS;
wc.lpfnWndProc = host_proc;
wc.hInstance = core_api::get_my_instance();
wc.hCursor = ::LoadCursor(0,IDC_ARROW);
wc.hbrBackground = NULL;
wc.lpszClassName = g_class_name;
g_class_atom = RegisterClass(&wc);
}
m_hWnd = ::CreateWindowEx(exstyle_from_config(m_config.edge_style),
MAKEINTATOM(g_class_atom),_T("Album Art"),
WS_CHILD,
CW_USEDEFAULT,CW_USEDEFAULT,
0,0,
wnd_parent,0,core_api::get_my_instance(),this);
} else {
::ShowWindow(m_hWnd, SW_HIDE);
::SetParent(m_hWnd, wnd_parent);
::SetWindowPos(m_hWnd, NULL, p_position.x, p_position.y, p_position.cx, p_position.cy, SWP_NOZORDER);
m_host->relinquish_ownership(m_hWnd);
m_host.release();
}
m_host = p_host;
return m_hWnd;
}
示例14: Win32WindowImpl
// ---------------------------------------------------------------------------
WindowImpl* Win32GUIFactory::createWindowImpl(Window* in_window)
{
WindowImpl* impl = new Win32WindowImpl(in_window);
RECT size;
size.left = 0;
size.right = in_window->width-1;
size.top = 0;
size.bottom = in_window->height-1;
// no menu
AdjustWindowRect(&size, WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX, false);
HWND success = CreateWindow(
MAKEINTATOM(Win32WindowImpl::classAtom), in_window->title,
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0,
size.right- size.left+1, size.bottom - size.top+1,
NULL, NULL,
NULL, (LPVOID) impl
);
assert(success);
return impl;
}
示例15: ATLASSERT
LONG CLayoutRuleRelativeControl::Apply(CWindow wndLayout, UINT nDirection,
const CRect& rcLayout) const
{
CWindow wndCtrl = wndLayout.GetDlgItem( m_nCtrlID );
ATLASSERT( ::IsWindow(wndCtrl) );
CRect rcPadding( 0, 0, m_nPadding, m_nPadding );
::MapDialogRect( wndLayout, rcPadding );
HDWP hDwp = (HDWP) GetProp( wndLayout, MAKEINTATOM(g_atomPropHDWP) );
CRect rcCtrl;
GetNewWindowRect( wndCtrl, hDwp, rcCtrl );
switch ( this->m_nDirection )
{
case LAYOUT_DIRECTION_LEFT:
ATLASSERT( nDirection == LAYOUT_DIRECTION_LEFT || nDirection == LAYOUT_DIRECTION_RIGHT );
return rcCtrl.left - rcPadding.Width();
case LAYOUT_DIRECTION_TOP:
ATLASSERT( nDirection == LAYOUT_DIRECTION_TOP || nDirection == LAYOUT_DIRECTION_BOTTOM );
return rcCtrl.top - rcPadding.Height();
case LAYOUT_DIRECTION_RIGHT:
ATLASSERT( nDirection == LAYOUT_DIRECTION_LEFT || nDirection == LAYOUT_DIRECTION_RIGHT );
return rcCtrl.right + rcPadding.Width();
case LAYOUT_DIRECTION_BOTTOM:
ATLASSERT( nDirection == LAYOUT_DIRECTION_TOP || nDirection == LAYOUT_DIRECTION_BOTTOM );
return rcCtrl.bottom + rcPadding.Height();
default:
ATLASSERT(FALSE);
return 0;
}
}