using API functions, can i get the text rectangule?
cambalinho
125
Practically a Posting Shark
Recommended Answers
Jump to PostNot that I know of, but you can get the text itself. The size of the rectangle would depend on the font being used.
Jump to PostIt sounds exactly what DrawText with DT_CALCRECT is made for. From MSDN:
Determines the width and height of the rectangle. If there are multiple lines of text, DrawText uses the width of the rectangle pointed to by the lpRect parameter and extends the base of the rectangle to bound …
Jump to PostThe "\t" is ignored because you haven't specified that tabs should be expanded. You will need DT_EXPANDTABS as well as DT_CALCRECT.
I think the +2 is needed because AdjustWindowRectEx sets the window size including the border (and caption bar and menu bar). Does your window have a border width of …
All 11 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
SalmiSoft
102
Junior Poster
cambalinho
125
Practically a Posting Shark
SalmiSoft
102
Junior Poster
cambalinho
125
Practically a Posting Shark
cambalinho
125
Practically a Posting Shark
SalmiSoft
102
Junior Poster
cambalinho
125
Practically a Posting Shark
SalmiSoft
102
Junior Poster
cambalinho
125
Practically a Posting Shark
cambalinho
125
Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.