Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Clipped text in theIDE
Re: Clipped text in theIDE [message #25443 is a reply to message #25440] Wed, 24 February 2010 08:33 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13976
Registered: November 2005
Ultimate Member
nlneilson wrote on Tue, 23 February 2010 17:44

My delay, sorry.
I was not sure where to put DDUMP(Draw::GetStdFontCy()); so I tried it under "app().Run();" and the last line of the
void Open() and app()

{code]
* C:\upp\out\MSC9.Debug.Debug_full.Gui\TextProblem.exe 23.02.2010 14:31:06, user: Neil

Draw::GetStdFontCy() = 0



OK, this is our problem.... It should have been something like 16.

Quote:


edit: Removing the DDUMP from Open() and app() the red line is still through Open()void
I don't know which clues are relevant.


Do not worry about red line, it should be there (marks virtual function).

Also, those DDUMPs do not alter the behaviour of program, this are just debugging LOGs.

OK, lets continue our remote debugging process, in Draw/FontWin32.cpp:

void GetStdFontSys(String& name, int& height)
{
#ifdef PLATFORM_WINCE
	name = "Arial";
	height = 10;
#else
	NONCLIENTMETRICS ncm;
	ncm.cbSize = sizeof(ncm);
	bool b = ::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
	name = FromSystemCharset(ncm.lfMenuFont.lfFaceName);
	height = abs((int)ncm.lfMenuFont.lfHeight);
DDUMP(b);
DDUMP(name);
DDUMP(height);
#endif
}


Hm, now googling the issue, there seems to be a hint so that you can try this patch:

void GetStdFontSys(String& name, int& height)
{
#ifdef PLATFORM_WINCE
	name = "Arial";
	height = 10;
#else
	NONCLIENTMETRICS ncm;
	ncm.cbSize = sizeof(ncm);
	if(!::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0))
               ::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm) - sizeof(int), &ncm, 0);
	name = FromSystemCharset(ncm.lfMenuFont.lfFaceName);
	height = abs((int)ncm.lfMenuFont.lfHeight);
#endif
}


Mirek

[Updated on: Wed, 24 February 2010 08:33]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: fail to install, 2070, 2081, 2112
Next Topic: Questions about VectorMap
Goto Forum:
  


Current Time: Thu May 09 22:24:43 CEST 2024

Total time taken to generate the page: 0.02681 seconds