static
VOID
btnSkypePresenceOffline_Visible(
RibbonElement *Element,
IDispatch *Control,
BOOL *Value
) {
XAddin* pAddin = (XAddin *)Element->Context;
*Value = pAddin->SkypeInfo.ApiStatus == SKYPECONTROLAPI_ATTACH_SUCCESS;
return;
UNREFERENCED_PARAMETER(Control);
UNREFERENCED_PARAMETER(Element);
}
static
VOID
btnSkypePresenceOffline_Label(
RibbonElement *Element,
IDispatch *Control,
LPWSTR Value,
int cch
) {
PszStringCopy(Value, cch, L"Offline");
return;
UNREFERENCED_PARAMETER(Control);
UNREFERENCED_PARAMETER(Element);
}
static
VOID
btnSkypePresenceOffline_Size(
RibbonElement *Element,
IDispatch *Control,
RibbonControlSize *Value
) {
*Value = RibbonControlSize_Large;
return;
UNREFERENCED_PARAMETER(Control);
UNREFERENCED_PARAMETER(Element);
}
static
VOID
btnSkypePresenceOffline_Screentip(
RibbonElement *Element,
IDispatch *Control,
LPWSTR Value,
int cch
) {
PszStringCopy(Value, cch, L"Offline");
return;
UNREFERENCED_PARAMETER(Control);
UNREFERENCED_PARAMETER(Element);
}
static
VOID
btnSkypePresenceOffline_Supertip(
RibbonElement *Element,
IDispatch *Control,
LPWSTR Value,
int cch
) {
PszStringCopy(Value, cch, L"Set presence to Offline");
return;
UNREFERENCED_PARAMETER(Control);
UNREFERENCED_PARAMETER(Element);
}
static
VOID
btnSkypePresenceOffline_ImageMso(
RibbonElement *Element,
IDispatch *Control,
LPWSTR Value,
int cch
) {
*Value = L'\0';
return;
UNREFERENCED_PARAMETER(cch);
UNREFERENCED_PARAMETER(Control);
UNREFERENCED_PARAMETER(Element);
}
static
VOID
btnSkypePresenceOffline_Image(
RibbonElement *Element,
IDispatch *Control,
IDispatch **Value
) {
XAddin* pAddin = (XAddin *)Element->Context;
*Value = NULL;
if(pAddin->SkypeInfo.BmpPresenceOffline != NULL) {
IPictureDisp* pPictureDisp = NULL;
PICTDESC PictureDesc = {0};
HRESULT hrRes;
PictureDesc.cbSizeofstruct = sizeof(PictureDesc);
PictureDesc.picType = PICTYPE_BITMAP;
PictureDesc.bmp.hbitmap = pAddin->SkypeInfo.BmpPresenceOffline;
hrRes = OleCreatePictureIndirect(&PictureDesc,
&IID_IPictureDisp,
FALSE,
(void **)&pPictureDisp
);
if(pPictureDisp != NULL) {
IPictureDisp_QueryInterface(pPictureDisp,
&IID_IDispatch,
(void **)Value
);
IPictureDisp_Release(pPictureDisp);
}
}
return;
UNREFERENCED_PARAMETER(Control);
}
static
VOID
btnSkypePresenceOffline_Enabled(
RibbonElement *Element,
IDispatch *Control,
BOOL *Value
) {
*Value = TRUE;
return;
UNREFERENCED_PARAMETER(Control);
UNREFERENCED_PARAMETER(Element);
}
static
VOID
btnSkypePresenceOffline_Pressed(
RibbonElement *Element,
IDispatch *Control,
BOOL *Value
) {
XAddin* pAddin = (XAddin *)Element->Context;
*Value = pAddin->SkypeInfo.Presence == SKYPEPRESENCE_OFFLINE;
return;
UNREFERENCED_PARAMETER(Control);
}
static
VOID
btnSkypePresenceOffline_Action2(
RibbonElement *Element,
IDispatch *Control,
BOOL Pressed
) {
XAddin* pAddin = (XAddin *)Element->Context;
//if(pAddin->SkypeInfo.Presence == SKYPEPRESENCE_OFFLINE) {
// return;
//}
pAddin->SetSkypePresenceStatus(pAddin, SKYPEPRESENCE_OFFLINE);
return;
UNREFERENCED_PARAMETER(Control);
UNREFERENCED_PARAMETER(Pressed);
}