Solved

Irregular shaped window

Posted on 2001-08-30
4
313 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
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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
Different colored text in ComboBox without Subclassing 8 73
Replacement selected text 2 67
tripleUp challenge 7 93
scoreUp challenge 14 70
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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