[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Irregular shaped window

Posted on 2001-08-30
4
Medium Priority
?
328 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

656 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