A suggestion:You could add the option to use format xpmanifest in the projects?

Thanks :)


:o)
Posted on 2010-06-23 14:48:16 by Everdoh
Hello Ketil, and thank you for your hard work in creating this wonderful program!
Is there any chance you are thinking about a 64-bit version?
Posted on 2010-07-01 12:39:57 by c051n3
Hi Everdoh

xpmanifest can be added with Resource / Manifest.

KetilO
Posted on 2010-07-02 00:29:53 by KetilO
Hi c051n3

Will not happend in many years.

KetilO
Posted on 2010-07-02 00:31:33 by KetilO
LOL, people want a 64bit oopasm model too, well someone send me a free 64bit system and I'll get right on it!
Ketilo, keep on rockin.
Posted on 2010-07-02 00:59:30 by Homer

New upload. If you are updating, use Tools / Check for Updates.

Version 3.0.0.6 2010-07-02
--------------------------
o Added support for FreeBASIC.
o Fixed bugs.

KetilO
Posted on 2010-07-02 06:33:39 by KetilO
Hi KetilO
I started to translate the OA addin for RA3 and found some heavy changes on the addin interface to the main program. I have found a solution for most of my problems, like using the menu, managing the output windows, getting the word under the cursor, etc. BTW, in that last case i found that sending the private message REM_GETWORDFROMPOS to the Edit window i get what i want but i am not able to know beforhand the size of the buffer i need to allocate. Is there a solution for that?

The main reason i write these lines is because i need to enumerate all code editors (MdiChilds tagged with ID_EDITCODE). The way I'm doing it is using the EnumChildWindows API to get all MDI childs. The I check the GWL_IF field to see if the are in the ID_FIRSTCHILD to ID_LASTCHILD range and finally i get the filename using GetWindowText. Now, my problem is that i can not identify the type of the editor. I want to filter out only those editors tagged with ID_EDITCODE. Can you give me a hint how to perform it?

TIA

Biterider
Posted on 2010-08-10 15:33:08 by Biterider
Hi Biterider

REM_GETWORDFROMPOS:
Sorry, no way to know the size needed.

The GWL_USERDATA of the mdi child holds the handle of the editor.
The GWL_ID of the editor window will contain ID_EDITCODE for all code edit windows.

invoke GetWindowLong,hMdiChild,GWL_USERDATA
invoke GetWindowLong,eax,GWL_ID

KetilO
Posted on 2010-08-10 17:10:15 by KetilO
Hi KetilO
I want to continue working on the Addin this weekend but i miss some important information. Can your briefly explain what your are doing during the parsing process, what inormation you are gattering and how can i get access to it?

TIA

Biterider

PS: coding a bit more i came to the AIM_PARSEDONE message. In previous versions i got an ID in the lParam and then i could get the file name using lpGetFileNameFromID. Now, there is no such a function. Is there a way to get the file name?
Posted on 2010-08-13 03:28:21 by Biterider
Hi Biterider

When a project is opend I read the filenames from the project file and add it to the project browser (RAProject:RPBM_SETITEM). Then I read the file into memory and send it to the parser (RAProperty:PRM_PARSEFILE).
The parsed data is stored as a series of PROPERTIES structures. Each PROPERTIES structure is immediatly followed by one or more zero terminated strings. In RadASM 3.0.0.7 I have added an easy way to add properties. Just send a PRM_ADDPROPERTYITEM message to the property window. wParam=0, lParam=lpPROPERTYITEM.


PRM_ADDPROPERTYITEM    equ WM_USER+49    ;wParam=0, lParam=lpPROPERTYITEM

PROPERTYITEM struct
 nType DWORD ? ;Type 1 to 255
 nOwner DWORD ? ;Project file ID
 nLine DWORD ? ;Line number
 nEndLine DWORD ? ;Line number
 lpszStr DWORD ? ;Pointer to one or more zero terminated strings
 nParts DWORD ? ;Number of zero terminated strings
PROPERTYITEM ends


Cant see any reason to know the filename. AIM_PARSEFILE contains the pre parsed file in lParam. wParam has the project file id.

KetilO
Attachments:
Posted on 2010-08-14 04:16:12 by KetilO
Hi KetilO
I added the new definitions to the RAProperty.inc file. The reason for knowing the filename is that the addin is doing also some parsing to gatter extra information. Now, without knowing which file it belongs, most of the new info is useless. I tried to get the filename from the FileID using this code
    mov eax, .pHandles
    mov edi, .ADDINHANDLES.hProjectBrowser
    xor ebx, ebx                                        ;ITEM ID = 0
    .while TRUE
      invoke SendMessage, edi, RPBM_FINDNEXTITEM, ebx, 0  ;eax -> PBITEM
      .if eax == NULL
        .break
      .else
        mov ebx, .PBITEM.id
        .if ebx == dID
          lea eax, .PBITEM.szitem
          .break
        .endif
      .endif
    .endw


Running it after all is loaded retunrs the expected file names, but at the moment of parsing, the Project Browser has no idea about the IDs, returning NULL for each request.
Do you have suggestions on how I could proceed?

Biterider
Posted on 2010-08-14 16:06:57 by Biterider
Hi Biterider

Yes, you are right. The project browser was updated after the parsing was done.
I have moved the parsing a few lines down so the project browser does contain the info before the parsing is done.

SendMessage,hProjectBrowser,RPBM_FINDITEM,pid,NULL should now return a pointer to the PBITEM structure, no need to loop through them all.

KetilO
Attachments:
Posted on 2010-08-15 02:56:16 by KetilO
Hi KetilO
The last changes work as a charm. Iíll stop coding here for this weekend and want to share my experience using RA3 and coding for it.

I was looking for the general strategy for the addins and found a problem that I want try to describe. An addin is designed for a special purpose for a code language, i.e. masm. Now when you create or load a new project, the addin should be able to decide if it should activate or not based on the project information. In RA2 you sent 2 messages to the addins so they know that a new project was started and Iím missing them.

Another change in RA3 is that the addins doesnít have ďoptionsĒ anymore. Is it your intention that the addins manage the options by themselves?

A problem I faced when I debug the addin is the SEH protection that doesnít enable me to use INT 3 to trigger a debugger. For the moment I attach a debugger to the running process before the INT 3 which works but is not so comfortable. Maybe a flag in the ini file to disable the SEH protection for debugging purposes can be a nice solution.

Doubleclicking on the editor tabs doesnít close them anymore. This was a nice feature in a RAD environment that Iím missing very much. Also the undo persistence over sessions was a nice and useful feature that Iím missing.

To avoid confusion with different releases of the addin inc files I suggest to use some sort of version numbering.

The menu drawing has a glitch on some PC but I donít know what setting does it trigger. I suspect that it is some font size that sets the menu item height. As you can see, there is a 2 pixel border, possibly drawn when you render the background (picture attached).

I notice a performance boost when loading a project which is very positive on slow machines. The reworked interface seems clean and tidy. Also the project manager and its new features are a nice addition. The new auto complete are also very welcome. These additions improve the user experience a lot. All in one, a good step forward!

Biterider
Attachments:
Posted on 2010-08-15 13:14:13 by Biterider
Hi KetilO
This weekend I did some progress porting the old code. While doing it I found some bugs.
- New editor files marked as "(Untitled)" are saved as "(Untitled)" without asking for a name.
- When the Listbox is shown, it doesnt hide when you change to another editor window.
- When the listbox is shown, window scrolling with the mouse wheel should be disabled to avoid scrolling the text behind the listbox. Maybe it can be used to scroll within the listbox itself.

RA2 had a mechanism to subclass the editor window to catch i.e. the WM_CHAR message when more than one addin is present. Subclassing the editor window directly when AIM_MDIACTIVATE is fired doesnít work since the messages are sent always in the same order to all addins. This prevents a correct unsublassing since it should be done in reverse order. This behaviour is seen in the following message dump (red and blue are the outputs of 2 different addins):

AIM_RASELCHANGE, hWnd = 000809F2h, wParam = 018748B8h, lParam = 0012EC22h
AIM_RASELCHANGE, hWnd = 000809F2h, wParam = 018748B8h, lParam = 0012EC22h
AIM_MDIACTIVATE, hWnd = 000809F2h, wParam = 000809F2h, lParam = 00050962h
AIM_MDIACTIVATE, hWnd = 000809F2h, wParam = 000809F2h, lParam = 00050962h
AIM_RASELCHANGE, hWnd = 00050962h, wParam = 001C65F0h, lParam = 0012F02Eh
AIM_RASELCHANGE, hWnd = 00050962h, wParam = 001C65F0h, lParam = 0012F02Eh
AIM_MDIACTIVATE, hWnd = 00050962h, wParam = 000809F2h, lParam = 00050962h
AIM_MDIACTIVATE, hWnd = 00050962h, wParam = 000809F2h, lParam = 00050962h
AIM_MDIACTIVATE, hWnd = 00050962h, wParam = 00050962h, lParam = 000809F2h
AIM_MDIACTIVATE, hWnd = 00050962h, wParam = 00050962h, lParam = 000809F2h
AIM_RASELCHANGE, hWnd = 000809F2h, wParam = 018748B8h, lParam = 0012F02Eh
AIM_RASELCHANGE, hWnd = 000809F2h, wParam = 018748B8h, lParam = 0012F02Eh
AIM_MDIACTIVATE, hWnd = 000809F2h, wParam = 00050962h, lParam = 000809F2h
AIM_MDIACTIVATE, hWnd = 000809F2h, wParam = 00050962h, lParam = 000809F2h

How is it intended to work in RA3?

Have you found some time to think about the "Project messages" from my previous post?

Regards,

Biterider
Posted on 2010-08-22 14:37:03 by Biterider
Hi Biterider

Thanks for the bug report, I will look into it.

In RadASM 3.0 there is no need to unsubclass. Just subclass when you get an AIM_FILEOPENED with wParam=ID_EDITCODE

RadASM 3007 hase some new addin messages.

KetilO
Posted on 2010-08-23 04:41:26 by KetilO
New upload. If you are updating, use Tools / Check for Updates.

Version 3.0.0.7 2010-08-23
--------------------------
0 Added double click on a tab to close it.
o Added AIM_PROJECTCLOSE, AIM_PROJECTCLOSED, AIM_PROJECTOPEN and AIM_PROJECTOPENED addin messages.
o Added hidden option to disable SEH handling. Section , NoSEH=1
  Uesful when debugging addins.
o Added click on statusbar to shopw / hide output window.
o Added Empty Undo Buffer to Edit menu.
o Fixed bug with Comment / Uncomment. Did not work as it should for languages other than assembly.

KetilO
Posted on 2010-08-23 04:42:14 by KetilO
Hi KetilO
Thank you for the changes. May it be possible to post the updated inc files from the ...\Masm\Projects\Addins\Inc folder?
In particular Addin.inc was not updated from the download of version 3007.

Regards,

Biterider
Posted on 2010-08-23 11:07:42 by Biterider
Hi KetilO
May you provide access to the  image list used for the CodeCompleteListBox (hCC) to add new icons? What is the size of the used icons?
And short example showing the use of CCM_ADDLIST/CC_COLOR/CC_ADDLIST should also be useful.

Thanks

Biterider
Posted on 2010-08-28 03:48:08 by Biterider
Hi Biterider

invoke GetWindowLong,hCC,0 returns a pointer to this structure:

RACC struct
  style dd ?
  backcolor dd ?
  textcolor dd ?
  hfont dd ?
  fredraw dd ?
  itemheight dd ?
  cursel dd ?
  count dd ?
  topindex dd ?
  hmem dd ?
  lpmem dd ?
  cbsize dd ?
  himl dd ?
RACC ends


The size of the icons are 16x16.

CCM_ADDLIST wParam=0,lParam pointer to a CC_ADDLIST structure
CC_ADDLIST items
lpszList is a pointer to a comma separated list of words
lpszFilter is a pointer to the string used to filter words to add. The filter is case insensitive.
Example: Filter=abc will add all words that starts with abc or ABC.
nType is the icon to be used.
CC_COLOR is the colors used to draw the listbox.

KetilO

Posted on 2010-08-30 02:13:55 by KetilO
Hi KetilO
I found a problem using the context ListBox. It happens when i insert a string using CCM_ADDITEM that contains a "[" character, like "". The item is displayed correctly, but when i select it and press <ENTER> nothing is inserted. Experimenting a bit, it seems that the inserted string is hacked when this character is found.

Another issue related to the insertion if items of the context ListBox is that i wanted to use wildcards to filter the the selection. The wildcards are typed as regular characters on the edited line and when you select the wanted item, the string containing the wildcards should be replaced. This works with the "?" but doesntwith the "*" character. The original string is replaced up to the "*", stopping there. I think you are searching back the beginning of the source string until you find a separator character. An alternative would be to store the index of the first character that fired the context ListBox and replace the source up to this place.

I'm using 16x16 icons for the context ListBox imagelist. The ListBox items are drawn with a height of 14 pixels (see attachment) which produces an ugly effect on the icons.

Regards,

Biterider
Attachments:
Posted on 2010-10-03 04:29:15 by Biterider