hDlgLog = CreateDialogParam(ghInstance, (LPCSTR) DLG_LOG, hTab, DlgLog, 0);
When compiling the previous line it generates the following error:
'CreateDialogParamA' : cannot convert parameter 1 from 'void *' to 'struct HINSTANCE__ *'
Any idea on why is it doing that? Thanks in advance.
WinMain will provide this for you:
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
ghInstance = hInstance;
hDlgLog = CreateDialogParam(ghInstance, (LPCSTR) DLG_LOG, hTab, DlgLog, 0);
In the event that this is not an option you can do the following:
int main(int argc, char *argv[])
{
HINSTANCE ghInstance;
ghInstance = GetModuleHandle(NULL);
hDlgLog = CreateDialogParam(ghInstance, (LPCSTR) DLG_LOG, hTab, DlgLog, 0);
regards,
DMac
I already had this written in my code. The problem is with the compilation and not what's written.