Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » About CExtLabel Collapse All
Subject Author Date
Seung Cheol Lee Oct 16, 2006 - 12:17 AM

I Finded two errors of CExtLabel.

1st : I did debug -> start(F5). And the debug error happened at CExtLabel.
=========================================
Debug Assertion Failed?
Program: ...
File:f:\vs70builds\3077\vs\MFCATL\ship\atlmfc\include\atlsimpstr.h

Expression:nLength <= GetData()->nAllocLength
....
=========================================
2nd : I used Korean Language. At release unicode mode, the end of caption string of CExtLabel attached some character after execution.


My mistake or CExtLabel bugs ?

kathy tom Dec 1, 2023 - 11:32 PM

The problem you’re facing with the Korean language and https://pizzatower.io additional characters at the end of the caption in Release Unicode mode could be related to string encoding or memory management.

Allen Wood Dec 1, 2023 - 6:35 AM


The CompTIA A+ 220-1101 exam evaluates fundamental skills in IT, covering topics like hardware, networking, mobile devices, and troubleshooting. The questions test knowledge on computer components, connectivity, security, and basic IT practices. Candidates are assessed on their understanding of various technologies, including cloud computing, virtualization, and hardware maintenance. The exam aims to validate expertise in entry-level IT roles and serves as a stepping stone for a career in IT support and technical roles.

Visit Page: https://www.solution2pass.com/220-1101-questions.html

Suhai Gyorgy Oct 16, 2006 - 1:38 AM

The 2nd bug been already discussed in this forum, but I think fixing the second bug will fix your first bug as well. Support’s answer was at that time:

As for the "square-symbols" this bug is already fixed. Please open the CExtLabel::WindowProc method and find the following code snippet:

		else if( message == WM_GETTEXT )
		{
			TCHAR * lpszText = (TCHAR *)lParam;
			// 2.55
			// __EXT_MFC_STRCPY(
			// 	lpszText, 
			// 	wParam, 
			// 	m_sText
			// 	);
			__EXT_MFC_STRNCPY(
				lpszText,
				wParam,
				m_sText,
				wParam - 1
				);
			lResult = TRUE;
		}
Add the following line just after the __EXT_MFC_STRNCPY and let us know if the problem persist:
lpszText[ wParam - 1 ] = _T(’\0’);}
P.S.: Careful with the ’ character, it appears as a different character on forum!

Seung Cheol Lee Oct 16, 2006 - 3:13 AM

Thank you for the answer. ˆˆ

Seung Cheol Lee Oct 16, 2006 - 12:20 AM

Debug also was executed at unicode mode