Click here to Skip to main content
15,907,687 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Dialog Application-Adding Color to Display Data Pin
Mark Salsbery25-Oct-06 10:40
Mark Salsbery25-Oct-06 10:40 
AnswerRe: Dialog Application-Adding Color to Display Data Pin
Hamid_RT25-Oct-06 19:29
Hamid_RT25-Oct-06 19:29 
GeneralRe: Dialog Application-Adding Color to Display Data Pin
jerry1211a26-Oct-06 2:36
jerry1211a26-Oct-06 2:36 
GeneralRe: Dialog Application-Adding Color to Display Data Pin
Hamid_RT26-Oct-06 2:52
Hamid_RT26-Oct-06 2:52 
GeneralRe: Dialog Application-Adding Color to Display Data Pin
jerry1211a26-Oct-06 3:01
jerry1211a26-Oct-06 3:01 
GeneralRe: Dialog Application-Adding Color to Display Data Pin
Hamid_RT26-Oct-06 3:06
Hamid_RT26-Oct-06 3:06 
QuestionRe: DrawText example, please Pin
mla15425-Oct-06 9:22
mla15425-Oct-06 9:22 
AnswerRe: DrawText example, please Pin
Jörgen Sigvardsson25-Oct-06 9:43
Jörgen Sigvardsson25-Oct-06 9:43 
The first parameter is a device context. It's a handle to whatever you're drawing on. It could be the screen, a bitmap, printer, etc.

The second parameter is the string you want to draw - no mystery there.

The third parameter tells DrawText how much of the string it should draw - i.e., the length of the string. You can pass it -1, if you want it to draw the entire string.

The fourth parameter is a bounding rectangle, in which the function will draw the text. The coordinates of the rectangle are in whatever units your device context is set to use. A screen device context would typically use pixels as coordinates.

The last parameter tells DrawText how it should go about drawing the string. The DT_SINGLELINE flag specifies that the text should not be broken into several lines. DT_RIGHT would align the text to the right hand side of the bounding rectangle. DT_END_ELLIPSIS tells DrawText to draw "..." on the right hand side, in case the entire text does not fit in the bounding rectangle. These are just some of the flags that exist. I suggest you look at the MSDN documentation for more information. The flags can also be combined using the or operator. For instance: DT_RIGHT | DT_SINGLELINE would tell DrawText to draw the text on one line, and align it to the right.


--
The Show That Watches Back

AnswerRe: DrawText example, please Pin
Hamid_RT25-Oct-06 19:35
Hamid_RT25-Oct-06 19:35 
QuestionOverlapping windows Pin
Waldermort25-Oct-06 5:17
Waldermort25-Oct-06 5:17 
AnswerRe: Overlapping windows Pin
Mark Salsbery25-Oct-06 5:32
Mark Salsbery25-Oct-06 5:32 
GeneralRe: Overlapping windows Pin
Waldermort25-Oct-06 5:48
Waldermort25-Oct-06 5:48 
GeneralRe: Overlapping windows Pin
Mark Salsbery25-Oct-06 6:41
Mark Salsbery25-Oct-06 6:41 
GeneralRe: Overlapping windows Pin
Mark Salsbery25-Oct-06 6:46
Mark Salsbery25-Oct-06 6:46 
GeneralRe: Overlapping windows Pin
Waldermort25-Oct-06 7:01
Waldermort25-Oct-06 7:01 
GeneralRe: Overlapping windows Pin
Mark Salsbery25-Oct-06 7:02
Mark Salsbery25-Oct-06 7:02 
GeneralRe: Overlapping windows Pin
Waldermort25-Oct-06 7:12
Waldermort25-Oct-06 7:12 
GeneralRe: Overlapping windows Pin
Mark Salsbery25-Oct-06 7:14
Mark Salsbery25-Oct-06 7:14 
GeneralRe: Overlapping windows Pin
Waldermort25-Oct-06 7:23
Waldermort25-Oct-06 7:23 
GeneralRe: Overlapping windows Pin
Mark Salsbery25-Oct-06 8:44
Mark Salsbery25-Oct-06 8:44 
GeneralRe: Overlapping windows Pin
Waldermort25-Oct-06 15:00
Waldermort25-Oct-06 15:00 
GeneralRe: Overlapping windows Pin
Mark Salsbery25-Oct-06 8:55
Mark Salsbery25-Oct-06 8:55 
GeneralRe: Overlapping windows Pin
Waldermort27-Oct-06 1:44
Waldermort27-Oct-06 1:44 
GeneralRe: Overlapping windows Pin
Waldermort27-Oct-06 4:04
Waldermort27-Oct-06 4:04 
GeneralRe: Overlapping windows Pin
Mark Salsbery27-Oct-06 5:45
Mark Salsbery27-Oct-06 5:45 

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.