|
Some ideas:
1: Do a screen grab of the area your splash screen will cover. In memory use the grabbed bitmap as the background, draw your splash screen on it. Blit that bitmap to the screen. Not true transparency, but it will appear that way to the user.
2: Use a window region (HRGN) that corresponds to the opaque part of your splash screen.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
nice idea, actually. and i've already tried it. there is just one problem. the graphic i want to show is not rectangular (neither elliptic) it's a custom hand drawn one. so if i draw my splash on the background image and make it slightly transparent the whole graphic (including the surrounding alpha color) will be visible on it. you understand ? but the alpha color should be complete invisible during the entire appearance procedure.
|
|
|
|
|
Use an intermediate step. Use two memory bitmaps containing the background image. On one draw your splash screen with TransparentBlt() (Image is 100% opaque, alpha colour 100% transparent), then draw that image at the transparency you want onto the second bitmap. Because the "transparent" parts are the same colour the alpha blending will appear transparent.
As for the window region idea, you should be able to adapt the code found at http://www.codeproject.com/buttonctrl/irregular_buttons.asp[^] to create the reguired window region for your splash screen.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
|
yeah. i use it already.
AlphaBlend and SetLayeredWindowAttributes are the two main functions with those i'm trying to get this done. But they don't last out.
|
|
|
|
|
|
selecting rectangular bitmaps and AlphaBlending them is not my problem. i need to get it done with non-rectangular bitmaps.
|
|
|
|
|
|
|
yesss that's it! thanks a lot!!
... AnimateWindow was completely new to me
|
|
|
|
|
I have a button in my dialog. When I disable it using m_button.EnableWindow(FALSE) while other control has the focus, other control loses the focus it seems the disabled button gets the focus because after pressing arrow key the control next to button gets focus.
Is this by desing or some bug ? How to avoid this ? SetFocus() to previous control does not work
Thanks !
rrrado
|
|
|
|
|
|
There's more to this than what you've provided. I was able to create a dialog-based project with three controls. The first control has the initial focus. When I disabled the second control, focus remained on the first control. Pressing the Tab key changed focus to the third control.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
I have combo box control (1st control) . When you change current selection using arrow keys, OnSelectionChanged handler will recognize that certain item was selected and will call EnableWindow(FALSE) to some another button (2nd control). When you hit down arrow key again, instead of changing current combo box item, the 3rd control in the dialog is focused
rrrado
|
|
|
|
|
Something else is still at play here. I duplicated your layout and it still worked fine. Your best bet is to create a temporary dialog-based project with just those three controls on the dialog template, and a ON_CBN_SELCHANGE() handler. What does that yield?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Thank you for your time ! Clean dialog works for me too, I'll find out what's going on in my project.
thank you !
rrrado
|
|
|
|
|
Hi guys,
I've been trying to load bitmaps into my dialog. I have one picture control and i have 2 bitmaps that i want to use.
this is part my code in general:
if (Firstsituation)
{
thisimage.SetBitmap(bmp1);
}
else
{
thisimage.SetBitmap(bmp2);
}
I'm wondering why it keeps on loading the image i have at default at my picture control properties. I just can't load them the way I want them to.
Even when I remove the code for LoadBitmap(CONTROL), it still executes the project, though a bit of code is missing. Anyone who can enlighten me? I'm kinda confused.
waxiegal
|
|
|
|
|
|
Hello,
I tried to use __try __except in a certain function, and the compiler said, "Can't use __try in a function that requires object unwinding."
Does "object unwinding" refer to objects declared on the stack?
Does it imply that if all the objects used in the function happen to be on the heap, then I can use __try __except?
Thanks,
Rich
|
|
|
|
|
See here and here.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Hello folks, need ur help....
I have a SDI application, and in the IDR_MAINFRAME menu resource the last one is the Help. Below the About menu item, i added another one 'Info' to show a dialog box showing a brief description of the application. In the Frame class i did a message map for the menu item which call DoModal for the dialog box. But the problem is that when i run the application, the newly added menu item is inactive and is not responding. What do i do to solve this???
God is Merciful...
|
|
|
|
|
|
If we draw a line on paper by:
MoveTo(0,0);
LineTo(1000,0);
the horz line is not at topmost of paper, there is a top margin.
how to adjust width (or height or distance) of the margin?
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
|
GetViewportOrgEx() return (0,0);
so the value (0,0) is not (0,0) on paper.
If I don't know width of original margin, how to adjust it?
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|