Jump to content

GUICtrlCreatePic as a button ?


Recommended Posts

Is it possible to use GUICtrlCreatePic and then use the pic as a clickable button ?

I was just thinking that you could make some sweet custom looking buttons if this was possible.

Kinda like the ones in the new Nero 6 smartstart

If not then maybe the devs can pop it in the next version :(

Link to comment
Share on other sites

Is it possible to use GUICtrlCreatePic and then use the pic as a clickable button ?

I was just thinking that you could make some sweet custom looking buttons if this was possible.

Kinda like the ones in the new Nero 6 smartstart

If not then maybe the devs can pop it in the next version :(

<{POST_SNAPBACK}>

A pic control send message by default when click so just handle them in you message loop or the onEvent function :(
Link to comment
Share on other sites

[quote=megahyperion,Apr 30 2005, 11:27 AM]
Ok absolutely no offense but can someone translate a little?

Im sorry I just dont get what your saying, but I do apreciate the response :)
[right][snapback]76666[/snapback][/right]
[/quote]
#include <GUIConstants.au3>
GUICreate("My GUI picture",350,300,-1,-1,$WS_SIZEBOX+$WS_SYSMENU) ; will create a dialog box that when displayed is centered

GUISetBkColor (0xE0FFFF)
$picID=GUICtrlCreatePic(@Systemdir & "\oobe\images\mslogo.jpg",50,50, 200,50)

GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
if $msg=$picID then msgbox(0,'DEBUG', 'you click on the picture')
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

try to click on the picture and see what happens.

I was thinking you know how to use GUI Functions.

THe best to learn is to use the doc example and to play with them

Good learning

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...