Quantcast
Channel: DirectWrite – codexpert blog
Browsing latest articles
Browse All 11 View Live

Image may be NSFW.
Clik here to view.

MFC Static Control Using Direct2D and DirectWrite

While doing some refactoring on sample source code presented in MFC Support for DirectWrite series, I had the idea to make a control easy to be used for rendering text. It could be a custom MFC control...

View Article



Image may be NSFW.
Clik here to view.

MFC Static Control Using Direct2D and DirectWrite (updated)

I have update the MFC static control presented in the previous articles by adding methods for setting text range color, typography and inline images. Code samples Setting text range color void...

View Article

MFC Support for DirectWrite – Part 7: A Step to Custom Rendering

The previous articles from this series show how to format the text layout using built-in DirectWrite methods. However, as said earlier, we can do more custom formatting (e.g. draw double/triple...

View Article

Getting Direct2D, DirectWrite and WIC Factories in MFC

MFC library offers a series of wrapper classes over Direct2D and DirectWrite interfaces (see CRenderTarget and CD2D classes). That’s pretty cool because allows to easily load and render images and draw...

View Article

Codexpert – 2016 Articles Summary

C++ Programming Language Guidelines Support Library Review: span<T> Guidelines Support Library Review: string_span<T> Microsoft Libraries Easy PNG Resource Loading with MFC – Part 1 MFC...

View Article


Image may be NSFW.
Clik here to view.

MFC Support for DirectWrite – Part 8: Trimming

When using “classic” GDI functions i.e. CDC::DrawText, it’s no sweat to trim with ellipsis a single-line text when that text does not fit in the drawing rectangle width, by specifying DT_WORDBREAK...

View Article

Image may be NSFW.
Clik here to view.

MFC Support for DirectWrite – Part 9: Hit-Test

DirectWrite has hit-testing support that can be useful for showing a caret, making a selection, doing some action if the user chicks in a given text range, and so on. The hit-test methods of...

View Article

Image may be NSFW.
Clik here to view.

MFC Support for DirectWrite – Part 10: Outlined Text

In a previous article, I showed the basics of custom text rendering with DirectWrite (see MFC Support for DirectWrite – Part 7: A Step to Custom Rendering). So far so good but it just mimics the...

View Article


Image may be NSFW.
Clik here to view.

MFC Support for DirectWrite – Part 11: About Trimming Again

In a previous article, I showed how to trim a text which overflows the layout box. In the example presented there, the ellipsis is added at the end of truncated text. But if, let’s say, we have to show...

View Article


Image may be NSFW.
Clik here to view.

Codexpert – 2017 Articles Summary

MFC Support for Direct2D – Part 3: Multithreading MFC Support for DirectWrite – Part 8: Trimming MFC Support for DirectWrite – Part 9: Hit-Test MFC Support for DirectWrite – Part 10: Outlined Text MFC...

View Article
Browsing latest articles
Browse All 11 View Live




Latest Images