Author Topic: The color changing bug.  (Read 13611 times)

rsala

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #15 on: March 21, 2015, 05:32:47 AM »
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

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #16 on: March 21, 2015, 06:30:07 AM »
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

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #17 on: March 24, 2015, 09:22:14 AM »
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

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #18 on: March 25, 2015, 03:41:43 AM »
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

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #19 on: March 25, 2015, 11:20:33 AM »
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

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #20 on: April 08, 2015, 12:48:29 AM »
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

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #21 on: April 12, 2015, 04:41:08 PM »
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

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #22 on: August 07, 2015, 06:46:38 AM »
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

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #23 on: August 08, 2015, 01:06:12 PM »
Hi,

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

rsala

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #24 on: August 08, 2015, 04:47:25 PM »
Great!

Thanks.
EC coder

AssemblyChallenge

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #25 on: August 14, 2015, 12:48:10 AM »
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

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #26 on: August 14, 2015, 05:00:38 PM »
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

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #27 on: August 18, 2015, 10:05:05 PM »
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

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #28 on: August 18, 2015, 10:30:31 PM »
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

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #29 on: August 19, 2015, 07:20:40 AM »
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: