I don't know what's wrong with it?
Posted: Fri Apr 30, 2010 12:50 pm
I don't know why,the compile tell me undefined reference to "WinMain@16"
The code fragment as following:
int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE previnstance, PTSTR pszComdLine, int comdshow)
{
HWND hwnd = FindWindow(TEXT("#32770"), TEXT("Error Show"));
if (IsWindow(hwnd))
{
//An instance is already running, activate it and send it the new#
SendMessage(hwnd, ESM_POKECODEANDLOOKUP, _ttoi(pszComdLine), 0);
}
else
{
DialogBoxParam(hinstance, MAKEINTRESOURCE(IDD_ERRORSHOW), NULL, Dlg_Proc, _ttoi(pszComdLine));
}
return 0;
}
The code fragment as following:
int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE previnstance, PTSTR pszComdLine, int comdshow)
{
HWND hwnd = FindWindow(TEXT("#32770"), TEXT("Error Show"));
if (IsWindow(hwnd))
{
//An instance is already running, activate it and send it the new#
SendMessage(hwnd, ESM_POKECODEANDLOOKUP, _ttoi(pszComdLine), 0);
}
else
{
DialogBoxParam(hinstance, MAKEINTRESOURCE(IDD_ERRORSHOW), NULL, Dlg_Proc, _ttoi(pszComdLine));
}
return 0;
}