diff options
author | Alexey Kulakov <panda75@bk.ru> | 2012-11-21 19:42:22 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2012-11-21 19:42:22 +0000 |
commit | fe95e19dc7743834b53c82afcf04c233e40db8db (patch) | |
tree | f571518f1c40cd4b945e64a675ee2a7a29335f16 /protocols/mRadio/i_frameapi.inc | |
parent | a8f0df159c82d4e1b7d610f302dbc2a09479c341 (diff) |
xstatus api fixes
mradio frame button fix
api updates
git-svn-id: http://svn.miranda-ng.org/main/trunk@2420 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/mRadio/i_frameapi.inc')
-rw-r--r-- | protocols/mRadio/i_frameapi.inc | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/protocols/mRadio/i_frameapi.inc b/protocols/mRadio/i_frameapi.inc index 002e2fc142..baca5d885f 100644 --- a/protocols/mRadio/i_frameapi.inc +++ b/protocols/mRadio/i_frameapi.inc @@ -8,7 +8,6 @@ var colorhook:THANDLE;
hbr:HBRUSH;
frm_bkg:TCOLORREF;
- OldBtnWndProc:pointer;
OldSliderWndProc:pointer;
function QSDlgResizer(Dialog:HWND;lParam:LPARAM;urc:PUTILRESIZECONTROL):int; cdecl;
@@ -29,20 +28,13 @@ begin result:=CallWindowProc(OldSliderWndProc, Dialog, hMessage, wParam, lParam);
end;
-function BtnWndProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
-begin
- if hMessage=WM_ERASEBKGND then
- result:=1
- else
- result:=CallWindowProc(OldBtnWndProc, Dialog, hMessage, wParam, lParam);
-end;
-
function RadioFrameProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
var
urd:TUTILRESIZEDIALOG;
rc:TRECT;
ti:TTOOLINFOW;
hwndTooltip:HWND;
+ tmp:pAnsiChar;
begin
result:=0;
case hMessage of
@@ -77,7 +69,6 @@ begin SendMessage(hVolFrmCtrl,TBM_SETPOS,1,gVolume);
OldSliderWndProc:=pointer(SetWindowLongPtrW(hVolFrmCtrl,GWL_WNDPROC,LONG_PTR(@SliderWndProc)));
- OldBtnWndProc :=pointer(SetWindowLongPtrW(hVolFrmCtrl,GWL_WNDPROC,LONG_PTR(@BtnWndProc)));
end;
WM_SIZE: begin
@@ -97,6 +88,28 @@ begin result:=1;
end;
+ WM_DRAWITEM: begin
+ if wParam=IDC_RADIO_MUTE then
+ begin
+ result:=1;
+ if gVolume<0 then
+ tmp:=IcoBtnOff
+ else
+ tmp:=IcoBtnOn;
+ DrawIconEx(PDRAWITEMSTRUCT(lParam)^.hDC,0,0,
+ CallService(MS_SKIN2_GETICON,0,TLPARAM(tmp)),
+ 16,16,0,hbr,DI_NORMAL);
+ end;
+ end;
+
+ WM_CTLCOLORBTN: begin
+ if THANDLE(lParam)=hMuteFrmCtrl then
+ begin
+ SetBkColor(wParam, frm_bkg);
+ result:=hbr;
+ end;
+ end;
+
WM_CTLCOLORSTATIC: begin
if THANDLE(lParam)=hVolFrmCtrl then
begin
@@ -179,18 +192,9 @@ begin hIcon :=0;
align :=alTop;
height :=tr.bottom-tr.top+2;
- if IsAnsi then
- begin
- Flags :=F_VISIBLE or F_NOBORDER;
- name.a :=cPluginName;
- TBName.a:=cPluginName + ' volume control';
- end
- else
- begin
- Flags :=F_VISIBLE or F_NOBORDER or F_UNICODE;
- name.w :=cPluginName;
- TBName.w:=cPluginName + ' volume control';
- end;
+ Flags :=F_VISIBLE or F_NOBORDER or F_UNICODE;
+ name.w :=cPluginName;
+ TBName.w:=cPluginName + ' volume control';
end;
FrameId:=CallService(MS_CLIST_FRAMES_ADDFRAME,wparam(@Frame),0);
|