Hi Biterider

This behaviour is intentional. It is used in arrays. Any suggestions?

This could be solved by defining "*" as a character in
16x16 icons

I will have a look at it.

Posted on 2010-10-05 01:28:21 by KetilO
Hi KetilO
About the problem in the context list box i began to see it as an intersting feature , but i came across to a new problem.
I'm creating strings on the fly when i analyse the locals of a proc and so i add them to the list box. The result is a bit strange since it seems that the strings are changing while i'm disposing them. My conclusion is that the context list box was not created with the LBS_HASSTRINGS. Is it a problem to enable this style?
Of course i can mantain an internal list, but i'm not able to detect when i should dispose it.


Posted on 2010-10-17 15:36:17 by Biterider
Hi Biterider

The context list box does not hold the strings, just pointers to the strings. I can add an addin message that tells when the list box is shown or hidden. Would that solve the problem?

Posted on 2010-10-18 01:51:39 by KetilO
Hi KetilO
Adding these messages would help a lot, in particular if the listbox is hidden you can return the reason or even better the index of the selected item or -1 if e.g. <ESC> was pressed. This way I can manage to complete some tasks and improve the auto-complete feature.


PS: traying to add a string like Inst::Array to the context listbox has the same effect as Inst. Is this intentional? Are they other character/character combinations that behaves in non conventional ways? Maybe this behaviour can be made compiler specific, i.e. if it is MASM, then it inserts the full string, but if it is PBasic the it inserts only up to the escape character.

PS2: a bit later...
Finally i managed to add the strings to the CLB using a string collection. I simply reset the strings when i reset the listbox and destroy it when the addin is unloaded. I think it is a good solution with a neglectable payload. Anyway, i think it may be a good thing to have a message indicating if the CLB was closed due to a VK_ESC or whatever forced it to hide or the selected item index as a success indication.

Posted on 2010-10-18 04:26:00 by Biterider
Hi Biterider

New upøoad.

Version 2010-10-18
o Adjusted height of listbox items in codecomplete listbox.
o Added AIM_CODECOMPLETESHOW addin message.
 The codecomplete listbox is about to be shown or hidden. Always return FALSE.
 hWin=Main window, wParam=-2 if list is shown,-1 or index if list is hidden,
 lParam=handle of codecomplete listbox

PS: traying to add a string like Inst::Array to the context listbox has the same effect as Inst. Is this intentional? Are they other character/character combinations that behaves in non conventional ways? Maybe this behaviour can be made compiler specific, i.e. if it is MASM, then it inserts the full string, but if it is PBasic the it inserts only up to the escape character.

Here is part of the code:

invoke SendMessage,ha.hCC,CCM_GETCURSEL,0,0
mov ebx,eax
invoke SendMessage,ha.hCC,CCM_GETITEM,eax,0
push eax
invoke strcpy,offset tmpbuff,eax
xor eax,eax
.while tmpbuff
 .if tmpbuff==':' || tmpbuff=='['
   mov tmpbuff,0
inc eax
invoke SendMessage,ha.hEdt,EM_REPLACESEL,TRUE,offset tmpbuff
pop eax

The colon is used by all languages to show the datatype "mydword:DWORD"
Would checking for "::" be OK?

Posted on 2010-10-19 02:13:01 by KetilO
Hi KetilO
Thank you for the update! All changes work fine.
Thinking about the CC listbox problem with the ":" and "[" characters i maybe came to a solution. What about if you only activate this filtering if cctype is CCTYPE_CONST, CCTYPE_ALL or CCTYPE_SRUTCT, or as alternative, if you deactivate it if cctype is >= CCTYPE_USER?

Makes it sense to declare a user space for CCTYPEs like > 65535?


Posted on 2010-10-21 01:33:33 by Biterider
Hi Biterider

New upload. The check for ":" and "[" has been deactivated for CCTYPE_USER.

Posted on 2010-10-25 04:59:30 by KetilO

The bug where RadASM could terminate if a block of text was inserted or deleted has been found and fixed.
Big thanks to WillASM for helping me track down this bug.

Version 2010-10-25
o Fixed the bug where RadASM could terminate if a block of text was inserted or deleted.
  Thanks to WillASM for helping me track down this bug.

Posted on 2010-10-25 05:02:43 by KetilO
Hi KetilO
All work fine here. Thank you for the changes!

Posted on 2010-10-25 12:48:52 by Biterider
Hi KetilO
With the last update I could complete 90% of the functionality of the OA32 AddIn.
One remaining point is the addition of structures to the internal word list. RA2 had a proc ADDINPROCS.lpAddWordToWordList that did the job. How is this done now in RA3?

Since I feel sure enough to use RA3 I began to convert my projects and I quickly stumble over the first bug. The resource editor is not able to parse a String table expression like

 IDLANG_ENGLISH + 00, "&File|File commands"

The “IDLANG_ENGLISH + 00” expression is not parsed correctly and a previous declaration “#define IDLANG_ENGLISH 000” disappeared completely from the rc file.
The second problem with string tables is that an item ID of zero skips the reading of all consecutive items. That means that if the first item has an ID of zero, the table is empty.

Fortunately you may open the resource file pressing <CTRL> and still edit it manually which is a great feature.

The new layout of the project manager suggests that other panes can be added. In particular I’m thinking if it is possible to include an Object-Tree there. Do you have you some good tips if this is possible?


31.10.2010 PS(1): I found 2 additional issues :
1. AIM_PARSEFILE LPARAM should return a pointer to file data, but the data is sort of manipulated. All comments are replaced by spaces, making it impossible to extract information from there.
2. Inserting codewise a dot after a structure name doesnt trigger the code complete ListBox. E.g. if you type .POINT and insert a dot after this text using
invoke SendMessage, .ADDINHANDLES.hEdt, EM_REPLACESEL, TRUE, .pAutoCompleteString
where AutoCompleteString = "." nothing is triggered.

I feature i miss very much is the <CTRL> click on [ + ] or [ - ] to collapse or expand nested code.  May I ask you to put this on your ToDo list?



PS(2), a bit later
1. I noticed a drawing bug, that is also present in RA2. The enclosing line around e.g. a structure definition on the left side of the code editor is not always drawn. As an example you can check the RACodeComplete.inc file line 50 (See attached pic).
2. When you cancel the compilation process pressing <ESC>, the link process is not aborted.
3. Resources are always compiled, even if they are not changed.


01.11.10 PS(3)
1. In some cases, the error parsing on the output window does not work. See attached pic.
Posted on 2010-10-30 03:14:10 by Biterider
Hi KetilO
Any progrss on the above issues?

I have a new "cosmetic" issue. The window menu of the MDI childs doesn't draw at all. See attached pic.


Posted on 2010-12-23 11:26:54 by Biterider
Hi KetilO
I found that the above bug doesnt only occur if you first popup the window menu while the MDI child window is maximized. Only then you can trigger the bug. See attached pic.


Posted on 2010-12-23 14:25:39 by Biterider
Hi KetilO
I hope you are still reading this thread.
I finished the development of the OA32 Addin for RA3. The last step was the addition of the object structures to the RA3 properties. I used type "S" with the following code
    mov edx, .pHandles
    invoke SendMessage, .ADDINHANDLES.hProperty, PRM_ADDPROPERTYITEM, 0, addr ObjStrucInfo.PropertyItem

At some point in the code i need to refresh the object structures where I need to delete exiting structures and add the newest. The only way I found is using the PRM_DELPROPERTY. To delete only that what I need, I used a nOwner (File ID) of my own, which I set to -1. I hope this is a valid option, but I'm not sure since i don't know how the File IDs are managed. Please correct me if I'm wrong on my assumptions.

I have a little request. I need an additional AIM_XXX message to forward the WM_ACTIVATE message to the Addins. I need it to make some data validation. May it be possible?

While I was working on this Addin, it came to my mind that a script engine can be integrated into an Addin without too much work. In particular, I was a working code of WSH which is basically a VB script engine. If you are interested, I may work on it, but i need your help for the integration of this Addin with the underlying memory management of RA3.


Posted on 2010-12-28 12:25:03 by Biterider
Hi Biterider

Setting the nOwner to -1 should work. The drawback is that you need to refresh properties for ALL files when a file is changed.

RadASM uses the nOwner to refresh only the file you are currently editing. If no project is open then the nOwner is the handle of the mdi child. If a project is open then the nOwner is the project file ID. There are several ways to get the project file ID.
1. Get a pointer to the TABMEM structure. This pointer is stored in the GWL_USERDATA of the mdi childs edit control.

invoke GetWindowLong,hMdiChild,GWL_USERDATA ;Get handle of edit control
invoke GetWindowLong,eax,GWL_USERDATA ;Get pointer to TABMEM structure
TABMEM.pid contains project file ID

2. Get the project file ID from the project browser using the file name.

invoke SendMessage hProjectBrowser,RPBM_FINDITEM,0,addr szFileName ;Returns a pointer to a PBITEM structure
;PBITEM.id contains project file ID

AIM_ACTIVATE will be added.
A scripting engine sounds like a good idea.

Posted on 2010-12-30 04:16:33 by KetilO
Hi Biterider

New upload.

Version 2010-12-30
o Fixed a menu draw bug.
o Added AIM_ACTIVATE addin message. Sendt when RadASM is activated or deactivated. Same parameters as WM_ACTIVATE.

Posted on 2011-01-03 01:41:18 by KetilO
Hi KetilO
I tested the new message and it works fine. Thanks!

I noticed some rendering downgrade using RA3 compared with RA2. Looking into te resource section i found that the manifest is missing. May it be possible to add it again in a future version?


Posted on 2011-01-04 14:14:43 by Biterider
Biterider, open the rc file of your project then menu Resource > Add New > Manifest or am I missing something?
Posted on 2011-01-04 16:35:32 by Gunner
Hi Gunner
No, I mean in the resource section of RadASM.exe, not my own project.


Posted on 2011-01-04 17:01:32 by Biterider
Thanks Biterider

New uploasd.

Version 2011-01-05
o Added manifest to RadASM.exe.

Posted on 2011-01-05 02:18:56 by KetilO
I Wish RadASM could support RICHEDIT 4.1 It's class name is "RichEdit50W".
Posted on 2011-02-06 21:21:16 by unwake