mikehunt114 Posted July 20, 2007 Share Posted July 20, 2007 (edited) I'm trying to invoke the BM_GETIMAGE message for a button control. I want to verify the handle to/and or the type of image associated with my button. I'm using the following code:#include <GUIConstants.au3> #include <Array.au3> Opt("GUIOnEventMode", 1) $myGUI = GUICreate("TEST") GUISetOnEvent($GUI_EVENT_CLOSE, "Quit") $button = GUICtrlCreateButton ("my picture button", 10, 10,40,40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 22) GUISetState() Sleep(1000) $val = GUICtrlSendMsg($button, 0x00F6, $BS_ICON, 0) MsgBox(0, "", $val) _ArrayDisplay($val) While 1 Sleep(10) WEnd Func Quit() Exit 0 EndFuncI've never used "custom" message events before, so I must be doing something wrong. Advice?Thanks.Edit: I've tried using both $BS_ICON and $BS_BITMAP as the wParam. Edited July 20, 2007 by mikehunt114 IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
Holger Posted July 21, 2007 Share Posted July 21, 2007 (edited) Maybe you should read the command again Little help: Global Const $IMAGE_BITMAP = 0 Global Const $IMAGE_ICON = 1 Global Const $BM_GETIMAGE = 0x00F6 ... $val = GUICtrlSendMsg($button, $BM_GETIMAGE, $IMAGE_ICON, 0) ... Greets Holger Edited July 21, 2007 by Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
mikehunt114 Posted July 23, 2007 Author Share Posted July 23, 2007 Thanks, where did you find the values of IMAGE_ICON/IMAGE_BITMAP? IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
Holger Posted July 23, 2007 Share Posted July 23, 2007 (edited) Local MSDN You can also use the MSDN library online: http://msdn2.microsoft.com/en-us/library/default.aspxThen type "BM_GETIMAGE" in the field at left top and enter...GreetsHolger Edited July 23, 2007 by Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
mikehunt114 Posted July 23, 2007 Author Share Posted July 23, 2007 Yes, I browsed MSDN extensively before posting here. Notice my link to the MSDN doc in my first post? I couldn't find values for those parameters, I ended up using Google to find the value for the BM_GETIMAGE message. Where exactly did you find the values? I want to be able to find things like this for myself.Thanks! IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
Holger Posted July 23, 2007 Share Posted July 23, 2007 Just do a Google-search http://www.google.com/search?hl=en&q=c...G=Google+Search Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
mikehunt114 Posted July 23, 2007 Author Share Posted July 23, 2007 Ah, ok. That's what I had to do for the message code. Thanks. IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now