lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello,

thanks but -

On Mon, 11 May 2020 18:51:59 +0200, Paul K <paul@zerobrane.com> wrote:

Hi Lukas,

and this value should be transformed somehow into wxWidget object and into Lua/wx userdata ("class" - with a specific metatable)

You should probably look at wxNativeWindow class
(https://docs.wxwidgets.org/trunk/classwx_native_window.html), which
can "create a window from an existing native window handle." and then
use wxMessageDialog to reference the native window as its parent.

1. It seems that parent must have been defined (= non-NULL) and must be of "wxWindow *" type:

"parent: A non-NULL parent window. For the platforms where the parent is used for creating the native window (e.g. MSW), this must be the wxWindow corresponding to the parent handle used when creating the native window."

So I have still the problem - how to create "wxWindow *" from HWND?

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).

So - any other way?

Lukas

Paul.

On Mon, May 11, 2020 at 9:26 AM Procházka Lukáš Ing. <LPr@pontex.cz> wrote:

Hello,

this is specific for wxWidgets/Lua and Windows:

Suppose that in WinAPI, windows are handled by HWND, which is a pointer.

This pointer can be retrieved e.g. by "GetConsoleWindow()" (WinAPI function) - and this value should be transformed somehow into wxWidget object and into Lua/wx userdata ("class" - with a specific metatable) -

- simply: I need e.g. GetConsoleWindow() (WinAPI, C) to become a parent of e.g. "wx.wxMessageBox()" (wxLua).

How to achieve this?

Best regards,

Lukas

_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org