desktopdock.dll v 1.0


Hello whats up



+ commands

<id> number from 0 to 9 for identification
<pos> 1 = top; 2 = left
<hwnd> hwnd of a window, for example $dialog(blub).hwnd
<width> the width of the bar (if pos is left) or the height (if pos is top)

gEtWoRkArEa
get workarea size (the size of a maximized window)

rEsIzE <id> <pos> <width>
resize a bar or change position (top/left), always needed after signal 1 msg

rEmOvEaPpBaR <id>
remove a appbar, you can also just close mirc or the window

rEgIsTeRaPpBaR <id> <hwnd> <pos> <width>
dock a window to the desktop

gEtReSoLuTiOn
get screen resoultion

info
info about the dll





+ signals
on *:signal:DeSkToPdOcK: <id> <msg> <data>

<msg>:
1 = appbar resized a reason can be that the user moved the taskbar, you should send rEsIzE to the dll, just with the same coordinates as you registered it, look at the code demo below

2 = sends the fullscreen status if <data> is 1 a fullscreen app is launched this can for example be the internet explorer fullscreen mode or a media player (you dont need this)

3 = "Notifies an appbar that the user has selected the Cascade, Tile Horizontally, or Tile Vertically command from the taskbar's shortcut menu." (you dont need this)



alias dockdemo {
  window -dBe +d @dockdemo
  tokenize 32 $dll(desktopdock.dll,rEgIsTeRaPpBaR,0 $window(@dockdemo).hwnd 1 200)
  if ($1 != oK) {
    echo @dockdemo $1-
    halt
  }
  .timer 1 0 window @dockdemo $2-
  echo @dockdemo created, position: $2-
}
on *:signal:DeSkToPdOcK:{
  if ($2 == 1) {
    var %x = $dll(desktopdock.dll,rEsIzE,$1 1 200)
    if (oK* iswm %x) {
      echo @dockdemo resize to $gettok(%x,2-,32)
      .timer 1 0 window @dockdemo $gettok(%x,2-,32)
    }
    else {
      echo @dockdemo $1-
    }
  }
}

