Click here to Skip to main content
16,017,015 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Hi All !(CString Class) Pin
GuyM17-May-07 1:13
GuyM17-May-07 1:13 
QuestionHow to call MFC Dll in C# Project Pin
Anurag Gandhi16-May-07 20:17
professionalAnurag Gandhi16-May-07 20:17 
AnswerRe: How to call MFC Dll in C# Project Pin
Hamid_RT16-May-07 22:31
Hamid_RT16-May-07 22:31 
Questionhow to get the string width?? Pin
sdhtyjnniutnbjnhbghb16-May-07 19:56
sdhtyjnniutnbjnhbghb16-May-07 19:56 
AnswerRe: how to get the string width?? Pin
prasad_som16-May-07 21:38
prasad_som16-May-07 21:38 
AnswerRe: how to get the string width?? Pin
John R. Shaw16-May-07 22:00
John R. Shaw16-May-07 22:00 
GeneralRe: how to get the string width?? Pin
sdhtyjnniutnbjnhbghb16-May-07 23:36
sdhtyjnniutnbjnhbghb16-May-07 23:36 
GeneralRe: how to get the string width?? Pin
John R. Shaw17-May-07 0:13
John R. Shaw17-May-07 0:13 
I am still not sure what you are asking, but ‘CSize.cx’ would be the width of the string in pixels. As far as I know there is no simpler method, although there are more complicated methods.

You can use the ‘GetTextExtent’ to determine the area you want to invalidate for drawing purposes, but I do not know what you mean by “limit the string number”.

‘GetLength’ returns the number of characters, provided it is not in Chinese or some other multi-byte language. That is if you are not using Unicode as the character type.

It has been a while but I have used ‘GetTextExtent’ and a few other methods while developing, for text editing and graphics string placement.


INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

GeneralRe: how to get the string width?? Pin
sdhtyjnniutnbjnhbghb20-May-07 17:10
sdhtyjnniutnbjnhbghb20-May-07 17:10 
GeneralRe: how to get the string width?? Pin
Mark Salsbery17-May-07 6:03
Mark Salsbery17-May-07 6:03 
QuestionVC++ issue Pin
gentleguy16-May-07 19:46
gentleguy16-May-07 19:46 
AnswerRe: VC++ issue Pin
Mark Salsbery17-May-07 6:09
Mark Salsbery17-May-07 6:09 
QuestionVC++ 2005 express issue Pin
gentleguy16-May-07 19:44
gentleguy16-May-07 19:44 
QuestionDisplay the date and time as a string. Pin
vijay_aroli16-May-07 19:00
vijay_aroli16-May-07 19:00 
AnswerRe: Display the date and time as a string. Pin
fd012900216-May-07 19:57
fd012900216-May-07 19:57 
GeneralProblem solved!! Pin
vijay_aroli16-May-07 20:09
vijay_aroli16-May-07 20:09 
GeneralRe: Problem solved!! Pin
Nelek17-May-07 20:11
protectorNelek17-May-07 20:11 
Questionuser login path Pin
deeps_cute16-May-07 18:42
deeps_cute16-May-07 18:42 
AnswerRe: user login path Pin
fd012900216-May-07 19:18
fd012900216-May-07 19:18 
QuestionWhat is purpose of padding of 2-2 bytes in debug build?? Pin
SandipG 16-May-07 18:14
SandipG 16-May-07 18:14 
AnswerRe: What is purpose of padding of 2-2 bytes in debug build?? Pin
Stephen Hewitt16-May-07 18:33
Stephen Hewitt16-May-07 18:33 
AnswerRe: What is purpose of padding of 2-2 bytes in debug build?? Pin
John R. Shaw16-May-07 22:08
John R. Shaw16-May-07 22:08 
GeneralRe: What is purpose of padding of 2-2 bytes in debug build?? Pin
SandipG 17-May-07 1:01
SandipG 17-May-07 1:01 
GeneralRe: What is purpose of padding of 2-2 bytes in debug build?? Pin
John R. Shaw17-May-07 1:53
John R. Shaw17-May-07 1:53 
Questionhow to control parallel pins using window xp visual C++ ?? HELP PLZZ Pin
*Roxanna*16-May-07 18:12
*Roxanna*16-May-07 18:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.