It looks to be doing exactly what it's supposed to do.
Code:
dialog test {
  size -1 -1 -1 -1
  button "", 1, 1 1 32 11
}

on *:DIALOG:test:sclick:1: {
  dialog -s $dname $dialog($dname).x $dialog($dname).y $dialog($dname).w $dialog($dname).h
}


Each time the button is pressed, the dialog will resize to $dialog($dname).w x $dialog($dname).h. Do remember that w & h are the width and height of the entire dialog, including borders and the titlebar, therefore the client area of the dialog will be changed to match the dialog's height and width.