Author Topic: An implemention of ITextHost wo works only with windbg  (Read 13776 times)

qWord

  • Member
  • *****
  • Posts: 1475
  • The base type of a type is the type itself
    • SmplMath macros
Re: An implemention of ITextHost wo works only with windbg
« Reply #15 on: August 25, 2012, 10:09:47 PM »
It must be perfect now.
run your program, open the task manager and look for the CPU usage - its far away from perfect.
MREAL macros - when you need floating point arithmetic while assembling!

TouEnMasm

  • Member
  • *****
  • Posts: 1764
    • EditMasm
Re: An implemention of ITextHost wo works only with windbg
« Reply #16 on: August 26, 2012, 03:07:58 AM »

seem he consume some times of the processor.
Perhaps have you an idea ?.
Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1764
    • EditMasm
Re: An implemention of ITextHost wo works only with windbg
« Reply #17 on: August 26, 2012, 03:22:26 AM »

The more simple is responsible of this
Quote
invoke DrawText,hdc,addr asciihello, LENGTHOF asciihello -1,addr rect,DT_CENTER

I will search a little,perhaps msdn will answer.
Fa is a musical note to play with CL

qWord

  • Member
  • *****
  • Posts: 1475
  • The base type of a type is the type itself
    • SmplMath macros
Re: An implemention of ITextHost wo works only with windbg
« Reply #18 on: August 26, 2012, 03:35:44 AM »
The InvalidRect() must not be called from WM_PAINT. The invalidation forces the system to resend WM_PAINT endless. Call the function when the state of the graphic object has change (e.g. after creation).
MREAL macros - when you need floating point arithmetic while assembling!

TouEnMasm

  • Member
  • *****
  • Posts: 1764
    • EditMasm
Re: An implemention of ITextHost wo works only with windbg
« Reply #19 on: August 26, 2012, 03:54:53 AM »

ALL is good now
I have just replace the DrawText function by the DrawTextEx and added a NULL parameter that all.
Now that all is good ,I have deleted the InvalidateRect function.
I change the textdraw_final.zip in the post,so you can see the difference.
I have not searched why DrawText don't want to work,all parameter are good.
Fa is a musical note to play with CL