Author Topic: my editor project  (Read 10701 times)

zedd151

  • Member
  • *****
  • Posts: 1968
Re: my editor :)
« Reply #75 on: October 10, 2022, 11:32:43 PM »
Having some issues with the 'select_word' function hutch posted above. Not quite working as expected.
Alternative code here: Better word selection
Did you even read the post below that one? Work exactly as expected now.  :biggrin:  As far as "Better word selection" be careful not to start a holy war with hutch.  :tongue:  There's usually more than one way to implement functions.
Regards, zedd.
:tongue:

zedd151

  • Member
  • *****
  • Posts: 1968
Re: my editor project
« Reply #76 on: October 10, 2022, 11:37:58 PM »
... that handles also the uses esi edi ebx stuff, so it can cost several bytes more.
I never uses uses. I always explicitly push and pop my registers. It clutters the proc line otherwise.  :tongue:
Regards, zedd.
:tongue:

zedd151

  • Member
  • *****
  • Posts: 1968
Re: my editor project
« Reply #77 on: October 11, 2022, 12:03:08 AM »
After having a hard time making a function for word selection work the way I wanted it too, I finally have exactly the code needed for that (donated by hutch--). Thank you hutch.

I will be testing this latest version today to ensure no bugs have been introduced from various modifications, and finishing up some of the functions that are only partially implemented.

It's rather lonely in this sub board now, and there's an echo in here.  :tongue:  I noticed earlier today that mine is the sole topic here now.


Attachment 'basic editor11.zip' removed but is included in the archive In this post
« Last Edit: November 17, 2022, 12:42:29 PM by zedd151 »
Regards, zedd.
:tongue:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 10583
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: my editor project
« Reply #78 on: October 11, 2022, 03:09:32 AM »
 :biggrin:

> It's rather lonely in this sub board now

At least your post is easy to find now.  :tongue:
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

zedd151

  • Member
  • *****
  • Posts: 1968
Re: my editor project
« Reply #79 on: October 11, 2022, 03:17:05 AM »
At least your post is easy to find now.  :tongue:
I only hope this board doesn't get downsized outtahere for lack of usage.  :biggrin:
Regards, zedd.
:tongue:

jj2007

  • Member
  • *****
  • Posts: 13957
  • Assembly is fun ;-)
    • MasmBasic
Re: my editor :)
« Reply #80 on: October 11, 2022, 04:43:37 AM »
Did you even read the post below that one?

Of course not, why should I?

Quote
As far as "Better word selection" be careful not to start a holy war with hutch

"Better" refers to my own editor. If you had read my post, you would have understood that.

zedd151

  • Member
  • *****
  • Posts: 1968
Re: my editor :)
« Reply #81 on: October 11, 2022, 05:07:25 AM »

Quote
"Better" refers to my own editor...
you didn't say that much in your post here, so it looked as if you were inferring better than the function discussed a few posts  above your post. But ok.  :smiley:
Regards, zedd.
:tongue:

zedd151

  • Member
  • *****
  • Posts: 1968
Re: my editor project
« Reply #82 on: October 11, 2022, 05:10:48 AM »
Put code in to parse the commandline to load a file dropped onto the programs icon.


Updated the attachment. Somehow the old 'tab replacement' code found its way in this version.  :rolleyes:

Attachment 'basic editor12.zip' removed but is included in the archive In this post
« Last Edit: November 17, 2022, 12:43:04 PM by zedd151 »
Regards, zedd.
:tongue:

NoCforMe

  • Member
  • *****
  • Posts: 1124
Re: my editor project
« Reply #83 on: October 11, 2022, 06:57:52 AM »
To save some space, I often use

Code: [Select]
    xor eax, eax
    jmp ReturnEax
...
    invoke CallWindowProc, ...
...
ReturnEax:
    ret

I go one better (or at least one different). In my window procs() I always have two exits that I can JMP to:

Code: [Select]
zero_exit:
XOR EAX, EAX
RET

true_exit:
MOV EAX, TRUE
RET


But the most important thing is, as I said, the rule:

Do not call DefWindowProc() or CallWindowProc() if you handle a message. Period.

NoCforMe

  • Member
  • *****
  • Posts: 1124
Re: my editor project
« Reply #84 on: October 11, 2022, 06:59:16 AM »
I never uses uses. I always explicitly push and pop my registers. It clutters the proc line otherwise.  :tongue:

 :thumbsup: Yes.

zedd151

  • Member
  • *****
  • Posts: 1968
Re: my editor project
« Reply #85 on: October 11, 2022, 07:12:33 AM »
I'm currently working on the search/replace dialog boxes. I may do something different though... details later. Also I looked at the tab replacement code in tEdit. If I can convert it for 32 bit operation I'll plunk that in here, replacing my unauthodox code. But looks like I'll have to convert some dependencies as well for that one. We'll see... I'll try to get one or the other into code for the editor today.
Regards, zedd.
:tongue:

NoCforMe

  • Member
  • *****
  • Posts: 1124
Re: my editor project
« Reply #86 on: October 11, 2022, 12:18:45 PM »
How do you create dialogs? Do you use a resource editor?

I have another way of creating dialogs, my own homemade dialog editor that creates memory template files (include files) rather than resource files, thus not requiring the resource compiler, if you're interested. Works pretty well.

zedd151

  • Member
  • *****
  • Posts: 1968
Re: my editor project
« Reply #87 on: October 11, 2022, 12:55:08 PM »
How do you create dialogs? Do you use a resource editor?

I have another way of creating dialogs, my own homemade dialog editor that creates memory template files (include files) rather than resource files, thus not requiring the resource compiler, if you're interested. Works pretty well.
This
Now if I were to put code in to make an 'in memory dialog', I might as well make a child window instead.  :tongue:
Regards, zedd.
:tongue:

zedd151

  • Member
  • *****
  • Posts: 1968
Re: my editor project
« Reply #88 on: October 11, 2022, 02:40:28 PM »
Quote from: ZZzzedd
We'll see... I'll try to get one or the other into code for the editor today.
Well that went over like a lead balloon. I got involved with something else, so nothing more yet for this editor.
...
I've been wondering if this project is even worth it. There are several options in the MASM 64 SDK for creating ascii editors, plus enough 64 bit code floating around to do almost everything I would want my next editor to do. I would only have to add my own custom functions of which I have the code already (in 32 bit) I'll sleep on this and decide in the morning.
Tonight I am going to piece all the code together that I can find to make a 64 bit editor; and see what code still needs to be added to that, to meet my needs. It might be a better way then to keep trying to reinvent the wheel.
Regards, zedd.
:tongue:

NoCforMe

  • Member
  • *****
  • Posts: 1124
Re: my editor project
« Reply #89 on: October 11, 2022, 02:49:30 PM »
Now if I were to put code in to make an 'in memory dialog', I might as well make a child window instead.  :tongue:

Kinda a joke, I know, but you kinda missed to point too: with my scheme, you don't have to create any windows. You invoke the dialog as you always do, except you use the DialogBoxIndirectParam() flavor, which instead of creating the dialog from a resource stored within the executable creates it from a memory template. Other than that, everything's handled by the dialog manager as usual. Easy peasy.