Creating a Round Dialog

Environment: The code in this article was developed using Visual C++ 4.0

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;  // This is for the dialog area: It goes in your h. file

// This Gets the size of the Dialog: This goes under the OnInitDialog Function 
Crect rcDialog

// This Creates area assigned to Dialog: This goes directly below the above in OnInitDialog
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


  • clarisonic mia can content your habitually clean

    Posted by iouwanzi on 06/06/2013 06:19pm

    [url=]clarisonic mia online[/url] Souvent, vous pourriez certainement blâmer la médecine. straightner cheveux babyliss Pour être en mesure de bien déterminer qui sont les premiers hébergeurs sont le soutien cyberespace, vous avez vraiment besoin de prendre du temps, ce qui est malheureusement de vos services, pour explorer avec vous pour la recherche. [url=]clarisonic pro[/url] Les producteurs primaires suivantes commencé pour sa bonne qualité merveilleuse de votre sèche-cheveux et fer à lisser est aujourd’hui célèbre également la distinction entre les femmes qui parfois vous avez besoin pour redresser votre chevelure afin d’éliminer ces types de problèmes ghd fer luxe Violet, à son tour, n’est pas un peu ne serait tout simplement pas seulement en possession du logiciel. un temps très long sur les compétences à l’aide de modèle MK4 GHD coiffer les cheveux bouclés, qui habituellement aurait certainement visiteurs parfaites un partage vraiment Thru la douceur, verrouille par exemple signifiait redresser ce n’est, en général, les lois de tension semi-automatique ou entièrement automatique et les règlements, vous pouvez acheter un bon cheveu sauvage style avec vous partout dans le monde grâce à une Botheration vitale tout autour. meilleurs d’entre eux à travers un endroit spécifique pour redresser redresseur GHD MK4 cheveux bouclés pourraient l’être. problème en effet, le fait qui se produit à l’aide d’un opérateur capable dvd, plus de points, le type choisi des méthodes simples pour vous aider à contrôler l’application correcte et [url=]clarisonic mia[/url] Ce redressement en termes de fer relèvent de 4 modèles. Pour que vous choisissiez telle qu’énoncée par ceux type de cheveux bouclés, mais aussi les coiffures que vous souhaitez atteindre. Par le biais de processus un peu, c’est très simple aussi obtenir de belles boucles. Et même le type est parfait pour le lissage de la frange ainsi que pour les individus.Espagne, GHD annonce une promotion très utile. Dans les cas où la plupart des gens portent votre propre fer plat âgé dans un point de vente de cette marque, une certainement se verront faible coût à l’achat d’un fer à lisser ghd pas cher. Il est généralement valable jusqu’au 6 mai 2011. En fait, vous ne pouvez généralement décider de votre propre blog officiel de fer plat. Certaines personnes offrent le monde entier !Comme que je quitterai les gens avec la finale de vente spot qui est vraiment très beau. Une Cendrillon moderne important !

  • Very Very Good; Life Saver

    Posted by Legacy on 02/03/2003 12:00am

    Originally posted by: Bradford Powers

    This was exactly what i was looking for. Thank You!!!!!!
    P.S Minus a few typos, but i can understand the excitment :)

    Sk8kloud Software

  • Hey

    Posted by Legacy on 08/27/2002 12:00am

    Originally posted by: ravi

    It works ...looks really great ...

  • Good - but I have a question about the CAPTION.

    Posted by Legacy on 04/12/2000 12:00am

    Originally posted by: Charlie Roche

    I've been making non rectangular dialogs lately, and there are a few different ways to do this. Yours is a good one, but I'm still confused as to how to create a DIALOG with it's icon and title in the task bar but setting it such that the dialog doesnt draw itself a caption. You can do it with a CWnd, by using the CreateEx(...) function, and setting the title string in one of it's parameters, but I havent got this working for a dialog. Can anyone shed some light on this for me?

    Thanks in advance,


  • How to avoid blink on the dialog

    Posted by Legacy on 11/29/1999 12:00am

    Originally posted by: VICTOR CARRE�O

    When I use a dialog box, in the OnPaint function i draw different color rectangles.

    How can i do, to avoid blink the screen when i move another window on my dialog.

    I save CRect objects in a CObArray.

    Thanks You.

  • redraw problem...

    Posted by Legacy on 11/16/1999 12:00am

    Originally posted by: scott

    When the round dialog is moved, there is a slight redraw problem. There is a slight lag in the redraw. Is there any way to have this lag taken out?


  • Border?

    Posted by Legacy on 10/26/1999 12:00am

    Originally posted by: Johannes Str�mberg

    Great tip, however it
    could use a border, does anyone know how to make one?



    Posted by Legacy on 09/26/1999 12:00am

    Originally posted by: sudi

    Hi there, great work
    helped me..

  • Any Shape Dialog Box

    Posted by Legacy on 05/23/1999 12:00am

    Originally posted by: Jon Woolman

    If you use CreatePolygonRgn() as in the previous examples, you can create dialog boxes of any shape. It is also possible to use CreatePolyPolygonRgn() to create dialog boxes that are separated into several different shapes.

  • slight changes

    Posted by Legacy on 04/23/1999 12:00am

    Originally posted by: Andrew Bryan

    I was unable to get rid of the remains of the dialog frame using the resource editor, however, it you change the create for the region from 0,0 to 2,2 , the frame goes bye bye.

    This make it all look a bit more tidy. By the way, is there another way to centre the caption without using spaces??

    // This Creates area assigned to Dialog
    m_rgn.CreateEllipticRgn(2, 2, rcDialog.Width(), rcDialog.Height());
    ::SetWindowRgn(GetSafeHwnd(), (HRGN)m_rgn, TRUE);


  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Moving from an on-premises environment to Office 365 does not remove the need to plan for disruptions or reduce the business risk requirements for protecting email services. If anything, some risks increase with a move to the cloud. Read how to ease the transition every business faces if considering or already migrating to cloud email. This white paper discusses: Setting expectations when migrating to Office 365 Understanding the implications of relying solely on Exchange Online security Necessary archiving …

  • How to give users what they want AND maintain control, visibility, and security. File sync and share is everywhere. In the past decade, cloud-based storage and syncing solutions have exploded to fill a growing need for anytime, anywhere access to everything from photos and videos to documents, spreadsheets, and PDFs. We understand that choosing any new service or tool can be a lengthy and complex process. That's why we've created this buyer's guide to help make your evaluation process a little bit easier. In …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date