The MASM Forum

General => The Workshop => Topic started by: jj2007 on March 15, 2024, 07:11:51 AM

Title: qEditor plugins - any sources?
Post by: jj2007 on March 15, 2024, 07:11:51 AM
Hi everybody,

I am contemplating whether to add a plugin menu to SimpleEditor (https://masm32.com/board/index.php?topic=11754.msg127984#msg127984). Does anybody have sources for qEditor plugins, to help me design the interface in a compatible way?

Thanks :thup:
Title: Re: qEditor plugins - any sources?
Post by: sinsi on March 15, 2024, 07:38:54 AM
The only help I could find is in the QEditor help, but that's all you need to write one.
As far as implementation goes, that was hutch's little secret  :azn:
Title: Re: qEditor plugins - any sources?
Post by: jj2007 on March 15, 2024, 09:15:12 AM
It's not difficult in principle:
- get the dll files in the dedicated plugin folder
- put them into a menu
- if user clicks, use LoadLibrary and GetProcAddress
- pass on the handle of the richedit control

But I wonder if we could use the existing qEditor plugins :cool:

Does anybody use qEditor plugins on a regular basis?
Title: Re: qEditor plugins - any sources?
Post by: sinsi on March 15, 2024, 10:29:13 AM
Quick and dirty code to search The Magic Number Database for selected text.
Also used the same basic idea to search Google.
I was going to use a ml/link config/builder, but things happened  :rolleyes: and I went to the dark side.

include \asm\include\win32.inc
import kernel32,shell32,user32

.data
operation db 'open',0
searchurl db 'https://www.magnumdb.com/search?q='
searchtxt db 100h dup(0)

.code

DllEntryPoint proc public hinstDLL,fdwReason,lpReserved
        mov eax,1
        ret
DllEntryPoint endp

PiEntryPoint proc public qe
        push 2
        call qe
        invoke SendMessageA,eax,EM_GETSELTEXT,0,offset searchtxt
        invoke ShellExecuteA,0,offset operation,offset searchurl,0,0,SW_SHOWDEFAULT
        ret
PiEntryPoint endp

end DllEntryPoint
Title: Re: qEditor plugins - any sources?
Post by: jj2007 on March 15, 2024, 11:51:34 AM
Thanks, Sinsi, that looks very helpful :thumbsup:
Title: Re: qEditor plugins - any sources?
Post by: Biterider on March 15, 2024, 05:23:31 PM
Hi Sinsi
Very cool... thanks for the link :thumbsup:

Biterider
Title: Re: qEditor plugins - any sources?
Post by: daydreamer on March 15, 2024, 06:42:42 PM
I don't know if it's plugin, but I like the gui template  and console template "wizard"