News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

The color changing bug.

Started by AssemblyChallenge, February 16, 2015, 11:30:27 PM

Previous topic - Next topic

rsala

By the way, the editor part is not an Edit control, it's a complete editor programmed by me. Actually it is an Easy Code module because the EC IDE is just a visual project, that is, Easy Code is a visual project built by itself.
EC coder

AssemblyChallenge

Roger that.

What I mean is: the "native" Windows component where you write the text.

My wild guessing was: EC is a Main window with MDI childs (Editor, Designer, etc) and inside that Editor child, maybe some enlarged Edit Control :lol: where you actually type the code.

The idea is to understand how is made so I can help you searching for a similar problem in someone else's project.  :bgrin:

rsala

Hi,

I am sorry if I misunderstanding you.

The Easy Code Editor is a Windows window, of course, but anything else, no Windows controls. I paint the background and the text according to the settings for the colors and font, so if the background color is not changed I do not understand why you get a white background.

I will try to redraw the background when the editor gets the focus, maybe it will solve the problem.

Regards  :t
EC coder

AssemblyChallenge

A color changed EC is still opened. If I attach Ollydbg to it, is there any chance we can get some useful info (address, structure, whatever) ?

rsala

Well I am not sure, but I am affraid it will be difficult.

I will send you the sources of the editor module.
EC coder

AssemblyChallenge

A mini-update:

* Last week finished a small program. For the very first time and out of the blue, the color changed while editing the project, doing normal stuff. I'm guessing this piece of info could help you.

* Still reading the code you sent (by the way, thank you , I still feel humble about it).

rsala

Sorry for the delay, I've been outside for a pair of days.

Thanks for your help once again.

I am really sorry but I am not able to fire the color change problem.

EC coder

rsala

Hi AssemblyChallenge,

I think I could solve the color changing bug. Please try the attached executable.

Replace your EasyCode.exe file, in the \EasyCode.Ms\Bin folder with the one attached to this post.

Thanks for your help,

Ramon
EC coder

AssemblyChallenge

Hi,

Downloaded and testing in progress. Will let you know  :t

rsala

EC coder

AssemblyChallenge

Well, so far so good  :bgrin:

Or at least for now. Generally it changed after several hours or from one day to another.
Still missing the suspend part; that one will be today in the afternoon.

Any info about the possible cause ?? This is, by far, my favourite bug in EC  :lol:

rsala

Hi,

Well, in fact I do not know why it happens. What I did is processing the WM_POWERBROADCAST message. When Windows "wakes up" and the POWERBROADCAST message is received, the editor is redrawn.

It seems to work!
EC coder

AssemblyChallenge

Damn, version 0.8 not fixed yet  :(

It didn't survive the suspend test (for several days). On the bright side, now we get the worst from both worlds  :lol: :lol: so take a look at the attachment for a mix of a color changed - line number damaged beast  :lol:

Greetings.

rsala

Thanks once again for your help!

Damn, each time it's worse. It seems I'll have to work hard to find out the problem.

I'll be in touch.

Ramon
EC coder

AssemblyChallenge

Hum, very interesting.

I was checking the other bug with INI files and got this... hunch. In the sense that maybe, just maybe could be related with Windows's internal color constants. Please, take a look at the attached PDF; as a programmer you surely know must part of that stuff. Still, I see my background color (black) set as 0x80000001 (which is also Desktop Color) in EC.

Not sure if this helps but, who knows, give it a try  :bgrin: