Using PS_USERSTYLE for creating funky pens!

Using ExtCreatePen and PS_USERSTYLE you can create funky styled pens instead of the old PS_DOT, PS_DASHDOT, PS_DASHDOTDOT style pens. When using PS_USERSTYLE for creating pens you’ve got specify an array of DWORD which holds dash and space length while drawing a user styled pen! I’ve created a sample application which demostrates marching ants demo, if […]
Continue reading…

 

How to rotate text using WinAPI?

Simple way to rotate a piece of text is to use a font object… Here is a sample which does this… [sourcecode language=’cpp’]void CSomeDlg::OnPaint() {     CPaintDC dc(this);  // Get existing dlg font     CFont NewFont;      LOGFONT lgFnt = { 0 };      GetFont()->GetLogFont(&lgFnt);  // Modify this existing font // // Face name is […]
Continue reading…