View Single Post
Old 28th June 2008, 00:33   #1
zeeh3
Senior Member
 
Join Date: Aug 2005
Posts: 121
System Plugin and SHAppBarMessage help

I need some help with SHAppBarMessage call, the code below:

code:
!define stRECT '(i,i,i,i) i'
!define APPBARDATA '(i,i,i,i,i,i) i'

!include "WinMessages.nsh"

System::Call '*${stRECT} .r2'
System::Call '*${APPBARDATA} .r3'
System::Call 'shell32::SHAppBarMessage(i ${ABM_GETTASKBARPOS}, i r3) i.r0'
System::Call "*$3${APPBARDATA} (.R9, .R8, .R7, .R6, .r2, .R5)"
System::Call "*$2${stRECT}(.r5, .r6, .r7, .r8)" ; screen application rect
System::Free $3
System::Free $2
messagebox mb_ok "$R9, $R8, $R7, $R6, $2, $R5$\r$\nleft=$5 - top=$6 - right=$7 - bottom=$8"



$R6 contains the relative taskbar position (top, bottom, left, right), but stRECT is empty. But if I use the code below I can get the values, but not the relative position:

code:
System::Call '*${stRECT} .r2'
FindWindow $TASKBAR 'Shell_TrayWnd' '' ''
System::Call 'user32::GetWindowRect(i $TASKBAR , i r2)'
System::Call "*$2${stRECT}(.r5, .r6, .r7, .r8)"
System::Free $2
messagebox mb_ok "left=$5 - top=$6 - right=$7 - bottom=$8"



Any ideas? Thanks
zeeh3 is offline   Reply With Quote