Recent

Author Topic: [solved] FPGui Winhandle  (Read 2707 times)

relocate

  • New member
  • *
  • Posts: 7
[solved] FPGui Winhandle
« on: February 22, 2018, 11:14:35 am »
Hi there,

I'm using pure FP with FPGui (no Lazarus) with windows (at the moment).
I want to get the window Handle of the Mainform within my application, but whatever I do, I get 0.

I tried even include windows.pas to use Findwindow to find the own Window, but even then I can only get 0.
Does anyone knows how to get the Mainform Windowshandle.

Furthermore I want to create a window with CreateWindow within this application (therefore I need the handle) because I want to use an extended control.

Greetings relocate
« Last Edit: February 22, 2018, 01:54:53 pm by relocate »
OS, Lazarus, FPC: Win (no Lazarus, FPC 2.4.4) | CPU-Target: 32Bit

relocate

  • New member
  • *
  • Posts: 7
Re: [solved] FPGui Winhandle
« Reply #1 on: February 22, 2018, 01:59:32 pm »
Hi,

everything is fine now.
I've tested it with the Windows Messagebox. The first time I've tried it, the window hasn't been created, although I thought it has been.
And the second time, the window allready has been destroyed, although I thought it hasn't.
I now called another procedure during the running program and it showed me the widget windowhandle I'd expected. And even createwindow works fine now.
I use it, until I probably made up a own widget for fpgui.

Greetings relocate
« Last Edit: February 22, 2018, 02:01:40 pm by relocate »
OS, Lazarus, FPC: Win (no Lazarus, FPC 2.4.4) | CPU-Target: 32Bit