Jump to content

Windows Message Codes: WinXP && Vista


phew
 Share

Recommended Posts

hey!

some long time ago i wrote following code (on XP), where it ran properly:

#include <GUIConstantsEx.au3>
#include <GUIConstants.au3>
#include <GUIListView.au3>
#include <GUIMenu.au3>

$main = GUICreate('GlobalVoices Poster', 690, 450)
GUICtrlCreateTab(1, 1, 690, 449)

;threads tab
GUICtrlCreateTabItem('Global-Voices')
$listview = _GUICtrlListView_Create($main, 'Threads|Status/Result', 20, 40, 650, 231, -1, $WS_EX_CLIENTEDGE)
_GUICtrlListView_SetExtendedListViewStyle($listview, $LVS_EX_GRIDLINES)
_GUICtrlListView_SetColumnWidth($listview, 0, 323)
_GUICtrlListView_SetColumnWidth($listview, 1, 323)
GUICtrlCreateGroup('[Log]', 20, 280, 323, 155)
GUICtrlCreateEdit('', 25, 300, 313, 129)
GUICtrlCreateGroup('[Control]', 348, 280, 322, 155)
GUICtrlCreateButton('start', 355, 300, 65, 20)

$menu = _GUICtrlMenu_CreatePopup()
_GUICtrlMenu_InsertMenuItem($menu, 0, 'Add Thread', 1000)

;options tab
GUICtrlCreateTabItem('Options')
GUICtrlCreateGroup("[Window]", 10, 34, 332, 250)
$chbx_ontop = GUICtrlCreateCheckbox("Always On Top", 25, 55, 90, 20)
GUICtrlSetState($chbx_ontop, $GUI_CHECKED)
GUICtrlCreateGroup("[Logging]", 348, 34, 332, 250)
GUICtrlCreateCheckbox("Enable Logging", 365, 55, 90, 20)
GUICtrlCreateInput(@ScriptDir & "\log\", 465, 55, 200, 20)
GUISetState(@SW_SHOW)

Func _Timestamp()
    $timestamp = '('&@HOUR&':'&@MIN&':'&@SEC&'): '
    Return $timestamp
EndFunc

GUIRegisterMsg($WM_NOTIFY, "RMMENU")

Func RMMENU()
    Switch GUIGetMsg()
    Case $NM_RCLICK
        _GUICtrlMenu_TrackPopupMenu($menu, $listview, -1, -1, -1, 1)
    EndSwitch
EndFunc

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $NM_RCLICK
        MsgBox(0, "", "")
    EndSelect
WEnd

now i'm trying to start it on my new pooter on which vista is installed.

result:

$listview = _GUICtrlListView_Create($main, 'Threads|Status/Result', 20, 40, 650, 231, -1, $WS_EX_CLIENTEDGE)
$listview = _GUICtrlListView_Create($main, 'Threads|Status/Result', 20, 40, 650, 231, -1, ^ ERROR

and furthermore:

C:\Users\phew\Desktop\rg.au3 (38) : ==> Variable used without being declared.:
GUIRegisterMsg($WM_NOTIFY, "RMMENU")
GUIRegisterMsg(^ ERROR

so i tried WM_MOUSEHOVER:
C:\Users\phew\Desktop\rg.au3 (38) : ==> Variable used without being declared.:
GUIRegisterMsg($WM_MOUSEHOVER, "RMMENU")
GUIRegisterMsg(^ ERROR

another error:
$NM_RCLICK is not declared as well.

so i had a look on GUIRegisterMsg();

$WM_NOTIFY doesn't seem to be different on XP/Vista

what's wrong with my code? i'm pretty sure it ran properly on XP..

Edited by phew
Link to comment
Share on other sites

In AU v3.2.12.0 (?) some includes were changed.

You need at least

#include <WindowsConstants.au3>

additionally. If you miss other const, just search the includes folder for .au3 containing the const.

Best Regards

Link to comment
Share on other sites

In AU v3.2.12.0 (?) some includes were changed.

You need at least

#include <WindowsConstants.au3>

additionally. If you miss other const, just search the includes folder for .au3 containing the const.

Best Regards

awww! thank you very much, wouldn't have thought of changed libs!

now its running again :)

greetings

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...