Code:
namespace
OoMetaPanel2 {using namespace System::Runtime::InteropServices;
[DllImport("user32.dll")]
extern "C" HWND FindWindow( LPCTSTR lpClassName,
LPCTSTR lpWindowName
);
extern "C" BOOL SetWindowText( HWND hWnd,
LPCTSTR lpString
);
extern "C" BOOL ShowWindow( HWND hWnd,
int nCmdShow
);
//......
};
Process Button Click
private
: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e){
HWND Wnd = FindWindow(_T("SALFRAME"),NULL); //This works OK
bool
result = ShowWindow(Wnd, SW_MAXIMIZE); //This causeambiguous call to overloaded function
}
};
I tried different variations of Wdn casts into HWND type, and nothing works. I also tried to use another WinAPI window funcions like SetWindowText or OpenWindow, and this error causes anyway.
Please help solve this problem.

ambiguous call to overloaded function in WinApi calls
Ravindra Patil
Ooops, sorry -- I responded before reading your post properly.
You don't have to trouble yourself by declaring the winapi functions as dllimports like that. Just add the following to your stdafx.h (or similar) header:
That will include the function definitions, and link the library in which they are defined.
Depick
I triet replace
extern
"C" BOOL ShowWindowwith
extern BOOL ShowWindow,
but it didn`t help.
Adam1987
Fabio Pintos
soul creator