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

C++ GlobalDeleteAtom函数代码示例

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

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



在下文中一共展示了GlobalDeleteAtom函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: UninitPasteSerial

void UninitPasteSerial()
{
  bInitPasteSerial=FALSE;

  if (nHotkeyDelimSkipID)
  {
    if (UnregisterHotKey(hMainWnd, nHotkeyDelimSkipID))
    {
      GlobalDeleteAtom(nHotkeyDelimSkipID);
      nHotkeyDelimSkipID=0;
    }
  }
  if (nHotkeyDelimAsTabID)
  {
    if (UnregisterHotKey(hMainWnd, nHotkeyDelimAsTabID))
    {
      GlobalDeleteAtom(nHotkeyDelimAsTabID);
      nHotkeyDelimAsTabID=0;
    }
  }
  if (nHotkeyDelimAsIsID)
  {
    if (UnregisterHotKey(hMainWnd, nHotkeyDelimAsIsID))
    {
      GlobalDeleteAtom(nHotkeyDelimAsIsID);
      nHotkeyDelimAsIsID=0;
    }
  }
}
开发者ID:embassy,项目名称:AkelPad,代码行数:29,代码来源:Clipboard.c


示例2: stop_scan

void Hotkey::End()
{
	stop_scan();
	GlobalDeleteAtom(ScanHotKeyId);
	stop_mainwindow();
	GlobalDeleteAtom(MainWindowHotKeyId);
	DestroyWindow(ServerWND);
}
开发者ID:virgree,项目名称:stardict-2.4.8,代码行数:8,代码来源:hotkey.cpp


示例3: bm_Cleanup

void bm_Cleanup(HINSTANCE hInstance)
{
  GlobalDeleteAtom(atomAlignStyle);
  GlobalDeleteAtom(atomTailSize);
  GlobalDeleteAtom(atomTimeout);
  GlobalDeleteAtom(atomFont);
  UnregisterClass(CLASSNAME_TOOLTIP,hInstance);
}
开发者ID:colistro123,项目名称:Nightfire-iniMod,代码行数:8,代码来源:balloon.c


示例4: WDML_HandleRequestReply

/******************************************************************
 *		WDML_HandleRequestReply
 *
 *
 */
static WDML_QUEUE_STATE WDML_HandleRequestReply(WDML_CONV* pConv, MSG* msg, WDML_XACT* pXAct, DWORD *ack)
{
    DDEACK		ddeAck;
    WINE_DDEHEAD	wdh;
    UINT_PTR		uiLo, uiHi;
    HSZ			hsz;

    if (WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
	return WDML_QS_PASS;

    switch (msg->message)
    {
    case WM_DDE_ACK:
        UnpackDDElParam(WM_DDE_ACK, msg->lParam, &uiLo, &uiHi);
        FreeDDElParam(WM_DDE_ACK, msg->lParam);
	GlobalDeleteAtom(uiHi);
       if (ack) *ack = uiLo;
	WDML_ExtractAck(uiLo, &ddeAck);
	pXAct->hDdeData = 0;
	if (ddeAck.fAck)
	    ERR("Positive answer should appear in NACK for a request, assuming negative\n");
	TRACE("Negative answer...\n");
	break;

    case WM_DDE_DATA:
        UnpackDDElParam(WM_DDE_DATA, msg->lParam, &uiLo, &uiHi);
	TRACE("Got the result (%08lx)\n", uiLo);

	hsz = WDML_MakeHszFromAtom(pConv->instance, uiHi);

	if (DdeCmpStringHandles(hsz, pXAct->hszItem) != 0)
	    return WDML_QS_PASS;

	pXAct->hDdeData = WDML_Global2DataHandle(pConv, (HGLOBAL)uiLo, &wdh);
	if (wdh.fRelease)
	{
	    GlobalFree((HGLOBAL)uiLo);
	}
	if (wdh.fAckReq)
	{
	    pConv->instance->lastError = DMLERR_MEMORY_ERROR;
	}
	else
	{
	    GlobalDeleteAtom(uiHi);
            FreeDDElParam(WM_DDE_ACK, msg->lParam);
	}
	break;

    default:
        FreeDDElParam(msg->message, msg->lParam);
	return WDML_QS_PASS;
    }

    return WDML_QS_HANDLED;
}
开发者ID:Moteesh,项目名称:reactos,代码行数:61,代码来源:ddeclient.c


示例5: OnDDEInitiate

LRESULT OnDDEInitiate(HWND hwnd, WPARAM wparam, LPARAM lparam)
{
    ATOM aServer = GlobalAddAtom(PDFSYNC_DDE_SERVICE);
    ATOM aTopic = GlobalAddAtom(PDFSYNC_DDE_TOPIC);

    if (LOWORD(lparam) == aServer && HIWORD(lparam) == aTopic) {
        SendMessage((HWND)wparam, WM_DDE_ACK, (WPARAM)hwnd, MAKELPARAM(aServer, 0));
    }
    else {
        GlobalDeleteAtom(aServer);
        GlobalDeleteAtom(aTopic);
    }
    return 0;
}
开发者ID:Jshauk,项目名称:sumatrapdf,代码行数:14,代码来源:Search.cpp


示例6: DDE_StartConversation

static void DDE_StartConversation(HWND hwndClientDDE, LPCSTR szApplication, LPCSTR szTopic)
{
	//static BOOL fInInitiate = FALSE; 

	ATOM atomApplication = *szApplication ? GlobalAddAtom(szApplication) : 0; 
	ATOM atomTopic       = *szTopic       ? GlobalAddAtom(szTopic      ) : 0; 

	//fInInitiate = TRUE; 
	SendMessage(HWND(-1), WM_DDE_INITIATE, WPARAM(hwndClientDDE), MAKELONG(atomApplication, atomTopic));
	//fInInitiate = FALSE; 

	if (atomApplication) GlobalDeleteAtom(atomApplication); 
	if (atomTopic      ) GlobalDeleteAtom(atomTopic      ); 
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:14,代码来源:ContentHiderTHDDlg.cpp


示例7: __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


示例8: _ASSERTE

bool CHotKeysToCmdRouter::UnregisterCommand(UINT i_command_id)
{
 bool result = true;
 bool is_command_exist = false;
 if (NULL==mp_OriginalWnd)
 {
  _ASSERTE(0);
  return false;
 }

 //ID-шек c кодом i_command_id в базе данных может быть больше одной, поэтому нам нужен цикл
 HotKeyMap::iterator it;
 while((it = _FindCommandID(i_command_id)) != m_hot_key_map.end()) 
 {
  is_command_exist = true;
  //нашли ID-шку в базе данных. Надо снять с регистрации горячую клавишу
  if (!UnregisterHotKey(mp_OriginalWnd->m_hWnd, (*it).first))
   result = false;
  if (GlobalDeleteAtom((*it).first) != 0)
   result = false;

  //удаляем из базы данных
  m_hot_key_map.erase(it);  
 }

 //если были ошибки или команды нет в базе данных, то возвращаем false.
 return result && is_command_exist;
}
开发者ID:fredcooke,项目名称:secu3man,代码行数:28,代码来源:HotKeysToCmdRouter.cpp


示例9: GlobalDeleteAtom

HotkeyCombo::~HotkeyCombo()
{
  if (ID)
  {
    GlobalDeleteAtom(ID);
  }
}
开发者ID:Alim-Oezdemir,项目名称:emergedesktop,代码行数:7,代码来源:HotkeyCombo.cpp


示例10: Menu_Uninstall

void Menu_Uninstall(void)
{
    ImageList_Destroy(hImageListCold);
    ImageList_Destroy(hImageListHot);
    UnhookWindowsHookEx(g_hMenuHook);
    GlobalDeleteAtom(g_hMenuAtom);
}
开发者ID:now,项目名称:slackedit,代码行数:7,代码来源:pcp_menu.c


示例11: WDML_HandlePokeReply

/******************************************************************
 *		WDML_HandlePokeReply
 *
 *
 */
static WDML_QUEUE_STATE WDML_HandlePokeReply(WDML_CONV* pConv, MSG* msg, WDML_XACT* pXAct, DWORD *ack)
{
    UINT_PTR	uiLo, uiHi;
    HSZ		hsz;

    if (msg->message != WM_DDE_ACK && WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
    {
	return WDML_QS_PASS;
    }

    UnpackDDElParam(WM_DDE_ACK, msg->lParam, &uiLo, &uiHi);
    hsz = WDML_MakeHszFromAtom(pConv->instance, uiHi);
    if (DdeCmpStringHandles(hsz, pXAct->hszItem) != 0)
    {
	return WDML_QS_PASS;
    }
    FreeDDElParam(WM_DDE_ACK, msg->lParam);
    GlobalDeleteAtom(uiHi);

    if (ack) *ack = uiLo;
    pXAct->hMem = GlobalFree(pXAct->hMem);

    pXAct->hDdeData = (HDDEDATA)TRUE;
    return TRUE;
}
开发者ID:Moteesh,项目名称:reactos,代码行数:30,代码来源:ddeclient.c


示例12: WDML_ClientQueueAdvise

/******************************************************************
 *		WDML_ClientQueueAdvise
 *
 * Creates and queue an WM_DDE_ADVISE transaction
 */
static WDML_XACT*	WDML_ClientQueueAdvise(WDML_CONV* pConv, UINT wType, UINT wFmt, HSZ hszItem)
{
    DDEADVISE*		pDdeAdvise;
    WDML_XACT*		pXAct;
    ATOM		atom;

    TRACE("XTYP_ADVSTART (with%s data) transaction\n", (wType & XTYPF_NODATA) ? "out" : "");

    atom = WDML_MakeAtomFromHsz(hszItem);
    if (!atom) return NULL;

    pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_ADVISE, wFmt, hszItem);
    if (!pXAct)
    {
	GlobalDeleteAtom(atom);
	return NULL;
    }

    pXAct->wType = wType & ~0x0F;
    pXAct->hMem = GlobalAlloc(GHND | GMEM_DDESHARE, sizeof(DDEADVISE));
    /* FIXME: hMem is unfreed for now... should be deleted in server */

    /* pack DdeAdvise	*/
    pDdeAdvise = GlobalLock(pXAct->hMem);
    pDdeAdvise->fAckReq   = (wType & XTYPF_ACKREQ) != 0;
    pDdeAdvise->fDeferUpd = (wType & XTYPF_NODATA) != 0;
    pDdeAdvise->cfFormat  = wFmt;
    GlobalUnlock(pXAct->hMem);

    pXAct->lParam = PackDDElParam(WM_DDE_ADVISE, (UINT_PTR)pXAct->hMem, atom);

    return pXAct;
}
开发者ID:Moteesh,项目名称:reactos,代码行数:38,代码来源:ddeclient.c


示例13: ps_get_monitor_timing

int ps_get_monitor_timing(int monitor_index, MonitorTiming *timing)
{
	LRESULT lresult;
	char in[256];
	
	if (!hPSWnd) return 0;
	
	lresult = SendMessage(hPSWnd, UM_GETTIMING, monitor_index, 0);
	
	if (lresult == -1)
	{
		mame_printf_verbose("PStrip: Could not get PowerStrip timing string\n");
		return 0;
	}
	
	if (!GlobalGetAtomNameA(lresult, in, sizeof(in)))
	{
		mame_printf_verbose("PStrip: GlobalGetAtomName failed\n");
		return 0;
	}
	
	mame_printf_verbose("PStrip: ps_get_monitor_timing(%d): %s\n", monitor_index, in);
	
	read_timing_string(in, timing);
	
	GlobalDeleteAtom(lresult); // delete atom created by PowerStrip

	return 1;
}
开发者ID:gustavosmk,项目名称:groovyarcade.groovymame,代码行数:29,代码来源:pstrip.c


示例14: ps_set_monitor_timing

int ps_set_monitor_timing(int monitor_index, MonitorTiming *timing)
{
	LRESULT lresult;
	ATOM atom;
	char out[256];
	
	if (!hPSWnd) return 0;
		
	fill_timing_string(out, timing);
	atom = GlobalAddAtomA(out);
	
	if (atom)
	{
		lresult = SendMessage(hPSWnd, UM_SETCUSTOMTIMING, monitor_index, atom);
		
		if (lresult < 0)
		{
			mame_printf_verbose("PStrip: SendMessage failed\n");
			GlobalDeleteAtom(atom);
		}
		else
		{
			mame_printf_verbose("PStrip: ps_set_monitor_timing(%d): %s\n", monitor_index, out);
			return 1;
		}
	}
	else mame_printf_verbose("PStrip: ps_set_monitor_timing atom creation failed\n");

	return 0;
}
开发者ID:gustavosmk,项目名称:groovyarcade.groovymame,代码行数:30,代码来源:pstrip.c


示例15: ps_create_resolution

int ps_create_resolution(int monitor_index, ModeLine *modeline)
{
	LRESULT     lresult;
	ATOM        atom;
	char        out[256];
	MonitorTiming timing = {0};
	
	if (!hPSWnd) return 0;
	
	modeline_to_pstiming(modeline, &timing);
	
	fill_timing_string(out, &timing);
	atom = GlobalAddAtomA(out);
	
	if (atom)
	{
		lresult = SendMessage(hPSWnd, UM_CREATERESOLUTION, monitor_index, atom);
		
		if (lresult < 0)
        	{
        		mame_printf_verbose("PStrip: SendMessage failed\n");
        		GlobalDeleteAtom(atom);
        	}
        	else
        	{
        		mame_printf_verbose("PStrip: ps_create_resolution(%d): %dx%d succeded \n",
        			modeline->a_width, modeline->a_height, monitor_index);
        		return 1;
        	}
        }
        else mame_printf_verbose("PStrip: ps_create_resolution atom creation failed\n");
	
	return 0;
}
开发者ID:gustavosmk,项目名称:groovyarcade.groovymame,代码行数:34,代码来源:pstrip.c


示例16: WDML_HandleIncomingData

/******************************************************************
 *		WDML_HandleIncomingData
 *
 *
 */
static WDML_QUEUE_STATE WDML_HandleIncomingData(WDML_CONV* pConv, MSG* msg, HDDEDATA* hdd)
{
    UINT_PTR		uiLo, uiHi;
    HDDEDATA		hDdeDataIn, hDdeDataOut;
    WDML_LINK*		pLink;
    WINE_DDEHEAD	wdh;
    HSZ			hsz;

    TRACE("WM_DDE_DATA message received in the Client Proc!\n");
    /* wParam -- sending window handle	*/
    /* lParam -- hDdeData & item HSZ	*/

    UnpackDDElParam(WM_DDE_DATA, msg->lParam, &uiLo, &uiHi);
    hsz = WDML_MakeHszFromAtom(pConv->instance, uiHi);

    hDdeDataIn = WDML_Global2DataHandle(pConv, (HGLOBAL)uiLo, &wdh);

    /* billx:
     *  For hot link, data should be passed to its callback with
     * XTYP_ADVDATA and callback should return the proper status.
     */
    pLink = WDML_FindLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE, hsz,
                          uiLo != 0, wdh.cfFormat);
    if (!pLink)
    {
	WDML_DecHSZ(pConv->instance, hsz);
        DdeFreeDataHandle(hDdeDataIn);
	return WDML_QS_PASS;
    }

    if (hDdeDataIn != 0 && wdh.fAckReq)
    {
	WDML_PostAck(pConv, WDML_CLIENT_SIDE, 0, FALSE, TRUE, uiHi, msg->lParam, WM_DDE_DATA);
	if (msg->lParam)
	    msg->lParam = 0;
    }
    else
    {
	GlobalDeleteAtom(uiHi);
    }

    hDdeDataOut = WDML_InvokeCallback(pConv->instance, XTYP_ADVDATA, pLink->uFmt, pLink->hConv,
				      pConv->hszTopic, pLink->hszItem, hDdeDataIn, 0, 0);

    if (hDdeDataOut != (HDDEDATA)DDE_FACK || wdh.fRelease)
    {
        if (uiLo) GlobalFree((HANDLE)uiLo);
    }

    DdeFreeDataHandle(hDdeDataIn);

    WDML_DecHSZ(pConv->instance, hsz);
    if (msg->lParam)
	FreeDDElParam(WM_DDE_DATA, msg->lParam);

    return WDML_QS_HANDLED;
}
开发者ID:Moteesh,项目名称:reactos,代码行数:62,代码来源:ddeclient.c


示例17: UnregisterHotKey

bool MessageCenter::unregisterHotkey()
{
    for (int i=0; i<hotKeyId.size(); i++) {
        ATOM id =  hotKeyId[i];
        UnregisterHotKey(self,id);
        GlobalDeleteAtom(id);
    }
    return true;
}
开发者ID:xh286286,项目名称:hasee_project_swarm,代码行数:9,代码来源:messagecenter.cpp


示例18: FindMirandaForProfile

static int FindMirandaForProfile(TCHAR * szProfile)
{
	ENUMMIRANDAWINDOW x={0};
	x.profile=szProfile;
	x.msg=RegisterWindowMessage( _T( "Miranda::ProcessProfile" ));
	x.aPath=GlobalAddAtom(szProfile);
	EnumWindows(EnumMirandaWindows, (LPARAM)&x);
	GlobalDeleteAtom(x.aPath);
	return x.found;
}
开发者ID:raoergsls,项目名称:miranda,代码行数:10,代码来源:database.cpp


示例19: main_AddNullTerminatedAtomAndVerifyW

ESTATUS main_AddNullTerminatedAtomAndVerifyW(LPWSTR pswzBuffer, ATOM *ptAtom)
{
	ATOM tAtom = 0;
	ESTATUS eReturn = ESTATUS_INVALID;
	LPWSTR pswzCheckBuffer = NULL;
	DWORD cbCheckBuffer = 0;
	UINT uiRet = 0;
	HMODULE hUser32 = NULL;
	BOOL bWasAtomWrittenSuccessfully = FALSE;

	// If user32.dll is not loaded, the ATOM functions return access denied. For more details see :
	// http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.kernel/2004-03/0851.html
	hUser32 = LoadLibrary(L"user32.dll");

	do
	{
		tAtom = GlobalAddAtomW(pswzBuffer);
		if (0 == tAtom)
		{
			printf("GlobalAddAtomA failed. GLE: 0x%X (%d)\n\n", GetLastError(), GetLastError());
			eReturn = ESTATUS_MAIN_ADDNULLTERMINATEDATOMANDVERIFYW_GLOBALADDATOMW_FAILED;
			goto lblCleanup;
		}

		eReturn = main_WasAtomWrittenSuccessfully(tAtom, pswzBuffer, &bWasAtomWrittenSuccessfully);
		if (ESTATUS_FAILED(eReturn))
		{
			goto lblCleanup;
		}

		if (FALSE != bWasAtomWrittenSuccessfully)
		{
			break;
		}
		
		for (int i = 0; i < 0x2; i++)
		{
			SetLastError(ERROR_SUCCESS);
			GlobalDeleteAtom(tAtom);
			if (ERROR_SUCCESS != GetLastError())
			{
				eReturn = ESTATUS_MAIN_ADDNULLTERMINATEDATOMANDVERIFYW_GLOBALDELETEATOM_FAILED;
				goto lblCleanup;
			}
		}
	} while (FALSE == bWasAtomWrittenSuccessfully);
	

	eReturn = ESTATUS_SUCCESS;
	*ptAtom = tAtom;

lblCleanup:
	return eReturn;

}
开发者ID:topotam,项目名称:Injectors,代码行数:55,代码来源:main.cpp


示例20: BaseBar_UnregisterControl

BOOL BaseBar_UnregisterControl(HINSTANCE hInstance)
{
    WNDCLASSEX wcex;

    if (GetClassInfoEx(hInstance, WC_BASEBAR, &wcex) == 0)
        return (FALSE);

    UnregisterClass(WC_BASEBAR, hInstance);
    GlobalDeleteAtom(s_hBaseBarAtom);

    return (TRUE);
}
开发者ID:now,项目名称:slackedit,代码行数:12,代码来源:pcp_basebar.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GlobalFreePtr函数代码示例发布时间:2022-05-30
下一篇:
C++ GlobalAllocPtr函数代码示例发布时间: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