Welcome, Guest
Username: Password: Remember me
General Purpose Components and Libraries, discussions, problems and suggestions

TOPIC:

Re: [LAB] Cindy components 10 years 7 months ago #2121

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4441
  • Thank you received: 1073
We waiting your release Sir

Is a good idea to make pl_Cindy sub-forum?
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Re: [LAB] Cindy components 10 years 7 months ago #2122

  • Mauricio
  • Mauricio's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 7
What is pl_Cindy sub-forum ?

Mauricio

Please Log in or Create an account to join the conversation.

Re: [LAB] Cindy components 10 years 7 months ago #2123

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4441
  • Thank you received: 1073
General Purpose/pl_Cindy category
at this forum
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Re: [LAB] Cindy components 10 years 7 months ago #2124

  • Mauricio
  • Mauricio's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 7
Single forum is good for me: more simple to monitor.

Mauricio

Please Log in or Create an account to join the conversation.

Re: [LAB] Cindy components 10 years 7 months ago #2127

  • mtbf40
  • mtbf40's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 24
  • Thank you received: 0
Thx for your answers :)

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 10 years 7 months ago #2183

  • Mauricio
  • Mauricio's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 7
Cindy v5.0 released (for Delphi) !

Cindy website

Added DBExpress components and the major news is ... TcyDocER (may be easy to port ;) )

TcyDocER extract document information (mail, phone, amounts etc ...) using OCR results from any source like Tesseract (open source) or Transym (comercial but cheap, fast, easy and powerful). There' s no demo of TcyDocER for now but i will working on it!

Regards,
Mauricio

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 10 years 7 months ago #2184

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4441
  • Thank you received: 1073
Thanks Sir
we will work on this version
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 10 years 7 months ago #2185

  • RockyLuck
  • RockyLuck's Avatar
  • Visitor
  • Visitor
@mauriciopt:
I enjoy the enthusiasm you exhibit in releasing new Cindy features.

However, the CodeTyphon port does not work very well.

I would very much appreciate it if you could have a look at the pervasive problem of glyphs on buttons.
Will you have a look at this topic: Topic 1796
The problem, ie why it does not work, is explained there.

Thanks!



Please Log in or Create an account to join the conversation.

Last edit: by RockyLuck. Reason: Wrong topic number

[LAB] Cindy components 10 years 7 months ago #2186

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4441
  • Thank you received: 1073
Sir
always you can help us and
with your Cindy source modifications...
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

[LAB] Cindy components 10 years 7 months ago #2187

  • RockyLuck
  • RockyLuck's Avatar
  • Visitor
  • Visitor

sternas wrote: Sir
always you can help us and
with your Cindy source modifications...

The problem is not with the Cindy components. The problem is with the inadequate port of Lazarus of the Windows message structure. In this case, the CN_DRAWITEM message is not sent (needed by TcyBaseButton to draw the glyph), because the WM_DRAWITEM Windows message is not handled by Lazarus. :angry:

This may be cured, but only if one has intimate knowledge of the Cindy software. Someone (and I presumed mauriciopt is the right person for that) has to look into this and come up with an alternative for the dead CN_DRAWITEM handler.

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 10 years 7 months ago #2188

  • Mauricio
  • Mauricio's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 7
@RockyLuck: i anderstand what' s the problem but:
- i don' t have any experience with Lazarus.
- I' don' t participate on "Cindy for Lazarus"
Maybe, this will change one day ...

I' m pretty sure that the persons who are porting Cindy will find a solution.

Mauricio

PS: TcyDocER (very great component, no demo for now) have been developped with in mind its port for Lazarus.
I think that its port will be very easy.

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 10 years 7 months ago #2189

  • RockyLuck
  • RockyLuck's Avatar
  • Visitor
  • Visitor

mauriciopt wrote: @RockyLuck: i understand what' s the problem but:
- i don' t have any experience with Lazarus.
- I' don' t participate on "Cindy for Lazarus"

If you cannot solve this, at least can you give us some pointers in which direction to look when the WM_DRAWITEM message is not present.

Which alternative method would you pursue?

Thanks a million.

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 10 years 7 months ago #2191

  • Chris
  • Chris's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 54
  • Thank you received: 4
there's mention of the LM_DRAWITEM (Lazarus equivalent of WM_DRAWITEM) here;

www.lazarus.freepascal.org/index.php/top...g24167.html#msg24167

LuizAmerico mentioned;

2) Under LCL/win32 the draw of button is done in response to a LM_DRAWITEM message. The other widget sets can do this? Or should the win32 response be moved to a LM_PAINT message?

does it just need some conditional defines and some Lazarus equivalence around the relevant code?

TheBlackSheep

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 10 years 6 months ago #2195

  • RockyLuck
  • RockyLuck's Avatar
  • Visitor
  • Visitor

TheBlackSheep wrote: there's mention of the LM_DRAWITEM (Lazarus equivalent of WM_DRAWITEM) here;

www.lazarus.freepascal.org/index.php/top...g24167.html#msg24167

LuizAmerico mentioned;

2) Under LCL/win32 the draw of button is done in response to a LM_DRAWITEM message. The other widget sets can do this? Or should the win32 response be moved to a LM_PAINT message?

does it just need some conditional defines and some Lazarus equivalence around the relevant code?

TheBlackSheep


I know that. The message processor in TcyBaseButton (unit cyBaseButton) does say (note the 9999 comment of the conversion by CodeTyphon):

Line 70:  procedure CNDrawItem(var Message: TLMDrawItems); message LM_DRAWITEM;  // 9999 TWMDrawItem = TLMDrawItems

but that procedure is never called, because LM_DRAWITEM never comes.

The reason for that is, that the LM_DRAWITEM message is only sent for owner drawn items (like the status panels in a TStatusBar). But it is not sent for drawing basic buttons. In Delphi, part of the logic in changing the visibility of a basic button is to generate the CN_DRAWITEM message.

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 10 years 6 months ago #2196

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4441
  • Thank you received: 1073
Guys
I think it's LCL error, not trigger LM_DRAWITEM

and the Experimental Lab pl_Cindy version for test...
PilotLogic Architect and Core Programmer
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

[LAB] Cindy components 10 years 6 months ago #2198

  • RockyLuck
  • RockyLuck's Avatar
  • Visitor
  • Visitor

sternas wrote: Guys
I think it's LCL error, not trigger LM_DRAWITEM

and the Experimental Lab pl_Cindy version for test...


I already showed that it's an LCL error. The experimental lab version did not change a thing :S

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 10 years 6 months ago #2199

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31
Let's clear something once for all:

LM_DRAWITEM is replacement for WM_DRAWITEM, not for CN_DRAWITEM!

In Delphi CN_DRAWITEM is defined like:

CN_DRAWITEM = CN_BASE + WM_DRAWITEM;

In Lazarus CN_DRAWITEM is defined like:

CN_DRAWITEM = CN_BASE + LM_DRAWITEM;

Original procedure in cyBaseButton looks like this:

procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM;

so it should be like

procedure CNDrawItem(var Message: TLMDrawItems); message CN_DRAWITEM;

in Lazarus.

Hope this will help. I do not have time to test, and do not have Windows machine with installed CT.

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 10 years 6 months ago #2200

  • RockyLuck
  • RockyLuck's Avatar
  • Visitor
  • Visitor
@Viking: probably a very good point. :cheer: But it did not help unfortunately :S The message LM_DRAWITEM is simply not generated.

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 10 years 6 months ago #2202

  • Aleksandar
  • Aleksandar's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 150
  • Thank you received: 31

RockyLuck wrote: @Viking: probably a very good point. :cheer: But it did not help unfortunately :S The message LM_DRAWITEM is simply not generated.


Would you please make simple steps to reproduce and if possible images with result as it should be (from Delphi) as what you actually get (in Lazarus). That would probably help us all to understand what we get and what we trying to accomplish.

I will try to install CT in some Windows machine when I find some time and to see can I somehow help with this.

Please Log in or Create an account to join the conversation.

[LAB] Cindy components 10 years 6 months ago #2203

  • RockyLuck
  • RockyLuck's Avatar
  • Visitor
  • Visitor
@Viking: your assumption that the message to catch was CN_DRAWITEM was understandable, probably this should have happened, but it was not correct. This is the code for handling the WM_DRAWITEM in function WIndowProc (file Win32callback.inc):

WM_DRAWITEM:
    begin
    .
    .
        end else
        begin
          with TLMDrawItems(LMessage) do
          begin
            Msg := LM_DRAWITEM;
            Ctl := 0;
            DrawItemStruct := PDrawItemStruct(LParam);
          end;

So, no translation to CN_DRAWITEM there.

Windows is responsible for generating the WM_DRAWITEM message. It does that if the control is "OwnerDrawn". That's what basically is wrong with the LCL implementation: the control is not set to owner drawn (Delphi does this correctly).

I inserted an override for CreateParams in cyBaseButton:

procedure CreateParams(var Params: TCreateParams); override;
    .
    .
procedure TcyBaseButton.CreateParams(var Params: TCreateParams);
begin
   inherited CreateParams(Params);
   with Params do Style := Style or BS_OWNERDRAW;
end;

That did something! Some buttons started to look more or less OK. Some would only show if clicked. I recompiled Lazarus with this change in the pl_Cindy package and strangely enough at design time the buttons now showed only their caption :S

What it does show is that Cindy will only run in a Windows environment with some of its controls. That is not what I'm looking for. :angry:

Please Log in or Create an account to join the conversation.