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
GetClientRect(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



Comments

  • clarisonic mia can content your habitually clean

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

    [url=http://www.miaclarisonicaustralia.org/]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=http://www.australiaclarisonic.com/clarisonic-pro]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=http://www.miaclarisonicaustralia.org/clarisonic-mia]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 !

    Reply
  • 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 :)

    Brad
    Sk8kloud Software

    Reply
  • Hey

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

    Originally posted by: ravi

    It works ...looks really great ...

    Reply
  • 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,

    Charlie

    Reply
  • 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.

    Reply
  • 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?

    Scott.
    sb@nh.ca

    Reply
  • 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?

    /Johannes

    Reply
  • ROUNDED DIALOG

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

    Originally posted by: sudi

    Hi there, great work
    helped me..
    cheers
    sudarshan

    Reply
  • 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.

    Reply
  • 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);


    Andrew

    Reply
  • Loading, Please Wait ...

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

Top White Papers and Webcasts

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • CentreCorp is a fully integrated and diversified property management and real estate service company, specializing in the "shopping center" segment, and is one of the premier retail service providers in North America. Company executives travel a great deal, carrying a number of traveling laptops with critical current business data, and no easy way to back up to the network outside the office. Read this case study to learn how CentreCorp implemented a suite of business continuity services that included …

Most Popular Programming Stories

More for Developers

RSS Feeds