Solved

Irregular shaped window

Posted on 2001-08-30
4
297 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
4 Comments
 
LVL 30

Accepted Solution

by:
Axter earned 20 total points
Comment Utility
0
 
LVL 2

Expert Comment

by:BogdyPtr
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
method notes when mouse over in eclipse 5 66
Hibernate methods 2 58
countEvens challenge 2 56
no14 challenge 14 56
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

772 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

10 Experts available now in Live!

Get 1:1 Help Now