XLL+ Class Library (6.3)

WinWrapper Class

Used to link .NET forms to Excel.

class WinWrapper

WinWrapper

The WinWrapper class establishes a link between a Windows API window handle (HWND) and the .NET runtime Forms classes. In order to show a modal dialog during an add-in function (or during an add-in library event handler), you can construct a WinWrapper to use as the parent of your own window.

WinWrapper implements the IWin32Window interface, and can be used wherever .NET expects a window handle, as in the example C++/CLI code below.

HWND hwndOwner;
System::Windows::Forms::MessageBox::Show(
    gcnew XllPlus::Forms::WinWrapper(hwndOwner), 
    "Hello from .NET");

Requirements

Header: xlpclrforms.h

See Also

WinWrapper Methods | xlpclrforms.h | ExcelForm class