Click here to Skip to main content
16,016,759 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PC Speaker Pin
Geert van Horrik29-May-05 23:19
Geert van Horrik29-May-05 23:19 
GeneralRe: PC Speaker Pin
M.Mehrdad.M30-May-05 0:04
M.Mehrdad.M30-May-05 0:04 
GeneralRe: PC Speaker Pin
toxcct29-May-05 23:31
toxcct29-May-05 23:31 
GeneralAssigns a new path to a system folder through its CSIDL Pin
shangguancheng29-May-05 22:19
shangguancheng29-May-05 22:19 
Generaltransparent buttons Pin
paul_c.29-May-05 21:20
paul_c.29-May-05 21:20 
GeneralRe: transparent buttons Pin
MK7829-May-05 21:40
MK7829-May-05 21:40 
GeneralRe: transparent buttons Pin
paul_c.29-May-05 23:27
paul_c.29-May-05 23:27 
GeneralRe: transparent buttons Pin
John R. Shaw30-May-05 14:13
John R. Shaw30-May-05 14:13 
I can think of several possibilies, none of them will be fast.

If the dialog resource does not specify clip-children:
1) Draw the bitmap your self one pixel at a time, that way you can select and chose what to draw. If you use a DIB, this method can be very fast (see articles on DIBs at CP).
2) Scan the bitmap to determine where the edges are and then: create a clipping region (using thos edges), select it into dc and then just blit the image like normal.

If you want, you may be able to use the QuickFill algorithm (article at CP):
1) If you're not specifing clip-children: get a copy of the backgound image (via BitBlt, where you want to draw at), use the image as an argument to QuickFill inorder to fill the backgound (of the bitmap) and then blit the resulting bitmap.
2) If you're specifing clip-children: you'll have to get the backgound image
from the origanal bitmap (this will require some extra work if the images are not 1 to 1), use the image as an argument to QuickFill inorder to fill the backgound (of the bitmap) and then blit the resulting bitmap.

There are probably other ways to accomplish your goal. But the simpilist, and probably the fastest, is to use a DIB. By using a DIB and reading and writing one pixel at a time, you can also have transparent holes in your bitmap image.

Hmmm! A TransparentBlt that take a bitmap instead of a transparent color, sound like an article to me!

Well I hope that helps!
Good luck!

INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
GeneralRe: Exception Pin
Cedric Moonen29-May-05 22:11
Cedric Moonen29-May-05 22:11 
QuestionHow to call Store Procedure in VC++ Pin
Ansari A. Halim29-May-05 20:57
Ansari A. Halim29-May-05 20:57 
AnswerRe: How to call Store Procedure in VC++ Pin
Priyank Bolia29-May-05 22:26
Priyank Bolia29-May-05 22:26 
GeneralCMainFrame's members Pin
hcmuns29-May-05 20:44
susshcmuns29-May-05 20:44 
GeneralRe: CMainFrame's members Pin
Cedric Moonen29-May-05 20:54
Cedric Moonen29-May-05 20:54 
GeneralRe: CMainFrame's members Pin
hcmuns29-May-05 21:12
susshcmuns29-May-05 21:12 
GeneralRe: CMainFrame's members Pin
Cedric Moonen29-May-05 21:29
Cedric Moonen29-May-05 21:29 
GeneralRe: CMainFrame's members Pin
hcmuns29-May-05 21:47
susshcmuns29-May-05 21:47 
GeneralRe: CMainFrame's members Pin
Cedric Moonen29-May-05 21:52
Cedric Moonen29-May-05 21:52 
GeneralRe: CMainFrame's members Pin
hcmuns29-May-05 22:19
susshcmuns29-May-05 22:19 
GeneralRe: CMainFrame's members Pin
Cedric Moonen29-May-05 22:40
Cedric Moonen29-May-05 22:40 
GeneralRe: CMainFrame's members Pin
hcmuns29-May-05 22:49
susshcmuns29-May-05 22:49 
GeneralRe: CMainFrame's members Pin
hcmuns29-May-05 22:55
susshcmuns29-May-05 22:55 
GeneralRe: CMainFrame's members Pin
Cedric Moonen29-May-05 22:57
Cedric Moonen29-May-05 22:57 
GeneralRe: CMainFrame's members Pin
hcmuns29-May-05 23:16
susshcmuns29-May-05 23:16 
GeneralRe: CMainFrame's members Pin
Cedric Moonen29-May-05 23:30
Cedric Moonen29-May-05 23:30 
GeneralRe: CMainFrame's members Pin
hcmuns29-May-05 23:48
susshcmuns29-May-05 23:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.