void
Button_Click(System::Object ^sender, System::EventArgs ^e)
{
void
* p = Handle.ToPointer();
HWND
hwnd = (
HWND
)p;
if
(::IsWindow(hwnd))
System::Windows::Forms::MessageBox::Show(L
"是的"
);
else
System::Windows::Forms::MessageBox::Show(L
"不是"
);
System::String ^ stringObject = sender->ToString();
pin_ptr <
const
wchar_t
> wszString = PtrToStringChars(stringObject);
::MessageBoxW(hwnd, (
LPCWSTR
)wszString, L
"info"
, MB_OK);
}