Solved

.SetWindowRgn

Posted on 2001-07-10
3
377 Views
Last Modified: 2013-12-03
I wanna set a WindowRgn for a CButton

m_CButton.SetWindowRgn(HRGN hRgn, true);

How do I setup a hRgn so I will only draw ? a button. What I want 2 do is draw Width/2 of a button, therefor I need to set a hRgn for my button right ?

-- How is it done ?
CB.
0
Comment
Question by:win32
3 Comments
 
LVL 2

Accepted Solution

by:
MadYugoslav earned 100 total points
ID: 6268738
HRGN CreateRectRgn(
  int nLeftRect,   // x-coordinate of region's upper-left corner
  int nTopRect,    // y-coordinate of region's upper-left corner
  int nRightRect,  // x-coordinate of region's lower-right corner
  int nBottomRect  // y-coordinate of region's lower-right corner
);
0
 
LVL 15

Expert Comment

by:NickRepin
ID: 6271030
SetWindowRgn does not work with the standard buttons.
0
 

Author Comment

by:win32
ID: 6280891
True, MadYuqoslav your'r right. I found out just a few minutes after I postet this message.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now