Jump to content



Photo

GUI_EXPAND doesn't work on XP?


  • Please log in to reply
4 replies to this topic

#1 this-is-me

this-is-me

    Pursuer of obscure functionality

  • Active Members
  • PipPipPipPipPipPip
  • 2,372 posts

Posted 12 October 2004 - 03:29 AM

I haven't tried on anything other than XP, but this is an example from holger:

Plain Text         
#include <guiconstants.au3> Opt("GuiOnEventMode", 0) GUICreate("GUI with a treeview",340,200,-1,-1,BitOr($WS_MINIMIZEBOX,$WS_MAXIMIZEBOX,$WS_GROUP,$WS_CAPTION,$WS_POPUP,$WS_SYSMENU)) $maintree = GUICtrlCreateTreeview(10,10,170,150) GUICtrlSetImage(-1,"shell32.dll",3,4); icon for default nonselected state GUICtrlSetImage(-1,"shell32.dll",4,2); icon for default selected state $aboutitem = GUICtrlCreateTreeviewitem("About",$maintree) GUICtrlSetImage($aboutitem,"shell32.dll",23) $generalitem = GUICtrlCreateTreeviewitem("General",$maintree) GUICtrlSetImage(-1,"shell32.dll",15) $toolsitem = GUICtrlCreateTreeviewitem("Tools",$maintree) GUICtrlSetImage(-1,"shell32.dll",21) $effectitem = GUICtrlCreateTreeviewitem("Effects",$generalitem) $styleitem = GUICtrlCreateTreeviewitem("Styles",$generalitem) GUICtrlSetImage(-1,"shell32.dll",24,2) GUICtrlSetImage(-1,"shell32.dll",25,4) $cmditem = GUICtrlCreateTreeviewitem("Commandline",$toolsitem) $miscitem = GUICtrlCreateTreeviewitem("Misc",$toolsitem) GUISetState(@SW_SHOW) GUICtrlSetState($generalitem,$GUI_EXPAND) While 1   $msg = GUIGetMsg()   Select      Case $msg = -3         ExitLoop      Case $msg = $miscitem         GUICtrlSetImage($maintree,"shell32.dlls",9,2)         GUICtrlSetImage($maintree,"shell32.dlls",10,4)    EndSelect WEnd GUIDelete() Exit


This should expand the general item and show the subitems, but it does not.

Edited by this-is-me, 12 October 2004 - 03:30 AM.

Who else would I be?





#2 CyberSlug

CyberSlug

    Overwhelmed with work....

  • MVPs
  • 3,587 posts

Posted 12 October 2004 - 03:51 AM

This also fails on Windows XP:
$TVM_EXPAND=0x1102 $TVE_EXPAND=0x2 $x = GUISendMsg($maintree, $TVM_EXPAND, $TVE_EXPAND, $generalitem)

I think I got the parameters right...
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

#3 this-is-me

this-is-me

    Pursuer of obscure functionality

  • Active Members
  • PipPipPipPipPipPip
  • 2,372 posts

Posted 12 October 2004 - 03:55 AM

Hmmm... Has it ever worked? I only tried recently.

EDIT: Does it work using sendmessage with dllcall?

Edited by this-is-me, 12 October 2004 - 03:56 AM.

Who else would I be?

#4 Holger

Holger

    AutoIt Spammer

  • Developers
  • 1,384 posts

Posted 12 October 2004 - 10:23 AM

Yeah, it did work...
I check out now where the problem is...

Edit: found a problem in the CtrlSetState-function.
Send the bugfixing to Jon and JP (cc).

@this-is-me / CyberSlug: Thanks for information :)

Regards Holger

Edited by Holger, 12 October 2004 - 10:38 AM.


#5 Jon

Jon

    Up all night to get lucky

  • Administrators
  • 9,529 posts

Posted 12 October 2004 - 12:16 PM

Done.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users