lua-users home
lua-l archive

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

Great, thanks!

Love the library btw. One side-question, when I set my dialog to minimize to the system tray, it doesn't display the TRAYICON. My guess is that this is because the icon is 32x32 and not 16x16, although I'm confused why it is automatically scaled down for the dialog (i.e. its ICON attribute) and not for the system tray (i.e. the TRAYICON attribute). My guess also is that this is a windows issue, not really an IUP issue.

From: Antonio Scuri <>
Reply-To: Lua list <>
To: Lua list <>
Subject: Re: IUP - Obtaining the Ihandle in C from Lua
Date: Thu, 22 Dec 2005 13:57:06 -0200

At 13:18 22/12/2005, Mark Meijer wrote:
Hi, I'm not sure if this is the right place for this question. If not, then I appologize. I was wondering how to hand my C code the Ihandle of an IUP element (in my case a regular dialog) that was created from within a lua script. I found the page in the manual (also in the new version, where it is found under System -> Guide > Other -> IupLua Advanced) mentioning lua_unboxpointer in (Lua 5), but I have no idea what is meant by this and there is no further explanation. I did a full text search for "lua_unboxpointer" in the lua sources as well as the IUP sources and got no hits, same when searching for just "unbox". Does anyone know what I need? It also mentions lua_touserdata for lua 4, is this what I need for lua 5 then as well? If so, what exactly would I pass to the c function as argument, from the lua script, the dialog object itself?

That paragraph is outdated. I removed refereces to lua_*boxpointer because the code now works also in Lua 5.1.

  You can use:

      Ihandle* h = *(Ihandle**)lua_touserdata(L, idx);