I am creating a shell extension. In my property sheet dialog, I have a added a “SysLinK Control”. But as soon I add this control my dialog doesn’t come.
I tried programmatically create this control using
HWND hwnd = CreateWindowEx(0, WC_LINK,L"Ajesh",
WS_VISIBLE | WS_CHILD | WS_TABSTOP,
7, 254, 178, 10,
m_hDlg, NULL, g_hInstRes, NULL);
But it fails with error code 1407 i.e Cannot find window class.
I also tried intialize common control using
INITCOMMONCONTROLSEX iccex;
iccex.dwSize = sizeof(INITCOMMONCONTROLSEX);
iccex.dwICC = ICC_LINK_CLASS;
BOOL bret = InitCommonControlsEx(&iccex);
But it also fails to initialize for ICC_LINK_CLASS.
For Windows 10, Is there is any change “SysLinK Control” ? I cant find any documentation with any change information.
Thanks for the help
WC_LINK work in Windows 10
Is there something which I am missing in my code? Any idea why i am getting such error in my code?
hard to say. code like this -
CreateWindowEx(0, WC_LINK,L"Ajesh",
WS_VISIBLE | WS_CHILD | WS_TABSTOP,
7, 254, 178, 20, hwnd, 0, 0, 0);
must create child window. if not - i be research this under debugger - where exactly fail. for example my trace (when control successful created) - https://imagizer.imageshack.us/v2/1803x943q90/538/Uiokcb.png
or even better, if this code fail
INITCOMMONCONTROLSEX iccex = {sizeof(INITCOMMONCONTROLSEX), ICC_LINK_CLASS };
InitCommonControlsEx(&iccex);
trace it under debugger
INITCOMMONCONTROLSEX iccex = {sizeof(INITCOMMONCONTROLSEX), ICC_LINK_CLASS };
InitCommonControlsEx(&iccex);
https://imagizer.imageshack.us/v2/1803x943q90/537/3Rw9Ul.png
Is there some reason that I’m missing that this has been posted to NTDEV? Isn’t this a COM question?
Peter
OSR
@OSRDrivers
xxxxx@gmail.com wrote:
I also tried intialize common control using
INITCOMMONCONTROLSEX iccex;
iccex.dwSize = sizeof(INITCOMMONCONTROLSEX);
iccex.dwICC = ICC_LINK_CLASS;
BOOL bret = InitCommonControlsEx(&iccex);
But it also fails to initialize for ICC_LINK_CLASS.
If you disassemble InitCommonControlEx, you’ll see that it fails if
either ICC_STANDARD_CLASSES or ICC_LINK_CLASS is set. There’s no other
conditions that make it pass: if any bits outside of the low-order 14
are set, instant fail.
That’s a pretty serious problem.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.