Environment: The code in this article was developed using Visual C++ 4.0
(continued)
This code is used to make a round dialog for various Apps.
This could be good for use with an MP3 or CDPLAYER or any other.
Surprisingly it's not that hard!
[I looked but nobody had written anything for a round dialog. I had
been trying to shape a dialog for some time. Then after playing
with the Microsoft CD for a SetWindowRgn() for a window I tried to
use it for a dialog. Viola! After Jumping around a few times after
it compiled I sent it to the Code Guru.
[CRgn m_rgn;
Crect rcDialog
GetClientRect(rcDialog);
m_rgn.CreateEllipticRgn(0, 0, rcDialog.Width(), rcDialogHeight());
SetWindowRgn(GetSafeHwnd(), (HRGN) m_rgn, TRUE);]
Download demo project - 17 KB
Download source - 3 KB
Date Last Updated: April 18, 1999