Sign in Join

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

Mailing lists / lazarus / 2003-09

LCL: TApplication.FHandle

10 messages · 6 people ·

Reply by email Subscribe to this list Your subscription

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

Micha Nelissen
to Micha Nelissen: Where is TApplication.FHandle used for? It does not seem to be used. Is it for future…
Micha Nelissen wrote
Where is TApplication.FHandle used for? It does not seem to be used. Is it for future functionality, and if so, can it be coded?

In the Delphi VCL it's the "master" window, not visible, but representing the button on the taskbar. It implements TApplication.Title. Would it be possible for the LCL to request create this master window? I am not sure if this would be useful for the GTK.

Thoughts appreciated,

Micha.

Reply by email

Nikolai Zhubr
to Micha Nelissen: Where is TApplication.FHandle used for? It does not seem to be used. Is it for future…

Hi,
Monday, 29 September, 2003, 18:49:01, Michael Van Canneyt wrote: [...]

I'm not sure, but windows allocates a handle for each started process. My guess was that Application.Handle represents this handle.

No, IIRC delphi's TApplication explicitely creates an invisible window which subsequentally becomes a parent window for all forms' windows. This results, for example, in that there are no separate buttons for each form on the taskbar but just one. This invisible mega-parent is kept in Application.Handle. It sometimes appears usefull to do

     SetForegroundWindow(Application.Handle);
     ShowWindow(Application.Handle, SW_RESTORE);

to get user's attention :)

Best regards, Nikolai Zhubr > However, looking at the VCL code, it doesn't look at this at all... > so I'm as confused as you are ... > Michael. > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

DMo2
to Marc Weustink: + From: Micha Nelissen + Sent: maandag 29 september 2003 15:58 + + + > Where is…

I have problem with compile module INTERFACE
I've got message:

win32winapih.inc(52,10) Error: There is no method in an ancestor class to be overridden: "TWin32Object.CreateDIBSection(HDC,const tagBITMAPINFO, Longword,var Pointer, HANDLE, Longword):DWord"

I discover that is problem with Thandle

in WINDOWS.PP (base.inc) is:

  Thandle= HANDLE = type Cardinal;
in CLASSES (classesh.inc)
  THANDLE = longint;

I use FPC 1.1

In FPC1.0 in WINDOWS was

HANDLE = longint; { or should it be cardinal ?? PM }

I don't know how to avoid this problem

Darek

Reply by email

Michael Van Canneyt
to Micha Nelissen: Where is TApplication.FHandle used for? It does not seem to be used. Is it for future…
Micha Nelissen wrote 12 lines
Michael Van Canneyt wrote: > > On Mon, 29 Sep 2003, Micha Nelissen wrote: > >>Where is TApplication.FHandle used for? It does not seem to be used. Is >>it for future functionality, and if so, can it be coded? > > > It should be filled with the windows program handle. Which is what exactly?

I'm not sure, but windows allocates a handle for each started process. My guess was that Application.Handle represents this handle.

However, looking at the VCL code, it doesn't look at this at all... so I'm as confused as you are ...

Michael.

Reply by email

Marc Weustink
to Micha Nelissen: In the Delphi VCL it's the "master" window, not visible, but representing the button on…

+ From: Micha Nelissen
+ Sent: maandag 29 september 2003 15:58
+
+ Micha Nelissen wrote:
+
+ > Where is TApplication.FHandle used for? It does not seem to
+ > be used. Is it for future functionality, and if so, can it
+ > be coded?
+
+ In the Delphi VCL it's the "master" window, not visible, but
+ representing the button on the taskbar. It implements
+ TApplication.Title. Would it be possible for the LCL to request create
+ this master window? I am not sure if this would be useful for the GTK.

For win32 it is. TApplication.Handle is indeed the handle of a 0x0 size window.
All forms with Application as owner are the child of this window. This is (at least ion win32) Focussing and enable/disable is handled.

If you write for instance dll's with forms, you can assign the handle of your mainappwindow to your dll.application.handle to control focus etc.

I don't know if this is a way to tell gtk that there is only one app running. I'll look at it (some day)

Marc

Reply by email

Micha Nelissen

Hi,

Where is TApplication.FHandle used for? It does not seem to be used. Is it for future functionality, and if so, can it be coded?

Regards,

Micha.

Reply by email

DMo2
to Marc Weustink: + From: Micha Nelissen + Sent: maandag 29 september 2003 15:58 + + + > Where is…

But from FPC I've got message : there is no problem with it (with THandle all is OK)
and I need 1.1 FPC

Darek

Earlier message 58 lines
----- Original Message ----- From: "Yoyong Hernan" To: Sent: Thursday, October 02, 2003 3:05 AM Subject: Re: [lazarus] INTERFACE is not compile > As far as I know, 1.1 is not yet stable for Lazarus. Try 1.0.10 instead. > > > ----- Original Message ----- > From: "DMo2" > To: > Sent: Tuesday, September 30, 2003 1:46 AM > Subject: [lazarus] INTERFACE is not compile > > > > I have problem with compile module INTERFACE > > I've got message: > > > > win32winapih.inc(52,10) Error: There is no method in an ancestor class to > be > > overridden: "TWin32Object.CreateDIBSection(HDC,const tagBITMAPINFO, > > Longword,var Pointer, HANDLE, Longword):DWord" > > > > I discover that is problem with Thandle > > > > in WINDOWS.PP (base.inc) is: > > > > Thandle= HANDLE = type Cardinal; > > > > in CLASSES (classesh.inc) > > THANDLE = longint; > > > > > > I use FPC 1.1 > > > > In FPC1.0 in WINDOWS was > > > > HANDLE = longint; { or should it be cardinal ?? PM } > > > > I don't know how to avoid this problem > > > > Darek > > > > > > > > > > _________________________________________________________________ > > To unsubscribe: mail with > > "unsubscribe" as the Subject > > archives at http://www.lazarus.freepascal.org/mailarchives > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Yoyong Hernan
to Marc Weustink: + From: Micha Nelissen + Sent: maandag 29 september 2003 15:58 + + + > Where is…

As far as I know, 1.1 is not yet stable for Lazarus. Try 1.0.10 instead.

Earlier message 42 lines
----- Original Message ----- From: "DMo2" To: Sent: Tuesday, September 30, 2003 1:46 AM Subject: [lazarus] INTERFACE is not compile > I have problem with compile module INTERFACE > I've got message: > > win32winapih.inc(52,10) Error: There is no method in an ancestor class to be > overridden: "TWin32Object.CreateDIBSection(HDC,const tagBITMAPINFO, > Longword,var Pointer, HANDLE, Longword):DWord" > > I discover that is problem with Thandle > > in WINDOWS.PP (base.inc) is: > > Thandle= HANDLE = type Cardinal; > > in CLASSES (classesh.inc) > THANDLE = longint; > > > I use FPC 1.1 > > In FPC1.0 in WINDOWS was > > HANDLE = longint; { or should it be cardinal ?? PM } > > I don't know how to avoid this problem > > Darek > > > > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email