?
Solved

Irregular shaped window

Posted on 2001-08-30
4
Medium Priority
?
324 Views
Last Modified: 2013-11-20
Hi,
    I am new to MFC programming. I want to know how to make an irregular shaped window based on a bitmap which is on a file.
Thanks in advance
Tranger
 
0
Comment
Question by:Tranger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 30

Accepted Solution

by:
Axter earned 80 total points
ID: 6442598
0
 
LVL 2

Expert Comment

by:BogdyPtr
ID: 6442623
Well you load the bitmap, you draw it on the dc of the window then you parse the dc and for any point of the transparent color you create a window region. You add   these regions into a destination region then you substract this destination region form the window region and set the resulting region as the new window region. That should do it.

For more help look at the followin functions in MSDN or other MFC documentation:

LoadImage                           //win32 API
CDC::DrawState                      //MFC
CDC::GetPixel                       //MFC
CWnd::Get/SetWindowRgn              //MFC
CombineRgn                          //win32 API
CreateRectRgn                       //win32 API
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9531968
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: Axter

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Roshan Davis
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses

777 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