本文整理汇总了C++中GlobalDeleteAtom函数的典型用法代码示例。如果您正苦于以下问题:C++ GlobalDeleteAtom函数的具体用法?C++ GlobalDeleteAtom怎么用?C++ GlobalDeleteAtom使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GlobalDeleteAtom函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
}
}
示例2: stop_scan
void Hotkey::End()
{
stop_scan();
GlobalDeleteAtom(ScanHotKeyId);
stop_mainwindow();
GlobalDeleteAtom(MainWindowHotKeyId);
DestroyWindow(ServerWND);
}
示例3: bm_Cleanup
void bm_Cleanup(HINSTANCE hInstance)
{
GlobalDeleteAtom(atomAlignStyle);
GlobalDeleteAtom(atomTailSize);
GlobalDeleteAtom(atomTimeout);
GlobalDeleteAtom(atomFont);
UnregisterClass(CLASSNAME_TOOLTIP,hInstance);
}
示例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;
}
示例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;
}
示例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 );
}
示例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;
}
示例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;
}
示例9: GlobalDeleteAtom
HotkeyCombo::~HotkeyCombo()
{
if (ID)
{
GlobalDeleteAtom(ID);
}
}
示例10: Menu_Uninstall
void Menu_Uninstall(void)
{
ImageList_Destroy(hImageListCold);
ImageList_Destroy(hImageListHot);
UnhookWindowsHookEx(g_hMenuHook);
GlobalDeleteAtom(g_hMenuAtom);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}