Jump to content

Problem with GUICtrlCreatePic


Recommended Posts

Hello all,

I am trying to create a GUI window with a picture background and some buttons on it. Although I can do this, the mouse seems not to correspond when trying to click the buttons; however I can press the buttons using the keyboard. Here is my sample code:

#include <GUIConstants.au3>
$menu = GUICreate("my menu", 600, 200)
GUICtrlCreatePic("image.jpg", 0, 0, 600, 200)

$button1 = GUICtrlCreateButton ("1st option", 491, 30, 100)
$button2 = GUICtrlCreateButton ("2nd option", 491, 60, 100)
$button3 = GUICtrlCreateButton ("3rd option", 491, 90, 100)
$exit = GUICtrlCreateButton ("Exit", 491, 165, 100)

GUISetState(@SW_SHOW, $menu)

While 1
    $msg = GUIGetMsg()
    Case $msg = $exit Or $msg = $GUI_EVENT_CLOSE
    Case $msg = $button1
    Case $msg = $button2
    Case $msg = $button3


What am I doing wrong? Any ideas?

Thank you all in advance.

Edited by erebus
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

  • Recently Browsing   0 members

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