Hey I've been messing about with Radasm's Addins...it's very easy to program...KetilO's done an excellent job...

I've included my test dll with source...

for ketilo:
while writing the addin I found when a project was opened the menus were regenerated...so any additions which I made were undone...I couldn't see where in your test addin you dealt with this but i came up with an adequate workaround...I think RadASM needs to send a PROJECTOPENED message...

Also as you'll see in the program...I've used the menu id as the id for the toolbar button, i've not had any problems since the ID is unique to my proggie...the toolbar section is a bit messy as 've not dealt much with dynmic tbars..

By the way a suggestion...at some time down the line can you include a section in the dialog properties where you can enter additional styles? That way you won't have to code built insupport for some of the more obscure styles...

I had a few other things but I can't remember right now....
perhaps tommorrow...

The Martial
Posted on 2001-10-21 20:45:46 by MArtial_Code
Hi MArtial_Code

Yes, the MRU, Make, Tools and Help menu is regenerated when you open a project. In 1.0.6 they will also be regenerated when you use the new menu tool. I guess a menu rebuild message to addins is the solution. Also a PROJECTOPENED message is a good idea. A quick solution to style and exstyle problem would be to be able to enter a hex value that will be ored with the styles.

BTW I could not find any source, just RadASM.inc :grin:

Your ascii table works well and copy the hex value to output. Great work.

KetilO
Posted on 2001-10-21 21:48:25 by KetilO
How about a Client and server components? :) that would be nice. BTW, can we add our own components?
Posted on 2001-10-21 23:59:16 by Tsongkie[ii]
I created an AddIn.Inc file like your RadASM.Inc. This macro makes the code a little more readable:
;Macro returns the value for given hooks

;(This macro will need to be expanded when hooks > 32)
AddInHook MACRO hks:VARARG
LOCAL val
val = 0
FOR hk,<&hks>
IFIDN <WM_COMMAND>,<hk>
val = val OR 00000000000000000000000000000001b
ELSEIFIDN <AIM_COMMANDDONE>,<hk>
val = val OR 00000000000000000000000000000010b
ELSEIFIDN <WM_CLOSE>,<hk>
val = val OR 00000000000000000000000000000100b
ELSEIFIDN <WM_INITMENUPOPUP>,<hk>
val = val OR 00000000000000000000000000001000b
ELSEIFIDN <AIM_MAKEBEGIN>,<hk>
val = val OR 00000000000000000000000000010000b
ELSEIFIDN <AIM_MAKEDONE>,<hk>
val = val OR 00000000000000000000000000100000b
ELSEIFIDN <AIM_PROJECTCLOSE>,<hk>
val = val OR 00000000000000000000000001000000b
ELSEIFIDN <AIM_PROJECTCLOSED>,<hk>
val = val OR 00000000000000000000000010000000b
ELSEIFIDN <AIM_CLIENTMOUSEMOVE>,<hk>
val = val OR 00000000000000000000000100000000b
ELSEIFIDN <AIM_TIMER>,<hk>
val = val OR 00000000000000000000001000000000b
ELSEIFIDN <AIM_CTLDBLCLK>,<hk>
val = val OR 00000000000000000000010000000000b
ELSEIFIDN <AIM_CREATENEWDLG>,<hk>
val = val OR 00000000000000000000100000000000b
ELSEIFIDN <AIM_CONTEXTMENU>,<hk>
val = val OR 00000000000000000001000000000000b
;; ELSEIFIDN <>,<hk>
;; val = val OR 00000000000000000010000000000000b
ENDIF
ENDM
EXITM %val
ENDM
Posted on 2001-10-22 01:11:41 by bitRAKE
To Tsongkie:

Client / server. I am not shure I know what you mean. If you are talking about a team safely developing a project then this is both possible and not very hard. What you need is a code base stored on a server and 3 functions.

1. Get latest
2. Check out
3. Check in

The code base can be a server on a local network or on a ftp server via internet. A checked out file is read only on server, writeable on local machin. A checked in file is read only on local machin, writeable on server. Filetime keeps track of latest version.

Sure you can add your own addins. If you think it is useful, share it with the rest of us.:alright:

To bitRAKE

The macro will surely simplify making an addin.

KetilO
Posted on 2001-10-22 01:33:14 by KetilO
KetilO:

I meaN a component that is capable off opening a port to an O/S and listening for data (server) and a client component which sends data to the server... I'm goona go and *try* to make this add in. :)

I'm sorry if I've got sooo much requests. :) here comes another:

A OpenFilename component so that when a user clicks on a button, the component automatically pops an OpenFile Dialog.

Just a suggestion again :)
Posted on 2001-10-22 02:49:26 by Tsongkie[ii]
Hi Tsongkie

Sounds cool. Let us know when you have someting to show.:alright:

KetilO
Posted on 2001-10-22 03:04:45 by KetilO
I thougt I included the sources...
here it is....

a bit on how it works...
copy the emf and dll to addins directory...
add "asciitab.dll,x" under addins in Radasm.ini
once Radasm is running you should see a new button added to your toolbar...pressing this will show and ascii table,click on a letter to gnerate the ascii code, this is copied to the output window...
if you have an edit window active then the output is inserted at the cursor position when you press escape(if the table was displayed using the tools menu and not the toolbar),pressing escape also hides the window....
the Martial
Posted on 2001-10-22 04:10:38 by MArtial_Code
MArtial_Code, every time I access the addin it adds another menu item to the Tools menu. Otherwise, cool tool! :grin:
Posted on 2001-10-22 14:05:28 by bitRAKE
It sounds like the test for the presence of "ascii table" menuitem under the tools menu is going wrong...It's a simple test based on wether GetMenuItemInfo fails or succeeds if it fails then ascii table is added again...In an ideal situation GetMenuItemInfo should only fail if the menuitem it is checking for does not exist...

The versions i sent should work properly, atleast they do on my machine.. try this one and let me know if it works properly...


it's not really a zip file....just remove the .zip extension ;)
the martial
Posted on 2001-10-22 15:15:38 by MArtial_Code
Hi MArtial_Code

I have made some changes to RadASM. RadASM now sends a message every time the menu is regenerated. I have also made it possible to add a tooltip to a toolbar button. I tried to email the changes but your accont was full.:grin:

KetilO
Posted on 2001-10-22 15:38:31 by KetilO
Hi KetilO, excellent stuff, I wasn't expecting such a quick update but hey..I ain't complaining:alright:
Posted on 2001-10-22 15:49:02 by MArtial_Code