News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

AddIn support

Started by Biterider, May 07, 2005, 06:06:23 PM

Previous topic - Next topic

Biterider

Hi KetilO
I was testing the RAEdit class and I entered in an endless loop since the return value of the EM_LINEINDEX message doesn't follow the API specification. In particular it doesn't return -1 if the given line number is greater than the actual line number in the control. I solved it changing the algo. Is this behaviour change intentional?

Have you programmed the RAEdit control completely from scratch emulating all EM_ messages?   :eek

Regards,

Biterider

KetilO

Hi Biterider

The result of lazyness.
RAEdit is made from scratch. You can find the sources in the SimEd project on my website.

KetilO

Biterider

Wow, monster source! Congrats!  :thumbu

Biterider

Biterider

Hi KetilO
Is there a way to add items to the context menus? The problem is to get a handle of them.

Regards,

Biterider

KetilO

Hi

Use hToolMenu handle to get the popups.
Positions are:
0 - Project
1 - Output window
2 - Dialog edit
3 - File browser
4 - Properties

KetilO

Biterider

Hi KetilO
I guess, one of the last questions...  :P
How can I add a new accelerator?

Biterider

KetilO

Hi

ADDINHANDLES.hAccel is the handle.
Note that it is rebuilt whenever you get an AIM_MENUREBUILD message.

KetilO

Biterider

Hi KetilO
I have some problems with the Acceleators issue. I intercept the AIM_MENUREBUILD message to insert my ACCEL structure.
On the first call ADDINHANDLES.hAccel is 0. Under this circumstance, I create my own Accelerator table and store it in ADDINHANDLES.hAccel. on furter calls I get my handle but I get no result.  :(
What I'm doing wrong?

Biterider

KetilO

There is a bug in RadAsm.inc

It should be:

hTl1   dd 0 ;Handle of tool#1 static container
hTl2   dd 0 ;Handle of tool#2 static container
hHexEd   dd 0 ;Handle of hex edit window
hAccel   dd 0 ;RadASM Accelerators
hTbrIml   dd 0 ;Imagelist for the toolbars
ADDINHANDLES ends

KetilO

Biterider

Hi KetilO
I was looking for the context menu of the RA_Edit window (main editor). As I could see, it is not in the hToolMenu, so I tried to use the GetMenu api on the hEdit and hMdiCld without success  :'(   Where is the menu handle I'm looking for?

Regards

Biterider

KetilO

Context menu for the editor is the same as the main menu Edit popup.

KetilO

Biterider

Hi KetilO
I have finished the OA32 AddIn and it works like a violin. I gave it to test and if all work smoothly I'll post the sources.
I'm interested to add some sort of intellisence for the method calls (OCall, ACall, etc.) like the autocomplete feature for APIs.

I can imagine to use the wordlists, but I don't know how they are build. Can you give me some hints about them?

Perhaps a better approach is to use the code you have implemented for the API autocomplete in some way...

Regards,

Biterider

KetilO

Hi Biterider

Download addins.zip from my website.
In tutorials you can find CodeComplete and ProcDump addins.
They should give you a good starting point.

KetilO

Biterider

Hi KetilO
Currently I'm working on the intelisence for OA32 methods and I have now my first results. I'm not completely satisfied with the options showed in the ListBox when I type i.e. "OCall esi::" The shown items are only those defined in the project files, missing those inherited from. A possible solution is to add the missing files to the project or automatically read the missing information. The last option is in my eyes the best. To do this, I need the name of the object ancestor defined in the "Object xxx ". The property of type 11 (object) doesn't have additional information like the arguments or locals from procedures. Can you consider adding them? Also the parameters on the Method line can be very helpful. With this addition I can display parameter information when the line is being typed!  :8)

BTW, where is the info stored that let you jump to the source code line when you doubleclick on an item in the property listbox?
Finally, is there a way to know the height of a text line? I need it to properly position the hLBS.

Upload updated

Regards,

Biterider

KetilO

Hi Biterider

Adding parameters to Objects and Methods should not ba a big problem.

In the wordlist there is an Owner. This can be converted to a filename with a call to lpGetFileNameFromID.
From there you must do a search.

From RAEdit sources:
GetWindowLong,hEdit,0 returns a pointer to an EDIT structure. The fntinfo member points to a RAFONTINFO structure.
RAFONTINFO.fntht + RAFONTINFO.linespace givs the line height.

KetilO