D
Dnyandev
Guest
Hello,
We are using CreateWindow() API which was working correctly on VS2012 before upgrading to VS2015. After upgrading to VS2015 CreateWindow API is returning null HWND.
We are calling AtlAxWinInit() before CreateWindow() API as shown below.
Eg:
// Code on VS2012 which is working correctly and failing on VS2015.
CreateControl()
{
BOOL res = AtlAxWinInit(); // successfully return true..
// Below API successfully return HWND on VS2012 level.
HWND hwndChild = CreateWindow(_T("AtlAxWin110"),
_T("test"),
WS_CHILD|WS_VISIBLE,
0,0,0,0,
hwnd,NULL,
::GetModuleHandle(NULL),
NULL);
}
As per VS2015 we changed class name to "AtlAxWin140" still API is failing.
CreateControl()
{
BOOL res = AtlAxWinInit(); // successfully return true..
// For VS2015 we changed class name to "AtlAxWin140" still API is returning null HWND.
HWND hwndChild = CreateWindow(_T("AtlAxWin140"),
_T("test"),
WS_CHILD|WS_VISIBLE,
0,0,0,0,
hwnd,NULL,
::GetModuleHandle(NULL),
NULL);
}
I also checked GetLastError() after CreateWindow calll; it is returning "Class is not registered".
Could you please help me to resolve this..
Thanks..
Continue reading...
We are using CreateWindow() API which was working correctly on VS2012 before upgrading to VS2015. After upgrading to VS2015 CreateWindow API is returning null HWND.
We are calling AtlAxWinInit() before CreateWindow() API as shown below.
Eg:
// Code on VS2012 which is working correctly and failing on VS2015.
CreateControl()
{
BOOL res = AtlAxWinInit(); // successfully return true..
// Below API successfully return HWND on VS2012 level.
HWND hwndChild = CreateWindow(_T("AtlAxWin110"),
_T("test"),
WS_CHILD|WS_VISIBLE,
0,0,0,0,
hwnd,NULL,
::GetModuleHandle(NULL),
NULL);
}
As per VS2015 we changed class name to "AtlAxWin140" still API is failing.
CreateControl()
{
BOOL res = AtlAxWinInit(); // successfully return true..
// For VS2015 we changed class name to "AtlAxWin140" still API is returning null HWND.
HWND hwndChild = CreateWindow(_T("AtlAxWin140"),
_T("test"),
WS_CHILD|WS_VISIBLE,
0,0,0,0,
hwnd,NULL,
::GetModuleHandle(NULL),
NULL);
}
I also checked GetLastError() after CreateWindow calll; it is returning "Class is not registered".
Could you please help me to resolve this..
Thanks..
Continue reading...