Jump to content

Recommended Posts

Posted (edited)

  Hi all,

I know this is a crazy idea. But i think it might be a help for somebody. The name of this program is GRM Helper. i.e. GUIRegisterMsg Helper. 

This program helps you to write the guiregistermsg function code automatically. You can choose a control from the combo box. Then all events of that control will be displayed in a list view. You can click on an event for it;s details. Then you can check the events which you want to include in your code. Then type some details like; 1) Your control's handle. 2) Line number for inserting GUIRegisterMsg code. 3) Line number for inserting main function.

And press the "Isert To SciTE" button. Your code is ready in scite.

 

Here is the program.

Updated Version 1.1

GRM Helper V1.1.zip

 

 

000114.jpg

The code written by this program.

GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")

Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg
    Local $hWndFrom, $iIDFrom, $iCode, $hWndListBox
    If Not IsHWnd($Sample) Then $hWndListBox = GUICtrlGetHandle($Sample)
    $hWndFrom = $lParam
    $iIDFrom = BitAND($wParam, 0xFFFF) ; Low Word
    $iCode = BitShift($wParam, 16) ; Hi Word

    Switch $hWndFrom
        Case  $Sample, $hWndListBox
            Switch $iCode
                Case $LBN_ERRSPACE
                    ; Insert your code here
                    
                Case $LBN_SELCHANGE
                    ; Insert your code here
                    
                Case $LBN_DBLCLK
                    ; Insert your code here
                    
                Case $LBN_SELCANCEL
                    ; Insert your code here
                    
                
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_COMMAND

 

 

Edited by kcvinu
Adding Extra info
  Reveal hidden contents

 

Posted

Would you be able to provide a ZIP instead, as not everyone has WinRAR or 7-Zip. Thanks.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

@guinness Sure. :)

 

  Reveal hidden contents

 

Posted

@argumentum Thanks for the comment. It is possible but the problem is, there is no descrption for all events in contsant files. I have made an array to put events and descriptions. And i made that arry not by typing. I did that with the help of an autoit script. So if that script didn't found any description in constant file, it will add "No descriptions available." to the array. Unfortunately almost half of the events have no descriptions. And i think it should create manually.Anyway, i will look into it.

  Reveal hidden contents

 

Posted
  On 9/20/2015 at 5:01 AM, kcvinu said:

@argumentum Thanks for the comment. It is possible but the problem is, there is no descrption for all events in contsant files. I have made an array to put events and descriptions. And i made that arry not by typing. I did that with the help of an autoit script. So if that script didn't found any description in constant file, it will add "No descriptions available." to the array. Unfortunately almost half of the events have no descriptions. And i think it should create manually.Anyway, i will look into it.

...maybe the array can be loaded from an external file holding the descriptions. The descriptions can be added by collaboration of all those wising to participate. The info can be found in MSDN ( https://msdn.microsoft.com/en-us/library/windows/desktop/ff485968(v=vs.85).aspx for List Box Notifications, etc. ) and added to the structure of the descriptions file that you'd create. In my take at Script-o-matic you can see an example of how helpful can be to have the info. right there. 
It would be of great aid, to have the code generator, supply a guide for the casual coder ( like me ), that don't have a good grasp on these.
In any case thanks for sharing this tool @kcvinu .

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted

@argumentum Thanks for the link. I think i can manually type missing descriptions from the MSDN page. 

  Reveal hidden contents

 

Posted (edited)

GRM helper is updated to version 1.1  Check for the link in Post 1

Changes. 

1. Addedd as much event details. But still some are missing. I couldn't find details of Menu events. yet.

2. Corrects some minor code intedation problems. 

3. Addedd events for GUICtrlInput. This was not in version 1

4. Help file changed. An image replaced old msg box.

That's all for now. 

Edited by kcvinu
  Reveal hidden contents

 

Posted

@spudw2k Thank you :)

  Reveal hidden contents

 

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
×
×
  • Create New...