• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 354
  • Last Modified:

CFrameWnd - SetMessageText() length restriction?

Hi,

I am using SetMessageText() in my CFrameWnd class, but some of my text gets truncated for long strings. It's not that long, maybe 100 characters? There is definitely room in the bar to spare. Is there any limit? The docs don't mention any limit.

Thanks!
0
minnirok
Asked:
minnirok
  • 3
  • 2
2 Solutions
 
Jaime OlivaresCommented:
I have reviewed all MFC source code and haven't found any limitation on size of string, if you pass as a string pointer, but could be a limitation of 255 if you pass a resource string ID
0
 
minnirokAuthor Commented:
Hmm it looks like any strings greater than 126 characters are getting truncated. They are not loaded from string resource. I print the character string in a trace statement to make sure there are no errors on my part. Maybe the size of the message pane is too small? Is there someway to extend it - I haven't touched anything to do with the status ctrl, just used SetMessageText() with an MFC wizard generated project.
0
 
minnirokAuthor Commented:
alright I manually set the length of the pane to 1600 pixels, then to style stretch, still the same odd limitation!
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
NawalKishore1976Commented:
there is a limitation of round 170 chars. You can use owner draw, if you want to display more
0
 
minnirokAuthor Commented:
Hi NawalKishore1976,

How do you know this, is it in any documentation, or just trial and error?
0
 
NawalKishore1976Commented:
I uses a long string and only around 170 chars was displayed. But i am able to draw more using the owner draw
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now