How to create border in a window not rectangular usingFrameRgn

I have a modeless dialog that I changed the form in a roundrect using SetWindowRgn(). I would like to draw a border color around it using FrameRgn. Here is the code I use:

BOOL CMyDlg::OnInitDialog()
{
CDialog::OnInitDialog().

m_Brush.CreateSolidBrush (RGB (255,255,255));

CRect rcDialog;
GetClientRect (rcDialog);

This area creates assigned to Dialog: it goes directly below the foregoing in OnInitDialog
m_rgnShape.CreateRoundRectRgn (rcDialog.TopLeft () .x, rcDialog.TopLeft () and suplicamos, rcDialog.BottomRight () .x,
rcDialog.BottomRight () and suplicamos, () rcDialog.Width / 8, rcDialog.Height () / 8);

: SetWindowRgn (GetSafeHwnd (), m_rgnShape (HRGN), TRUE);

Return TRUE; Returns TRUE if you set the focus to a control
EXCEPTION: OCX Property Pages should return FALSE
}

Sub CMyDlg::OnPaint()
{
CPaintDC dc (this); device context for painting

CBrush brush;
brush. CreateSolidBrush (RGB (255,0,0));

DC. FrameRgn (& m_rgnShape, & brush, 2, 2);
}

Can someone explain why the FrameRgn does not and perhaps provide examples of code that will make it work.

Thanks in advance,

Hi Satya,
 
The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums for assistance:

Windows desktop development

Tags: Windows

Similar Questions

  • How to create a folder compressed uncompressed, not on my desk?

    How to create a folder compressed uncompressed, not on my desk?

    How to create a folder compressed uncompressed, not on my desk?
    When I right click on my desktop the popup resulting menu, which allows me to choose things that I can choose, and when I select 'New' the new popup window gives me another window of things that I can select. Not the case in this window possible selections are there a selection to create a folder that is not "compressed or" zipped ". I want a regular folder, not a compressed folder! I don't want zipped files, whenever I want to create a folder! If I want to create a compressed folder, I want you to leave a way for me to do that, I have my own reasons why I want to use the files uncompressed graciously... I'm used to be able to make the files uncompressed on this computer. I don't know what or how this change came to be. I want to just return to the way it was before.  Also, I want to know what it takes to keep it (the change) doesn't happen, or what I did to get there.

    How to create a folder compressed uncompressed, not on my desk?

    How to create a folder compressed uncompressed, not on my desk?
    When I right click on my desktop the popup resulting menu, which allows me to choose things that I can choose, and when I select 'New' the new popup window gives me another window of things that I can select. Not the case in this window possible selections are there a selection to create a folder that is not "compressed or" zipped ". I want a regular folder, not a compressed folder! I don't want zipped files, whenever I want to create a folder! If I want to create a compressed folder, I want you to leave a way for me to do that, I have my own reasons why I want to use the files uncompressed graciously... I'm used to be able to make the files uncompressed on this computer. I don't know what or how this change came to be. I want to just return to the way it was before.  Also, I want to know what it takes to keep it (the change) doesn't happen, or what I did to get there.

    Microsoft did not change this, Chrome has done. Compressed files shouldn't be there, but you have lost the regular folder option. It is an update of Chrome, (mid), is responsible. Here are two patches.

    How to remove and restore the default context Menu items 'New' in Windows 7 and Windows 8
    http://www.SevenForums.com/tutorials/28677-new-context-menu-remove-restore-default-menu-items.html

    If still no joy, see the 'response' by Linda Yan in this thread.
    http://social.technet.Microsoft.com/forums/en-us/w7itprogeneral/thread/97de8a2a-12f2-4381-A409-a78f4ae551cf/#99395761-56de-4a76-8C2A-eab498ad735a

    Tip: When you save the text in Notepad, the default file format is .txt. Replace all files.

  • How to create a secure page. Not a secure area, just a https page to a form?

    How to create a secure page. Not a secure area, just a https page to a form? I can't find a way let me by creating or copying a page in dreamweaver and admin console is only showing the current http pages. I created before secure areas and included secure on my address worldsecure applications, but I just want to have pages on https.

    Make your page then it just a link to your domain secure (found under settings-> fields within the admin site)

    https://yoursite.worldsecuresystems.com/the-page

  • How to create a family on Windows Vista Edition system repair disc?

    I can't find how to on Windows Vista Home Edition to create a startup disk. How can I do this? Thank you!

    Download the ISO on the link provided and make a record of repair time it starts.

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu.

    When you have changed that, insert the Bootable disk you did in the drive and reboot.

    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Link above shows what the process looks like and a manual, it load the repair options.

    NeoSmart containing the content of the Windows Vista DVD 'Recovery Centre', as we refer to him. It cannot be used to install or reinstall Windows Vista, and is just a Windows PE interface to recovering your PC. Technically, we could re-create this installation with downloadable media media freely from Microsoft (namely the Microsoft WAIK, several gigabyte download); but it is pretty darn decent of Microsoft to present Windows users who might not be able to create such a thing on their own.

    Read all the info on the website on how to create and use it.

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    ISO Burner: http://www.snapfiles.com/get/active-isoburner.html

    It's a very good Vista startup repair disk.

    You can do a system restart tool, system, etc it restore.

    It is NOT a disc of resettlement.

    And the 32-bit is what normally comes on a computer, unless 64-bit.

    See you soon.

    Mick Murphy - Microsoft partner

  • How to create a folder that is NOT a SMART FOLDER?

    (1) how can I create a folder that is NOT a smart folder?

    (2) how can I get a folder to display the NUMBER of items it contains?

    https://support.Apple.com/kb/PH22185?viewlocale=en_US & local = en_US click the blue details.   It's Apple records guide.

  • How to create a shortcut in Windows 7 toolbar?

    Referring to a following linked picture, I would like to create a shortcut in windows 7 bar,

    Does anyone have any suggestions?

    Thanks in advance for your suggestions :>

    Toolbar on XP for shortcuts
    http://www.Petri.co.IL/images/quick_lnch_xp_1.gif

    Referring to a following linked picture, I would like to create a shortcut in windows 7 bar,

    Does anyone have any suggestions?

    Thanks in advance for your suggestions :>

    Toolbar on XP for shortcuts
    http://www.Petri.co.IL/images/quick_lnch_xp_1.gif

    Hello

    To create a custom toolbar.

    1. create a new folder under your user name folders. Place all shortcuts in this folder that you want to appear on the new toolbar.

    2. right click on the taskbar, then select Toolbars / new toolbar.

    3. navigate to the new folder that you created and select it. Click on the button to select a folder.

    The new toolbar will be placed on the taskbar.

    Concerning

  • How to create an image system Windows 8

    I am trying to create a system for Windows 8 image.

    System 8.1 image is now in the control panel > file history and the option is located in the lower left corner.

    Bob Eyster

  • How to create an account for windows live offline?

    Hi anyone knows how I can do pls?

    Hello
     
    Essentially, when you start the game on your PC, it will ask you to connect or create a Windows Live account, so you can communicate with your friends, save games, etc. for this game. However, some do not have access to the internet or do not have an online account, so the game lets create you an offline account, then you can play the game, but you will not have access to the features that Windows Live offers.

    Thanks and greetings
    Umesh P - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    [If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message.] [Marking a post as answer, or relatively useful, you help others find the answer more quickly.]

  • How to create a shortcut in windows 10

    After the upgrade to windows 10, I'm able to do a right click on a page to have a shortcut placed on the desktop.  How can I create shortcuts as I could in windows 8.1?  Thank you.

    Hello @lucky100,

    Welcome to the Forums of HP Support!

    I stumbled upon your post on the issue of funds and wanted to help!

    For starters, can you provide me with the product number of the laptop?  Here is a link that you can use that will help you find your model and product number:

    How can I find my model number or product number?

    In the meantime, try to review the following resource and let me know how it goes:

    How: Add a Web shortcut to the Windows 10 splash screen (Not a HP website supported).

    Please let me know if this information helps you solve the problem by marking this message as 'accept as Solution' , this will help others easily find the information they seek.  In addition, by clicking on the Thumbs up below is a great way to say thank you!

    Have a great day!

  • How to create an ERD for Windows Vista x 64

    I received my Installation CD for x 64-based Windows Vista professional damaged, and my laptop does not have preinstalled recovery option. How do I create a disk repair or the startup disk?

    My PC boot upward and the rworks Windows normally but I want a repair disc in case where if I need to repair by using a full Windows, the system image backup.

    The best way, install a second hard disk, HD format by opening cmd or start, type: diskmgmt.msc

    In msc, R.click on the new HD, create a partition, then format, use the default settings. Once through, out msc

    go in run, type: XCOPY C:\*.* D:\/c/h/e/k/r press the button run XCOPY runs automatically, simply agree to

    in the DOS window... Once its youre, thru, any user of OS/data/files is now hard disk, it is a bootable

    HD... In addition, D: is the new HD letter, if asigned another, then use instead. HDs are fairly inexpensive

    These days, get a more than 350-500 GB, you can also, use as a storage HD, once XCOPY is complete

    & you've restarted the pc... In addition, you use probably SATA HDs, if its IDE, then place the new HD on the same

    IDE cable, set the nearest MB, defined as slave, original master. To learn more, follow this link.

    https://TechNet.Microsoft.com/en-us/library/bb491035.aspx

  • What is the purpose of the 100 MB Partition in Windows 7? How to create several Partitions in Windows 7?

    When I tried to install Windows 7, a named system reserved partition will be created, what is its use?
    If I re install Windows 7 without changing the partitions, the partition of 100 MB will be visible, how to hide?
    If I upgrade to Windows 7 Windows XP, this partition will not be created, is that it causes a low yield?
    During the installation of Windows 7 on a new computer, off-system reserved, only 3 new partitions will be created, how to avoid this, because I use Linux and Windows, so I need 7 partitions to create.

    Could someone please help

    This is for the Windows recovery environment (WinRE), also supplied with Windows Vista, only it has been available from the Windows Vista installation disc only, although some manufacturers make available on a partition separated on their factory facilities. In Windows 7, this feature is installed on all computers and is stored in the 200 MB partition if you are installing using a single partition scheme. However, if you are installing to a drive that has more than one partition, the recovery environment is stored in a folder at the root of your installation disc, so if you install to a partition with a label of C:\ she will be C:\Recovery.

    If I re install Windows 7 without changing the partitions, the partition of 100 MB will be visible, how to hide?

    Yes, it can be removed and by default it is hidden.

    If I upgrade to Windows 7 Windows XP, this partition will not be created, is that it causes a low yield?

    If you are upgrading from a previous version of Windows 7, the recovery environment is stored in a folder in the root of your installation disc, so if you install to a partition with a label of C:\ she will be C:\Recovery.

    During the installation of Windows 7 on a new computer, off-system reserved, only 3 new partitions will be created, how to avoid this, because I use Linux and Windows, so I need 7 partitions to create.

  • How to create a page for Cornell Notes template?

    Hi people,

    I guess I am a bit technologically challenged, but I'm real keen on creating a model in the Pages I can take electronically "Cornell Notes". Of course, there's a dandy video Youtube showing how to do such a thing in Microsoft Word, but I'm not having any luck translating these steps in Pages. The video depicts the creation of a table and using the "merge" option to create large cells. It seemed that it couldn't be easier. I've attached a screenshot of a basic model of Cornell Notes in Word.

    Thank you for any help you can render.

    Rick

    What happens when you export this Word template, and then open it in Pages? If the formatting is retained, why not save it as a model of Pages?

  • Qosmio G40: How to create master disc for Windows Vista?

    Hi all

    I'm looking forward to install additional Windows XP to Windows Vista on my QOSMIO G40 (dual boot).
    Before this trip, I need a little more secure the folder in the path by creating a * master disc * I can boot from the Vista loading.
    I speak not re-installing Vista from reinstall drive but a master drive.

    Someone to help me with this?

    I don't know what you mean when you say "the Master disc. Do you mean a diskette that has Vista boot, loading files?

    EasyBCD can help you set up dual-boot configuration.
    http://NeoSmart.NET/DL.php?id=1

  • How to create a USB bootable Windows XP to reinstall Windows?

    The blue screen of death - I need to re - install XP Home.

    There is a download to diskette available but is there a download to a memory/usb stick?

    There is a download to diskette available but is there a download to a memory/usb stick?

    If these are the disks you are referring to:
    How to get the installation discs for Windows XP for installation of boot floppies Those who are not complete installation Windows XP...

    You still need a CD Windows XP Home edition - which should be bootable.  The disks are machines which cannot BOOT from CD - and these machines probably aren't going to boot from USB.  ;-)

  • M3800 Precision how to create the system for windows recovery disc 7 without cd player

    Precision M3800 does not come with CD player. How can I create rescue disk to restore the system or system to go back to a restore point?

    Chris Chan

    CD/DVD media is a thing of the past, you must use Dell Backup and Recovery to a 16 GB Bootable USB Flash Drive:

    http://dellwindowsreinstallationguide.com/Dell-backup-and-recovery-1-8-1-71/

Maybe you are looking for

  • Satellite L300 - impossible to go from Vista to Win7

    Hello I have a problem I bought the Satellite L300 (windows vista family premium was installed, I had to buy the upgrade to windows 7 in toshiba which I did and installed without any problem at all.) But now after using the cause of recovery, I had a

  • Download service pack 3 XP to computer without internect access

    trying to install a wireless adapter. He want to download because I need the Xp service pack 3. I can't download the service pack because the computer doesn't have internet access. How to make a disc or upload them to an external hard drive?

  • Change something in msconfig. Get a weird error message.

    Hello. Changed a lot of material internally. Re-installed XP. Have all the updates. SP3. When I go to msconfig and stop some programs start at startup, it gives me this message: access denied error was returned while attempting to change a service. Y

  • "The requested operation requires a rise." How do I get there?

    I am connected to a Vaio under Vista Business SP2; I have administrator privileges.  The Vaio has wireless to work for my Internet gateway, but he is unable to make a reference to primary DNS my ISP. All the things that I tried to fix this have doome

  • Poynt Question

    I noticed on Poynt, when you perform a search, for example "enterprises" and when you scroll over the icons at the top there is a small popup box that tells which icon is that (people, map, business, movies, etc.). This popup box ontop overlays of th