V17 on Win10 doesn't show "..." on PGrid Btns |
Post Reply |
Author | |
liong
Newbie Joined: 13 August 2019 Status: Offline Points: 5 |
Post Options
Thanks(0)
Posted: 15 August 2019 at 10:45am |
Recently, i honestly don't know for how long, the property grid browse buttons (f.e. ToolbarColor, ColorItem, FontItem, Expand Button) don't show the button text (which are the three dots "...") anymore on Windows 10 with toolkit V17.0.0 and VS2015. The same binaries still show that on win7 though and some other Windows 10 machines but i couldn't find any difference yet; same HW, Drivers and The Property Grid Sample from V15.0.2 with VS2010 on the same Windows 10 machine is working fine. Does anyone expierience these issues and knows how to fix them? Edit 1: Looks like the following is causing the problem: On machine where it's working, the following modules are loaded: ToolkitPro1700vc140x64D.dll 17, 0, 0, 0 17.01.2017 13:39 gdi32.dll 10.0.17134.285 (WinBuild.160101.0800) 03.03.2070 16:51 On the machines where it's not working, there are the following: ToolkitPro1700vc140x64D.dll 17, 0, 0, 0 17.01.2017 13:39 gdi32.dll 10.0.17763.592 (WinBuild.160101.0800) 11.07.2102 23:10 So when the toolkit tries to draw the elision, it delegates that to CXTPPrimitiveDrawer which on creation looks up the function AddFontMemResourceEx from gdi32 HMODULE hGdi32 = GetModuleHandle(_T("gdi32")); m_pfnAddFontMemResourceEx = reinterpret_cast<PFNAddFontMemResourceEx>(GetProcAddress(hGdi32, "AddFontMemResourceEx")); and later on in CXTPPrimitiveDrawer::InitFont() calls that function like m_hCodejockMemFont = m_pfnAddFontMemResourceEx(pFontData, cbFontData, NULL, &nNumFonts); where cbFontData is 4164 on both machines. However, on some machines this returns NULL (since a while) and i cannot figure why. Edit 2: On those machines, even a direct call to ::AddFontMemResourceEx with a system font as parameter fails, so it must have to do something with the environment. Here's some testcode: const char* fonthexascii1 = "4D 5A F7 …… no more space here but that's a ascii hex Dump of a installed small ttf font, in this case VGAFIX.FON, which Ends with … E4 04 00 00 00 00 int size = 0; char* binfont = new char[1024 * 100]; // qnd; more than enough.. auto binfontIt = binfont; for (char const* cur = fonthexascii1; *cur != 0; cur += 3) { *binfontIt = std::stoi(cur, nullptr, 16); ++binfontIt; ++size; } DWORD nNumFonts = 0; HANDLE hMemFont = ::AddFontMemResourceEx((void*)binfont, DWORD(size), NULL, &nNumFonts); Solution: |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |