/** Scans the \c CHANGES and call the appropriate function for each change. * * @param chg : Structure holding all the change info (See CHANGES). */ void ApplyChanges(CHANGES *chg) { HANDLE most_online; int i; // remove removed contacts for(i = 0; i < chg->num_deleted; i++) { Meta_Delete((WPARAM)chg->hDeletedContacts[i], 0); if(chg->hDeletedContacts[i] == chg->hDefaultContact) chg->hDefaultContact = 0; if(chg->hDeletedContacts[i] == chg->hOfflineContact) chg->hOfflineContact = 0; } // set contact positions for(i = 0; i < chg->num_contacts; i++) { if(Meta_GetContactNumber(chg->hContact[i]) != i) Meta_SwapContacts(chg->hMeta, Meta_GetContactNumber(chg->hContact[i]), i); } NotifyEventHooks(hSubcontactsChanged, (WPARAM)chg->hMeta, (LPARAM)chg->hDefaultContact); // set default if(chg->hDefaultContact) DBWriteContactSettingDword(chg->hMeta, META_PROTO, "Default", Meta_GetContactNumber(chg->hDefaultContact)); else DBWriteContactSettingDword(chg->hMeta, META_PROTO, "Default", 0); NotifyEventHooks(hEventDefaultChanged, (WPARAM)chg->hMeta, (LPARAM)chg->hDefaultContact); // set offline if(chg->hOfflineContact) DBWriteContactSettingDword(chg->hMeta, META_PROTO, "OfflineSend", Meta_GetContactNumber(chg->hOfflineContact)); else DBWriteContactSettingDword(chg->hMeta, META_PROTO, "OfflineSend", (DWORD)-1); // fix nick most_online = Meta_GetMostOnline(chg->hMeta); Meta_CopyContactNick(chg->hMeta, most_online); // fix status Meta_FixStatus(chg->hMeta); // fix avatar most_online = Meta_GetMostOnlineSupporting(chg->hMeta, PFLAGNUM_4, PF4_AVATARS); if(most_online) { PROTO_AVATAR_INFORMATION AI; AI.cbSize = sizeof(AI); AI.hContact = chg->hMeta; AI.format = PA_FORMAT_UNKNOWN; strcpy(AI.filename, "X"); if((int)CallProtoService(META_PROTO, PS_GETAVATARINFO, 0, (LPARAM)&AI) == GAIR_SUCCESS) DBWriteContactSettingString(chg->hMeta, "ContactPhoto", "File",AI.filename); } if(MetaAPI_GetForceState((WPARAM)chg->hMeta, 0) != chg->force_default) MetaAPI_ForceDefault((WPARAM)chg->hMeta, 0); }
INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam) { DWORD metaID; // The wParam is a metacontact if ((metaID = db_get_dw((HANDLE)wParam, META_PROTO, META_ID, (DWORD)-1)) != (DWORD)-1) { if ( !lParam) { // check from recursion - see second half of this function if ( MessageBox((HWND)CallService(MS_CLUI_GETHWND,0,0), TranslateT("This will remove the MetaContact permanently.\n\nProceed Anyway?"), TranslateT("Are you sure?"),MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2) != IDYES) return 0; } for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { // This contact is assigned to the MetaContact that will be deleted, clear the "MetaContacts" information if ( db_get_dw(hContact, META_PROTO, META_LINK,(DWORD)-1) == metaID) { db_unset(hContact, META_PROTO, "IsSubcontact"); db_unset(hContact, META_PROTO, META_LINK); db_unset(hContact, META_PROTO, "Handle"); db_unset(hContact, META_PROTO, "ContactNumber"); // unhide - must be done after removing link (see meta_services.c:Meta_ChangeStatus) Meta_RestoreGroup(hContact); db_unset(hContact, META_PROTO, "OldCListGroup"); // stop ignoring, if we were if (options.suppress_status) CallService(MS_IGNORE_UNIGNORE, (WPARAM)hContact, (WPARAM)IGNOREEVENT_USERONLINE); } } NotifyEventHooks(hSubcontactsChanged, (WPARAM)wParam, 0); CallService(MS_DB_CONTACT_DELETE,wParam,0); } else { HANDLE hMeta = (HANDLE)db_get_dw((HANDLE)wParam, META_PROTO, "Handle", 0); DWORD num_contacts = db_get_dw(hMeta, META_PROTO, "NumContacts", -1); if (num_contacts == 1) { if (IDYES == MessageBox(0, TranslateT(szDelMsg), TranslateT("Delete MetaContact?"), MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON1)) Meta_Delete((WPARAM)hMeta,(LPARAM)1); return 0; } Meta_RemoveContactNumber(hMeta, db_get_dw((HANDLE)wParam, META_PROTO, "ContactNumber", -1)); } return 0; }
INT_PTR Meta_Delete(WPARAM hContact, LPARAM bSkipQuestion) { DBCachedContact *cc = currDb->m_cache->GetCachedContact(hContact); if (cc == NULL) return 1; // The wParam is a metacontact if (cc->IsMeta()) { // check from recursion - see second half of this function if (!bSkipQuestion && IDYES != MessageBox(cli.hwndContactList, TranslateT("This will remove the metacontact permanently.\n\nProceed anyway?"), TranslateT("Are you sure?"), MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2)) return 0; for (int i = cc->nSubs-1; i >= 0; i--) Meta_RemoveContactNumber(cc, i, false); NotifyEventHooks(hSubcontactsChanged, hContact, 0); CallService(MS_DB_CONTACT_DELETE, hContact, 0); } else if (cc->IsSub()) { if ((cc = currDb->m_cache->GetCachedContact(cc->parentID)) == NULL) return 2; if (cc->nSubs == 1) { if (IDYES == MessageBox(0, TranslateT(szDelMsg), TranslateT("Delete metacontact?"), MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON1)) Meta_Delete(cc->contactID, 1); return 0; } Meta_RemoveContactNumber(cc, Meta_GetContactNumber(cc, hContact), true); } return 0; }
INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { HWND hwnd; char *str; int sel, i; switch(msg) { case WM_INITDIALOG: { // Font necessary for all controls created with CreateWindowsEx //HFONT hfDefault = GetStockObject(DEFAULT_GUI_FONT); //HWND combo = GetDlgItem(hwndDlg,IDC_DEFAULT); int nb_contacts, default_contact_number, offline_contact_number; LVCOLUMN LvCol; TranslateDialogDefault( hwndDlg ); SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadIconEx(I_EDIT)); // Disable the 'Apply' button. EnableWindow(GetDlgItem(hwndDlg,IDC_VALIDATE),FALSE); // (from http://www.codeproject.com/listctrl/listview.asp) // initialize list hwnd = GetDlgItem(hwndDlg, IDC_LST_CONTACTS); SendMessage(hwnd,LVM_SETEXTENDEDLISTVIEWSTYLE, 0,LVS_EX_FULLROWSELECT); // Set style // Create list columns ZeroMemory(&LvCol, sizeof(LvCol)); LvCol.mask=LVCF_TEXT|LVCF_WIDTH|LVCF_SUBITEM; // Type of mask // Inserting Couloms as much as we want LvCol.pszText=Translate("Contact"); // First Header Text LvCol.cx=100; // width of column SendMessage(hwnd,LVM_INSERTCOLUMN,0,(LPARAM)&LvCol); // Insert/Show the coloum LvCol.pszText=Translate("Id"); // Next coloum LvCol.cx=130; // width of column SendMessage(hwnd,LVM_INSERTCOLUMN,1,(LPARAM)&LvCol); // ... LvCol.pszText=Translate("Protocol"); // LvCol.cx=100; // width of column SendMessage(hwnd,LVM_INSERTCOLUMN,2,(LPARAM)&LvCol); // LvCol.pszText=Translate("Default"); // LvCol.cx=60; // width of column SendMessage(hwnd,LVM_INSERTCOLUMN,3,(LPARAM)&LvCol); // LvCol.pszText=Translate("Send Offline"); // LvCol.cx=85; // width of column SendMessage(hwnd,LVM_INSERTCOLUMN,4,(LPARAM)&LvCol); // // disable buttons until a selection is made in the list hwnd = GetDlgItem(hwndDlg, IDC_BTN_REM); EnableWindow(hwnd, FALSE); hwnd = GetDlgItem(hwndDlg, IDC_BTN_SETDEFAULT); EnableWindow(hwnd, FALSE); hwnd = GetDlgItem(hwndDlg, IDC_BTN_SETOFFLINE); EnableWindow(hwnd, FALSE); hwnd = GetDlgItem(hwndDlg, IDC_BTN_UP); EnableWindow(hwnd, FALSE); hwnd = GetDlgItem(hwndDlg, IDC_BTN_DOWN); EnableWindow(hwnd, FALSE); nb_contacts = DBGetContactSettingDword((HANDLE)lParam, META_PROTO, "NumContacts", 0); default_contact_number = DBGetContactSettingDword((HANDLE)lParam, META_PROTO, "Default", (DWORD)-1); offline_contact_number = DBGetContactSettingDword((HANDLE)lParam, META_PROTO, "OfflineSend", (DWORD)-1); changes.hMeta = (HANDLE)lParam; changes.num_contacts = nb_contacts; changes.num_deleted = 0; changes.hDefaultContact = Meta_GetContactHandle((HANDLE)lParam, default_contact_number); changes.hOfflineContact = Meta_GetContactHandle((HANDLE)lParam, offline_contact_number); for(i = 0; i < nb_contacts; i++) changes.hContact[i] = Meta_GetContactHandle((HANDLE)lParam, i); changes.force_default = MetaAPI_GetForceState((WPARAM)lParam, 0); SendMessage(hwndDlg, WMU_SETTITLE, 0, lParam); CheckDlgButton(hwndDlg, IDC_CHK_FORCEDEFAULT, changes.force_default); FillContactList(hwndDlg, &changes); return TRUE; } case WMU_SETTITLE: { char *szCDN = (char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)lParam, 0); if(os_unicode_enabled) { wchar_t *swzCDN = (wchar_t *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)lParam, GCDNF_UNICODE), *swzContactDisplayName; // detect if the clist provided unicode display name by comparing with non-unicode if(szCDN && swzCDN && strncmp(szCDN, (char *)swzCDN, strlen(szCDN)) != 0 && wcslen(swzCDN) >= strlen(szCDN)) { swzContactDisplayName = swzCDN; } else { // no? convert to unicode if(szCDN) { swzContactDisplayName = (wchar_t *) _malloca(sizeof(wchar_t) * (strlen(szCDN) + 1)); MultiByteToWideChar(CP_ACP, 0, (char *) szCDN, -1, swzContactDisplayName, (int)strlen((char *)szCDN) + 1); } else { swzContactDisplayName = TranslateW(L"(Unknown Contact)"); } } SetWindowTextW(GetDlgItem(hwndDlg,IDC_ED_NAME), swzContactDisplayName); } else { SetWindowText(GetDlgItem(hwndDlg,IDC_ED_NAME), szCDN); } } return TRUE; case WM_NOTIFY: // the message that is being sent always switch(LOWORD(wParam)) // hit control { case IDC_LST_CONTACTS: // did we hit our ListView contorl? if(((LPNMHDR)lParam)->code == NM_CLICK) { hwnd = GetDlgItem(hwndDlg, IDC_LST_CONTACTS); sel=SendMessage(hwnd,LVM_GETNEXTITEM,-1,LVNI_FOCUSED|LVNI_SELECTED); // return item selected // enable buttons hwnd = GetDlgItem(hwndDlg, IDC_BTN_REM); EnableWindow(hwnd, sel!=-1); hwnd = GetDlgItem(hwndDlg, IDC_BTN_SETDEFAULT); EnableWindow(hwnd, sel!=-1 && changes.hContact[sel] != changes.hDefaultContact); hwnd = GetDlgItem(hwndDlg, IDC_BTN_SETOFFLINE); EnableWindow(hwnd, sel!=-1 && changes.hContact[sel] != changes.hOfflineContact); hwnd = GetDlgItem(hwndDlg, IDC_BTN_UP); EnableWindow(hwnd, (sel > 0)); hwnd = GetDlgItem(hwndDlg, IDC_BTN_DOWN); EnableWindow(hwnd, (sel != -1) && (sel < changes.num_contacts - 1)); /* // custom draw stuff - change colour of listview things - doesn't affect selection :( } else if(((LPNMHDR)lParam)->code == NM_CUSTOMDRAW) { SetWindowLong(hwndDlg, DWL_MSGRESULT, (LONG)ProcessCustomDraw(lParam)); return TRUE; */ } break; } break; case WM_COMMAND: switch(HIWORD(wParam)) { case BN_CLICKED: // A button ('Remove', 'Ok', 'Cancel' or 'Apply', normally) has been clicked switch(LOWORD(wParam)) { case IDC_VALIDATE: // Apply changes, if there is still one contact attached to the metacontact. if(changes.num_contacts == 0) // Otherwise, delete the metacontact. { if(MessageBox(hwndDlg,Translate("You are going to remove all the contacts associated with this MetaContact.\nThis will delete the MetaContact.\n\nProceed Anyway?"), Translate("Delete MetaContact?"),MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON1)!=IDYES) return TRUE; else { Meta_Delete((WPARAM)changes.hMeta,(LPARAM)NULL); DestroyWindow(hwndDlg); return TRUE; } } ApplyChanges(&changes); // Disable the 'Apply' button. EnableWindow(GetDlgItem(hwndDlg,IDC_VALIDATE),FALSE); break; case IDOK: if(IsWindowEnabled(GetDlgItem(hwndDlg,IDC_VALIDATE))) { // If there are changes that could be made, if(changes.num_contacts == 0) // do the work that would have be done if { // the button 'Apply' has been clicked. if(MessageBox(hwndDlg,Translate("You are going to remove all the contacts associated with this MetaContact.\nThis will delete the MetaContact.\n\nProceed Anyway?"), Translate("Delete MetaContact?"),MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON1)!=IDYES) { return TRUE; } else { Meta_Delete((WPARAM)changes.hMeta,(LPARAM)NULL); DestroyWindow(hwndDlg); return TRUE; } } ApplyChanges(&changes); } EndDialog(hwndDlg, IDOK); return TRUE; case IDCANCEL: // Simply close the dialog EndDialog(hwndDlg, IDCANCEL); return TRUE; case IDC_BTN_SETDEFAULT: hwnd = GetDlgItem(hwndDlg, IDC_LST_CONTACTS); sel=SendMessage(hwnd,LVM_GETNEXTITEM,-1,LVNI_FOCUSED|LVNI_SELECTED); // return item selected InvalidateRect(hwnd, 0, TRUE); changes.hDefaultContact = changes.hContact[sel]; SendMessage(hwndDlg, WMU_SETTITLE, 0, (LPARAM)changes.hContact[sel]); FillContactList(hwndDlg, &changes); SetListSelection(hwnd, sel); // Disable set default button EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_SETDEFAULT),FALSE); // Enable the 'Apply' button. EnableWindow(GetDlgItem(hwndDlg,IDC_VALIDATE),TRUE); // repaint list return TRUE; case IDC_BTN_SETOFFLINE: hwnd = GetDlgItem(hwndDlg, IDC_LST_CONTACTS); sel=SendMessage(hwnd,LVM_GETNEXTITEM,-1,LVNI_FOCUSED|LVNI_SELECTED); // return item selected InvalidateRect(hwnd, 0, TRUE); changes.hOfflineContact = changes.hContact[sel]; FillContactList(hwndDlg, &changes); SetListSelection(hwnd, sel); // Disable set offline button EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_SETOFFLINE),FALSE); // Enable the 'Apply' button. EnableWindow(GetDlgItem(hwndDlg,IDC_VALIDATE),TRUE); // repaint list return TRUE; case IDC_BTN_REM: hwnd = GetDlgItem(hwndDlg, IDC_LST_CONTACTS); sel=SendMessage(hwnd,LVM_GETNEXTITEM,-1,LVNI_FOCUSED|LVNI_SELECTED); // return item selected changes.num_contacts--; changes.hDeletedContacts[changes.num_deleted++] = changes.hContact[sel]; if(changes.hDefaultContact == changes.hContact[sel]) { if(changes.num_contacts > 0) { changes.hDefaultContact = changes.hContact[0]; str = (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)changes.hDefaultContact, 0); SetWindowText(GetDlgItem(hwndDlg,IDC_ED_DEFAULT),str); } else { changes.hDefaultContact = 0; SetWindowText(GetDlgItem(hwndDlg,IDC_ED_DEFAULT),"None"); } } for(i = sel; i < changes.num_contacts; i++) changes.hContact[i] = changes.hContact[i + 1]; FillContactList(hwndDlg, &changes); // disable buttons hwnd = GetDlgItem(hwndDlg, IDC_BTN_REM); EnableWindow(hwnd, FALSE); hwnd = GetDlgItem(hwndDlg, IDC_BTN_SETDEFAULT); EnableWindow(hwnd, FALSE); hwnd = GetDlgItem(hwndDlg, IDC_BTN_SETOFFLINE); EnableWindow(hwnd, FALSE); hwnd = GetDlgItem(hwndDlg, IDC_BTN_UP); EnableWindow(hwnd, FALSE); hwnd = GetDlgItem(hwndDlg, IDC_BTN_DOWN); EnableWindow(hwnd, FALSE); // Enable the 'Apply' button. EnableWindow(GetDlgItem(hwndDlg,IDC_VALIDATE),TRUE); return TRUE; case IDC_BTN_UP: hwnd = GetDlgItem(hwndDlg, IDC_LST_CONTACTS); sel=SendMessage(hwnd,LVM_GETNEXTITEM,-1,LVNI_FOCUSED|LVNI_SELECTED); // return item selected { HANDLE temp = changes.hContact[sel]; changes.hContact[sel] = changes.hContact[sel - 1]; changes.hContact[sel - 1] = temp; } FillContactList(hwndDlg, &changes); sel--; SetListSelection(hwnd, sel); hwnd = GetDlgItem(hwndDlg, IDC_BTN_UP); EnableWindow(hwnd, (sel > 0)); hwnd = GetDlgItem(hwndDlg, IDC_BTN_DOWN); EnableWindow(hwnd, (sel < changes.num_contacts - 1)); // Enable the 'Apply' button. EnableWindow(GetDlgItem(hwndDlg,IDC_VALIDATE),TRUE); return TRUE; case IDC_BTN_DOWN: hwnd = GetDlgItem(hwndDlg, IDC_LST_CONTACTS); sel=SendMessage(hwnd,LVM_GETNEXTITEM,-1,LVNI_FOCUSED|LVNI_SELECTED); // return item selected { HANDLE temp = changes.hContact[sel]; changes.hContact[sel] = changes.hContact[sel + 1]; changes.hContact[sel + 1] = temp; } FillContactList(hwndDlg, &changes); sel++; SetListSelection(hwnd, sel); hwnd = GetDlgItem(hwndDlg, IDC_BTN_UP); EnableWindow(hwnd, (sel > 0)); hwnd = GetDlgItem(hwndDlg, IDC_BTN_DOWN); EnableWindow(hwnd, (sel < changes.num_contacts - 1)); // Enable the 'Apply' button. EnableWindow(GetDlgItem(hwndDlg,IDC_VALIDATE),TRUE); return TRUE; case IDC_CHK_FORCEDEFAULT: changes.force_default = IsDlgButtonChecked(hwndDlg, IDC_CHK_FORCEDEFAULT); // Enable the 'Apply' button. EnableWindow(GetDlgItem(hwndDlg,IDC_VALIDATE),TRUE); return TRUE; } } break; case WM_CLOSE: DestroyWindow(hwndDlg); return TRUE; case WM_DESTROY: ReleaseIconEx((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, 0)); EndDialog(hwndDlg, IDCANCEL); break; } return FALSE; }
/** Delete a MetaContact from the database * * Delete a MetaContact and remove all the information * concerning this MetaContact in the contact linked to it. * * @param wParam : \c HANDLE to the MetaContact to be deleted, or to the subcontact to be removed from the MetaContact * @param lParam : \c BOOL flag indicating whether to ask 'are you sure' when deleting a MetaContact */ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam) { DWORD metaID; HANDLE hContact; if((metaID=DBGetContactSettingDword((HANDLE)wParam,META_PROTO,META_ID,(DWORD)-1))!=(DWORD)-1) {// The wParam is a metacontact if(!lParam) { // check from recursion - see second half of this function if(MessageBox((HWND)CallService(MS_CLUI_GETHWND,0,0),Translate("This will remove the MetaContact permanently.\n\nProceed Anyway?"), Translate("Are you sure?"),MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2)!=IDYES) { return 0; } } hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0); while(hContact) { // Scans the database to get all the contacts that have been previously linked to this MetaContact if(DBGetContactSettingDword(hContact,META_PROTO,META_LINK,(DWORD)-1)==metaID) { // This contact is assigned to the MetaContact that will be deleted, clear the "MetaContacts" information DBDeleteContactSetting(hContact,META_PROTO,"IsSubcontact"); DBDeleteContactSetting(hContact,META_PROTO,META_LINK); DBDeleteContactSetting(hContact,META_PROTO,"Handle"); DBDeleteContactSetting(hContact,META_PROTO,"ContactNumber"); // unhide - must be done after removing link (see meta_services.c:Meta_ChangeStatus) Meta_RestoreGroup(hContact); DBDeleteContactSetting(hContact,META_PROTO,"OldCListGroup"); CallService(MS_PROTO_REMOVEFROMCONTACT,(WPARAM)hContact,(LPARAM)META_FILTER); // stop ignoring, if we were if(options.suppress_status) CallService(MS_IGNORE_UNIGNORE, (WPARAM)hContact, (WPARAM)IGNOREEVENT_USERONLINE); } hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0); } //DBDeleteContactSetting((HANDLE)wParam, META_PROTO, META_ID); //DBDeleteContactSetting((HANDLE)wParam, META_PROTO, "NumContacts"); //CallService(MS_PROTO_REMOVEFROMCONTACT,wParam,(LPARAM)META_PROTO); NotifyEventHooks(hSubcontactsChanged, (WPARAM)wParam, 0); CallService(MS_DB_CONTACT_DELETE,wParam,0); } else {// The wParam is a simple contact //if(lParam == 0) // return 1; // The function has been called by the menu of a simple contact. Should not happen. //else {// The function has been called by the edit dialog HANDLE hMeta = (HANDLE)DBGetContactSettingDword((HANDLE)wParam, META_PROTO, "Handle", 0); DWORD num_contacts = DBGetContactSettingDword(hMeta, META_PROTO, "NumContacts", -1); if(num_contacts == 1) { if(MessageBox(0,Translate("You are going to remove all the contacts associated with this MetaContact.\nThis will delete the MetaContact.\n\nProceed Anyway?"), Translate("Delete MetaContact?"),MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON1)==IDYES) { // recurse - once Meta_Delete((WPARAM)hMeta,(LPARAM)1); } return 0; } Meta_RemoveContactNumber(hMeta, DBGetContactSettingDword((HANDLE)wParam,META_PROTO,"ContactNumber", -1)); CallService(MS_PROTO_REMOVEFROMCONTACT,(WPARAM)wParam,(LPARAM)META_FILTER); } } return 0; }
// added 0.9.5.0 (22/3/05) // wParam=0 // lParam=(HANDLE)hContact // remove a contact from a metacontact INT_PTR MetaAPI_RemoveFromMeta(WPARAM wParam, LPARAM lParam) { // notice we switch args - to keep the API function consistent with the others return Meta_Delete((WPARAM)lParam, (LPARAM)wParam); }