[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: wxLua - HWND to Lua wx object
- From: Procházka Lukáš Ing. <LPr@...>
- Date: Thu, 14 May 2020 18:18:11 +0200
Hello Paul,
On Wed, 13 May 2020 03:54:02 +0200, Paul K <paul@zerobrane.com> wrote:
Hi Lukas,
For some reason I assumed that the window would be part of
wxwidgets/wxlua app.
Yes, that's right.
I'm trying to create a wxLua window (a dialog actually) whose parent should be a window (so the dialog will be always on top of the parent window) which I'm able to get HWND (WinAPI - e.g. 'GetConsoleWindow()') of only;
and that HWND can be passed to a Lua app e.g as a string (I can provide);
my idea is: convert HWND (C) -> (void *) (C) -> convert to string "0x12345678" -> pass to Lua function as string -> Lua function to convert the string somehow to obtain wxWidget/wxLua userdata.
Or theoretically I could write a simple C app (lib - .dll) which would provide a function which would take a HWND and return appropriate wxWidgets/wxLua userdata; but I'm not so experienced with wxWidgets to write such app (lib).
How to provide this?
Best regards and thanks for your answer.
Lukas
If not, why not make the Windows API call instead
of wxwidgets?
So I have still the problem - how to create "wxWindow *" from HWND?
There is wxWindowMSW::SubclassWin(WXHWND hWnd) to convert a handle
into wxWindow, but it may not be available, even though you may have
access to methods that it uses, so you can implement the same logic
yourself.
2. It seems that "wxNativeWindow" or its functions are not exported in wxLua (working with "wxLua-2.8.12.3-Lua-5.1.5-MSW-Ansi.zip" here).
Yes, it's not available in wxlua, but shouldn't be difficult to add.
Let me know if you decide to try this path and I can add it to wxlua
in the repository I maintain (https://github.com/pkulchenko/wxlua).
Paul.
--
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4
Mob.: +420 702 033 396
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org