I have a little program which I can start from the tools menu in RadAsm. My intention is to insert the color reference of a choosen color at the cursor position in RadAsm. I have tried to create a pipe and I have tried to WM_COPYDATA but not succeeded. What shall I do?
thanks
thanks
Hi minor28
Nice little tool you have made.
The prefered way is by creating a RadASM addin dll.
Here is a way without creating an addin.
KetilO
Nice little tool you have made.
The prefered way is by creating a RadASM addin dll.
Here is a way without creating an addin.
KetilO
Thanks KetilO
Your hint in copytora was a greate help to me. The exe works fine from the tools menu. However, as you said the prefered way was to create an addin dll I now have tried to learn the RadAsm addin technique. That's why it took some time to answer.
Now I have made an addin called colref.dll. It works from a toolbarbutton. The asciitab project has been the model for creating the toolbarbutton.
My addin works in the same way as my exe. But I have one problem that I couldn't solve. When I choose a new color by the menu "New color" and presses the insertbutton the colorref is inserted but RadAsm is deactivated. I don't understand why.
Regards
Minor28
Your hint in copytora was a greate help to me. The exe works fine from the tools menu. However, as you said the prefered way was to create an addin dll I now have tried to learn the RadAsm addin technique. That's why it took some time to answer.
Now I have made an addin called colref.dll. It works from a toolbarbutton. The asciitab project has been the model for creating the toolbarbutton.
My addin works in the same way as my exe. But I have one problem that I couldn't solve. When I choose a new color by the menu "New color" and presses the insertbutton the colorref is inserted but RadAsm is deactivated. I don't understand why.
Regards
Minor28
Hi minor28
Try to make RadASM the owner of the color dialog.
KetilO
Try to make RadASM the owner of the color dialog.
KetilO
Thanks KetilO,
Now it works. But I found another problem. CTR+V and RadAsm "Paste" activate the dll. I can't paste without activating the dll.
Now it works. But I found another problem. CTR+V and RadAsm "Paste" activate the dll. I can't paste without activating the dll.
Hi minor28
Yes I've just noticed. I will try to find out why.
BTW. Byte values starting with a letter must be proceeded by a zero.
KetilO
Yes I've just noticed. I will try to find out why.
BTW. Byte values starting with a letter must be proceeded by a zero.
KetilO
Hi minor28
There were a few bugs in the InstallDll proc. This caused the AIM_GETMENUID to fail.
You also used ebx in the DlgProc without preservation.
I also found a better way to solve the focus problem.
Great work minor28. :alright:
KetilO
There were a few bugs in the InstallDll proc. This caused the AIM_GETMENUID to fail.
You also used ebx in the DlgProc without preservation.
I also found a better way to solve the focus problem.
Great work minor28. :alright:
KetilO
Hi KetilO
Returning to the probleme of RadAsm beeing deactivated after choosing "New Color" menu. In the new release of RadASM the same operation causes RadASM to deactivate and immediately after that activated. Isn't it better to make RadASM owner of the dialog.
.if eax==IDM_NEW
invoke SetDlgItemText,hWnd,IDC_EDT1,0
invoke SetDlgItemText,hWnd,IDC_EDT2,0
invoke SetDlgItemText,hWnd,IDC_EDT3,0
mov eax,
invoke ColorDLG,(ADDINHANDLES ptr ).hEdit
.elseif eax==IDM_EXIT
Regards
Returning to the probleme of RadAsm beeing deactivated after choosing "New Color" menu. In the new release of RadASM the same operation causes RadASM to deactivate and immediately after that activated. Isn't it better to make RadASM owner of the dialog.
.if eax==IDM_NEW
invoke SetDlgItemText,hWnd,IDC_EDT1,0
invoke SetDlgItemText,hWnd,IDC_EDT2,0
invoke SetDlgItemText,hWnd,IDC_EDT3,0
mov eax,
invoke ColorDLG,(ADDINHANDLES ptr ).hEdit
.elseif eax==IDM_EXIT
Regards
Hi minor28
Maybe, but then RadASM gets focus and not the dialog that called the color dialog.
KetilO
Maybe, but then RadASM gets focus and not the dialog that called the color dialog.
KetilO
Hi
Change focus to the dialog and change editcontrols tabstops to false in the dialogeditor and tabindex=0 to the prefered button, for example "insert" hex.
.if eax==IDM_NEW
invoke SetDlgItemText,hWnd,IDC_EDT1,0
invoke SetDlgItemText,hWnd,IDC_EDT2,0
invoke SetDlgItemText,hWnd,IDC_EDT3,0
mov eax,
invoke ColorDLG,(ADDINHANDLES ptr ).hEdit
invoke SetFocus,hWnd
.elseif eax==IDM_EXIT
How about that?
Change focus to the dialog and change editcontrols tabstops to false in the dialogeditor and tabindex=0 to the prefered button, for example "insert" hex.
.if eax==IDM_NEW
invoke SetDlgItemText,hWnd,IDC_EDT1,0
invoke SetDlgItemText,hWnd,IDC_EDT2,0
invoke SetDlgItemText,hWnd,IDC_EDT3,0
mov eax,
invoke ColorDLG,(ADDINHANDLES ptr ).hEdit
invoke SetFocus,hWnd
.elseif eax==IDM_EXIT
How about that?
Hi minor28
Yes, that should work.
KetilO
Yes, that should work.
KetilO
It is my version...
Hi Eviloid
Very nice, great improvements. :alright:
KetilO
Very nice, great improvements. :alright:
KetilO
yes Eviloid,
far more sophisticated and professional.
minor28
far more sophisticated and professional.
minor28
Thanks!
:grin:
:grin: