flat assembler
Message board for the users of flat assembler.

Index > Main > Sorry. But i not found examples how using FEDIT.DLL

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 21 Jul 2018, 16:38
I want use only FEDIT.DLL in my window program, witch highlighting text.
I not need compile code to asm. A mean whithout FASM.dll
Only for text.

Interesting simple sample how use FEDIT.DLL.
And where is get last version FEDIT.DLL ?
Post 21 Jul 2018, 16:38
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 21 Jul 2018, 18:48
The FEDIT.DLL source is in the FASM.DLL package. This is simply a wrapper for the FEDIT control that comes with a standard FASMW package, so you just put FEDIT.ASM in the same directory as FASMW sources and it can be assembled then.

As for the examples, the example that comes with FASM.DLL does not use any syntax highlighting. But you could extract the syntax highlighting function from FASMW.ASM - I have done that and created the attached example.


Description: A quickly patched-up FEDIT example
Download
Filename: feditdemo.zip
Filesize: 14.61 KB
Downloaded: 833 Time(s)

Post 21 Jul 2018, 18:48
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 21 Jul 2018, 18:59
Cool ! Big thanks !
Post 21 Jul 2018, 18:59
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 25 Jul 2018, 09:15
Problem with change fonts. When i am set Broadway font in fasm edit window
chars draw not full and cursor bug with offset next char.

And how change font size ?
And how using FEM_SETRIGHTCLICKMENU ? Please explain in example.
Post 25 Jul 2018, 09:15
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 25 Jul 2018, 09:34
Roman wrote:
Problem with change fonts. When i am set Broadway font in fasm edit window
chars draw not full and cursor bug with offset next char.
The font needs to have a FIXED_PITCH attribute (meaning that it is a monospaced font). Look at the ChooseFont dialog used in FASMW - it has the CF_FIXEDPITCHONLY flag set.

Roman wrote:
And how change font size ?
You set the size up with the other parameters when preparing font with CreateFont.

Roman wrote:
And how using FEM_SETRIGHTCLICKMENU ? Please explain in example.
WPARAM should be the handle of menu (you usually load it from resource with LoadMenu) and LPARAM should be the handle of the window that needs to receive the WM_COMMAND messages from the menu.
Post 25 Jul 2018, 09:34
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 21 Feb 2019, 18:02
About:
FEM_SETPOS mean set text line ? If i have 100 text lines. And i want set carret to 80 line.
FEM_GETPOS
FEM_FINDFIRST
FEM_FINDNEXT
FEM_GETSEARCHTEXT its mean in my buffer copy find text ?

I right understood ?:
Code:
.data
 pString db 'Find word',0
.code
invoke SendMessage,[hwnd],FEM_FINDFIRST,0,pString ;whatch in eax return ?

invoke SendMessage,[hwnd],FEM_SETPOS,0,80 ;this crash
    
Post 21 Feb 2019, 18:02
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 21 Feb 2019, 18:53
FEM_GETPOS/FEM_SETPOS expect FEPOS structure passed through pointer in wparam:
Code:
struct FEPOS
  selectionPosition dd ?
  selectionLine     dd ?
  caretPosition     dd ?
  caretLine         dd ?
ends    

As for FEM_FINDFIRST/FEM_FINDNEXT, they return boolean value, telling whether text has been found or not. The selection and caret are automatically moved to the boundaries of found text.
Post 21 Feb 2019, 18:53
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 22 Feb 2019, 05:00
Problem. FEDIT window back on main window.
And I must press Alt+Tab to see FEDIT window.
When I click on main window FEDIT disappears and I must again press Alt+Tab to see FEDIT window.
How fix this ? "Edit" window work fine and not disappears
Code:
invoke  CreateWindowEx,WS_EX_LAYERED,_fedit,_title,\
WS_VISIBLE+WS_POPUP+WS_VSCROLL+WS_HSCROLL+ FES_CONSOLECARET+FES_AUTOINDENT+FES_OPTIMALFILL+FES_TIMESCROLL, \
                               128,128,512,512,NULL,NULL,[wc.hInstance],NULL
    


Last edited by Roman on 22 Feb 2019, 05:19; edited 1 time in total
Post 22 Feb 2019, 05:00
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 22 Feb 2019, 05:15
I fix.
WS_EX_LAYERED+WS_EX_TOPMOST
Now work fine.
Post 22 Feb 2019, 05:15
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 22 Feb 2019, 10:11
Unless you do something unusual, you should create FEDIT as a child of your main window:
Code:
invoke  CreateWindowEx,WS_EX_LAYERED,_fedit,_title,WS_CHILD+\
WS_VISIBLE+WS_POPUP+WS_VSCROLL+WS_HSCROLL+ FES_CONSOLECARET+FES_AUTOINDENT+FES_OPTIMALFILL+FES_TIMESCROLL, \
                               128,128,512,512,[main_hwnd],NULL,[wc.hInstance],NULL    
WS_EX_TOPMOST only makes sense for something like a floating toolbox.
Post 22 Feb 2019, 10:11
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 25 Feb 2019, 08:36
How get selected text from FEDIT ?
I know WM_COPY.

Is exist another way get selected text ?

And how work invoke SendMessage,[hwnd_fedit],FEM_GETWORDATCARET,2,TextBuffer ?
Post 25 Feb 2019, 08:36
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 25 Feb 2019, 09:44
Yes, to get the selected text exactly, WM_COPY is the only way. Alternatively you can use FEM_GETPOS to find the line numbers and then FEM_GETLINELENGTH/FEM_GETLINE to get contents of individual lines.

For FEM_GETWORDATCARET wparam is the length of the buffer and lparam points to the buffer. The buffer is filled with a single word that the cursor is currently at (for example F1 key in fasmw uses this function).
Post 25 Feb 2019, 09:44
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 14 Dec 2020, 08:20
Where to get FEDIT.dll 64 bit ?
Post 14 Dec 2020, 08:20
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 14 Dec 2020, 09:00
Or only exists 32 bit FEDIT.DLL
Post 14 Dec 2020, 09:00
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20357
Location: In your JS exploiting you and your system
revolution 14 Dec 2020, 09:18
fasm is 32-bit. fasmw is 32-bit. fedit.dll is 32-bit.
Post 14 Dec 2020, 09:18
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 14 Dec 2020, 13:16
How set font size for FEDIT ?
I mean this:
invoke SendMessage,[FEDIThwnd],SetFontSize,0,22

I try CreateFont and this work !
Code:
FontName db 'Courier New',0
CLEARTYPE_QUALITY = 5
        invoke  CreateFont, 27, 0, 0, 0, 0,0,0,0,DEFAULT_CHARSET, OUT_RASTER_PRECIS, CLIP_DEFAULT_PRECIS,\
                            CLEARTYPE_QUALITY,FIXED_PITCH , FontName
invoke  SendMessage,[FEDIThwnd],WM_SETFONT,eax,1
    
Post 14 Dec 2020, 13:16
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 14 Dec 2020, 15:35
How send message FEDIThwnd undo and redo ?
Post 14 Dec 2020, 15:35
View user's profile Send private message Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 719
Ali.Z 15 Dec 2020, 01:59
it really confuses me, like what do you want to achieve with fedit.dll?
there is no big use of fedit.dll, its only used to be a dialog manager in case of asmdemo.

_________________
Asm For Wise Humans
Post 15 Dec 2020, 01:59
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20357
Location: In your JS exploiting you and your system
revolution 15 Dec 2020, 05:19
fasmw uses fedit for the main editing window.
Post 15 Dec 2020, 05:19
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1807
Roman 15 Dec 2020, 08:32
Oh ! Its easy.
WM_UNDO
WM_CUT
FEM_REDO
Post 15 Dec 2020, 08:32
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.