• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ MAKEINTATOM函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中MAKEINTATOM函数的典型用法代码示例。如果您正苦于以下问题:C++ MAKEINTATOM函数的具体用法?C++ MAKEINTATOM怎么用?C++ MAKEINTATOM使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了MAKEINTATOM函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:RareHare,项目名称:reactos,代码行数:27,代码来源:themehooks.c


示例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;
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:59,代码来源:main.cpp


示例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);
}
开发者ID:Brainiarc7,项目名称:pbis,代码行数:53,代码来源:mainwnd.c


示例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;
    }
}
开发者ID:forthyen,项目名称:npapi-vlc,代码行数:12,代码来源:win32_fullscreen.cpp


示例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 );
}
开发者ID:EmuxEvans,项目名称:sailing,代码行数:12,代码来源:DialogLayout.cpp


示例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));
}
开发者ID:conioh,项目名称:os-design,代码行数:13,代码来源:help.c


示例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;
}
开发者ID:sanjayui,项目名称:tinymux,代码行数:50,代码来源:fidget.cpp


示例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;
}
开发者ID:Garridon,项目名称:windowsrtdev,代码行数:52,代码来源:Win9xConHook.c


示例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;
}
开发者ID:D-os,项目名称:EasyToolkitAndExtension,代码行数:31,代码来源:etk-window.cpp


示例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;
 }
开发者ID:AeonGames,项目名称:AeonGUI,代码行数:60,代码来源:OpenGLContext.cpp


示例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);
}
开发者ID:HITKIL,项目名称:Ten18,代码行数:30,代码来源:Window.cpp


示例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;
 }
开发者ID:jefferis,项目名称:rgl,代码行数:31,代码来源:win32gui.cpp


示例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;
}
开发者ID:Duny,项目名称:foo_uie_albumart_mod,代码行数:34,代码来源:uie_albumart.cpp


示例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;
}
开发者ID:jefferis,项目名称:rgl,代码行数:27,代码来源:win32gui.cpp


示例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;
	}
}
开发者ID:EmuxEvans,项目名称:sailing,代码行数:32,代码来源:DialogLayout.cpp


示例16: OpenThemeDataEx

/***********************************************************************
 *      OpenThemeDataEx                                     (UXTHEME.61)
 */
HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags)
{
    WCHAR szAppBuff[256];
    WCHAR szClassBuff[256];
    LPCWSTR pszAppName;
    LPCWSTR pszUseClassList;
    HTHEME hTheme = NULL;
    TRACE("(%p,%s, %x)\n", hwnd, debugstr_w(pszClassList), flags);

    if(flags)
        FIXME("unhandled flags: %x\n", flags);

    if(bThemeActive)
    {
        pszAppName = UXTHEME_GetWindowProperty(hwnd, atSubAppName, szAppBuff, sizeof(szAppBuff)/sizeof(szAppBuff[0]));
        /* If SetWindowTheme was used on the window, that overrides the class list passed to this function */
        pszUseClassList = UXTHEME_GetWindowProperty(hwnd, atSubIdList, szClassBuff, sizeof(szClassBuff)/sizeof(szClassBuff[0]));
        if(!pszUseClassList)
            pszUseClassList = pszClassList;

        if (pszUseClassList)
            hTheme = MSSTYLES_OpenThemeClass(pszAppName, pszUseClassList);
    }
    if(IsWindow(hwnd))
        SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme), hTheme);
    TRACE(" = %p\n", hTheme);
    return hTheme;
}
开发者ID:MichaelMcDonnell,项目名称:wine,代码行数:31,代码来源:system.c


示例17: MakeWindow

HWND MakeWindow(
    const wchar_t* title, ULONG style, HMENU menu, const SIZE& size, MessageHandler* handlers) {
  WNDCLASSEXW wcex = {sizeof(wcex)};
  wcex.hCursor = ::LoadCursorW(NULL, IDC_ARROW);
  wcex.hInstance = ThisModule();
  wcex.hIcon = ::LoadIcon(ThisModule(), MAKEINTRESOURCE(IDI_FILECLEANER));
  wcex.lpszMenuName	= MAKEINTRESOURCE(IDC_FILECLEANER);
  wcex.lpszClassName = __FILEW__;
  wcex.lpfnWndProc = [] (HWND window, UINT message, WPARAM wparam, LPARAM lparam) -> LRESULT {
    static MessageHandler* s_handlers = reinterpret_cast<MessageHandler*>(lparam);
    size_t ix = 0;
    while (s_handlers[ix].message != -1) {
      if (s_handlers[ix].message == message)
        return s_handlers[ix].callback(window, wparam, lparam);
      ++ix;
    }

    return ::DefWindowProcW(window, message, wparam, lparam);
  };

  wcex.lpfnWndProc(NULL, 0, 0, reinterpret_cast<UINT_PTR>(handlers));
  ATOM atom = VerifyNot(::RegisterClassExW(&wcex), 0);
  int pos_def = CW_USEDEFAULT;
  return ::CreateWindowExW(0, MAKEINTATOM(atom), title, style,
                           pos_def, pos_def, size.cx, size.cy,
                           NULL, menu, ThisModule(), NULL); 
}
开发者ID:cpizano,项目名称:FileCleaner,代码行数:27,代码来源:FileCleaner.cpp


示例18: CreateCalender

//======================================================
//-------------------------------+++--> Open "Calendar":
HWND CreateCalender(HWND hwnd)   //---------------+++-->
{
	INITCOMMONCONTROLSEX icex = {sizeof(icex), ICC_DATE_CLASSES};
	WNDCLASSEX wcx = {sizeof(wcx)};
	ATOM calclass;
	m_bAutoClose = api.GetInt(L"Calendar", L"CloseCalendar", 1);
	m_bTopMost = api.GetInt(L"Calendar", L"CalendarTopMost", 0);
	InitCommonControlsEx(&icex);
	
	wcx.style = 0;
	wcx.lpfnWndProc = Window_Calendar;
	wcx.cbClsExtra = 0;
	wcx.cbWndExtra = 0;
	wcx.hInstance = g_instance;
	wcx.hIcon = NULL;
	wcx.hIcon = LoadIcon(g_instance,MAKEINTRESOURCE(IDI_MAIN));
	wcx.hCursor = LoadCursor(NULL,IDC_ARROW);
	wcx.hbrBackground = (HBRUSH)COLOR_WINDOWFRAME;
	wcx.lpszMenuName = NULL;
	wcx.lpszClassName = L"ClockFlyoutWindow";
	wcx.hIconSm = NULL;
	calclass = RegisterClassEx(&wcx);
	hwnd = CreateWindowEx(0, MAKEINTATOM(calclass), L"T-Clock: Calendar", (WS_CAPTION|WS_POPUP|WS_SYSMENU|WS_VISIBLE), 0,0,0,0, hwnd, 0, g_instance, NULL);
	return hwnd;
}
开发者ID:heicks,项目名称:T-Clock,代码行数:27,代码来源:DeskCalendar.c


示例19: GetDataPtr

LPCWSTR CDialogItemTemplate::GetClassName() const
{
	const WORD* pw = GetDataPtr();
	if ( *pw == 0xFFFF )
		return (LPCWSTR) MAKEINTATOM(pw[1]);
	else
		return (LPCWSTR) pw;
}
开发者ID:EmuxEvans,项目名称:sailing,代码行数:8,代码来源:DialogItemTemplate.cpp


示例20: initialize_if_necessary

static void
initialize_if_necessary(void)
{
    if (message_window_class == 0) {
        WNDCLASSEX c = {
            sizeof(WNDCLASSEX), /* cbSize */
            0,                  /* style */
            notifier_wnd_proc,  /* lpfnWndProc */
            0,                  /* cbClsExtra */
            0,                  /* cbWndExtra */
            NULL,               /* hinstance */
            NULL,               /* hIcon */
            NULL,               /* hCursor */
            NULL,               /* hbrBackground */
            NULL,               /* lpszMenuName */
            L"OpenAFSTokenStateIconNotifier", /* lpszClassName */
            NULL,                             /* hIconSm */
        };

        c.hInstance = hInstance;
        message_window_class = RegisterClassEx(&c);
    }

    if (notifier_window == NULL && message_window_class != 0) {
        notifier_window = CreateWindow(MAKEINTATOM(message_window_class),
                                       L"OpenAFSTokenStateIconNotifierWindow",
                                       0, 0, 0, 0, 0,
                                       HWND_MESSAGE,
                                       NULL,
                                       hInstance,
                                       NULL);
    }

    assert(notifier_window != NULL);

    if (!notification_icon_added && notifier_window != NULL) {
        NOTIFYICONDATA idata;

        ZeroMemory(&idata, sizeof(idata));

        idata.cbSize = sizeof(idata);
        idata.hWnd = notifier_window;
        idata.uID = TOKEN_ICON_ID;
        idata.uFlags = NIF_ICON | NIF_MESSAGE;
        idata.uCallbackMessage = TOKEN_MESSAGE_ID;
        idata.hIcon = (HICON) LoadImage(hResModule, MAKEINTRESOURCE(IDI_CRED_NONE),
                                        IMAGE_ICON, 0, 0,
                                        LR_DEFAULTSIZE | LR_DEFAULTCOLOR | LR_SHARED);
        notification_icon_added = Shell_NotifyIcon(NIM_ADD, &idata);

        idata.cbSize = sizeof(idata);
        idata.uVersion = NOTIFYICON_VERSION;

        Shell_NotifyIcon(NIM_SETVERSION, &idata);

        assert(notification_icon_added);
    }
}
开发者ID:bagdxk,项目名称:openafs,代码行数:58,代码来源:afsicon.c



注:本文中的MAKEINTATOM函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MAKEINTRESOURCE函数代码示例发布时间:2022-05-30
下一篇:
C++ MAKEHASH函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap