[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

.SetWindowRgn

Posted on 2001-07-10
3
Medium Priority
?
399 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 400 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

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
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…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

834 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