Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [CONNECT C++] Changing text font

$
0
0

[quote user="Bruce Reeves SRNS"]DgnFontCP newFont = DgnFontManager::FindSystemFont(L"Century Gothic"); // Optionally provide a filter to find only RSC, SHX, or TrueType fonts; must also check NULL. if ( newFont->IsValid() && newFont != nullptr )[/quote]

That test is incorrect.  If newFont is NULL, the call to IsValid will cause an error.  The fix is simple: reverse the order of test...

if ( newFont != nullptr && newFont->IsValid())

Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>