Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-02

Need help about CreateWindowEx

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

FreeMan

Hello,
I'm trying port components from delphi to lazarus, cross platform and QT widgetset
CreateWindowEx On this winAPI I stoped and no info much for convert to widgetset. Can anyone has anyidea?
What is aqual CreateWindowEx, DestroyWindow in linux QT widgetset? My system is Kubuntu x64 and last svn fpc & lazarus Thank you

procedure CreateToolTip;
begin
   fhToolTip := CreateWindowEx(0, 'Tooltips_Class32', nil, TTS_ALWAYSTIP
or TTS_BALLOON or TTS_NOPREFIX,
     Integer(CW_USEDEFAULT), Integer(CW_USEDEFAULT),Integer(CW_USEDEFAULT),
     Integer(CW_USEDEFAULT), Handle, 0, hInstance, nil);
   if fhToolTip  0 then
     SetWindowPos(fhToolTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or
SWP_NOSIZE or SWP_NOACTIVATE);
end;
procedure DestroyToolTip;
begin
   DestroyWindow(FHToolTip);
end;

Reply by email

Kostas Michalopoulos
to FreeMan

It looks like the code tries to create a tooltip window. I think Lazarus provides this functionality by itself in a cross-platform way, so you may want to look up that and replace the functionality there. An alternative would be to create the tooltip window yourself.

The code you show isn't just creating any window, but it creates a window of the class "Tooltips_Class32" specifically which AFAIK provides the tooltip functionality. So what you need to replace isn't the CreateWindow part (that would be easy), but the tooltip functionality part.

FreeMan wrote 32 lines
Hello, I'm trying port components from delphi to lazarus, cross platform and QT widgetset CreateWindowEx On this winAPI I stoped and no info much for convert to widgetset. Can anyone has anyidea? What is aqual CreateWindowEx, DestroyWindow in linux QT widgetset? My system is Kubuntu x64 and last svn fpc & lazarus Thank you procedure CreateToolTip; begin fhToolTip := CreateWindowEx(0, 'Tooltips_Class32', nil, TTS_ALWAYSTIP or TTS_BALLOON or TTS_NOPREFIX, Integer(CW_USEDEFAULT), Integer(CW_USEDEFAULT),Integer(CW_USEDEFAULT), Integer(CW_USEDEFAULT), Handle, 0, hInstance, nil); if fhToolTip 0 then SetWindowPos(fhToolTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE); end; procedure DestroyToolTip; begin DestroyWindow(FHToolTip); end; -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140216/b264f302/attachment.html>

Reply by email

zeljko
to FreeMan: I'm trying port components from delphi to lazarus, cross platform and QT widgetset…
FreeMan wrote 25 lines
Hello, I'm trying port components from delphi to lazarus, cross platform and QT widgetset CreateWindowEx On this winAPI I stoped and no info much for convert to widgetset. Can anyone has anyidea? What is aqual CreateWindowEx, DestroyWindow in linux QT widgetset? My system is Kubuntu x64 and last svn fpc & lazarus Thank you procedure CreateToolTip; begin fhToolTip := CreateWindowEx(0, 'Tooltips_Class32', nil, TTS_ALWAYSTIP or TTS_BALLOON or TTS_NOPREFIX, Integer(CW_USEDEFAULT), Integer(CW_USEDEFAULT),Integer(CW_USEDEFAULT), Integer(CW_USEDEFAULT), Handle, 0, hInstance, nil); if fhToolTip 0 then SetWindowPos(fhToolTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE); end; procedure DestroyToolTip; begin DestroyWindow(FHToolTip); end;

You cannot use that with cross apps, it's windows specific .. https://qt-project.org/doc/qt-4.8/qtooltip.html or THintWindow in lazarus. MyHint := THintWindow.Create() ...etc.

zeljko

Reply by email