Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / BlueGUI problem trying to manipulate richedit gadgets

Author
Message
sladeiw
14
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 17th May 2009 02:30
Hi I don't know if anyone will be able to help with this particular problem, but it's basically got me beat. All(!) I want to do is modify the tab stops in a rich edit gadget. AFAIK there is no way to do this with the bluegui commands, so I am trying to do it manually with a dll call (SendMessageA EM_SETPARAFORMAT).

If anybody thinks they may be able to help then please reply and I will post much more detail on what I have tried with some example non-working code. (Or just tell me its definitely not possible with bluegui richedit gadgets and I'll give up!)

Thanks
sladeiw
14
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 30th May 2009 16:50
Well i gave up on setting the tabs, but a much simpler question has arisen:

Is there any way in bluegui to retrieve the rich text including formatting (ie bold etc) from a rich edit gadget?

Its such a shame that development on BlueGUI stopped because it is a great plugin which is 95% of the way there and an amazing achivement at making windows gadgets "simple". It just has some annoying limitations (not the fault of the author!) and makes me think i'll eventually have to bite the bullet and learn vb or some other language that can access the windows api's directly.

Any more news on whether someone else is going to take up the torch if/when bluegui goes free?
Fitz marc ade
17
Years of Service
User Offline
Joined: 1st Jan 2007
Location: Somewhere near the Milkyway...
Posted: 4th Jul 2009 18:25
@ sladiew,
I dont exactly what you are trying to do with the Tabs?

all you need to do is try the paddy example and change the line in CreateUI(). Below:-


change to:-


then you can complete the editing of text with:-

getSelColor
getSelFont
setWordWrapMode


If you want icons in tabs then you will need an ImageList gadget i suppose, if it can be done or not i havent tried yet.

Don't know if this helps or not?
sladeiw
14
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 4th Jul 2009 23:20
Thanks for your help, but I gave up trying! What I was actually trying to do was change the default tab positions in a richedit box. ie. When you're editing in notepad or whatever, press tab and the cursor skips to the next `tab stop`. These can be set by an api call with a table containing where you want them. (SendMessageA EM_SETPARAFORMAT)

Anyway, as I said I gave up and stuck with the default positions. It was only a minor tweak. I have definitely learned a lot about bluegui/api stuff recently so I may go back to it in the future.

Thanks for the reply anywsy
sladeiw
14
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 4th Jul 2009 23:29
Oh, and I managed to suss retrieving the formatting from a richedit. The main problem was not modifiying the richedit in realtime, but recovering the formatting information so that if you save a piece of rich text, you can then re-load it and put it back into the richedit and re-create all the formatting information.

Basically, using bluegui you need to step through each character and retrieve the style attributes and then build a corresponding style list, and then apply that back to each character when you rebuild the richedit. Also, the positioning commands in richedits dont count linefeeds so you have to offset it by the number of linefeeds preceeding the character you're modifying.

It was much fun, but now I have a proper mini word-processor with bold/colours etc.

Login to post a reply

Server time is: 2024-04-20 08:05:40
Your offset time is: 2024-04-20 08:05:40