|
-
May 29th, 1999, 07:49 PM
#1
How to display a bmp with a dialog adapted to it
I'like to display some graphic information during the beginning of my application. The templated dialog cannot display a bmp properly with different display configures. CDC seems helpful, but how do I get a CDC object at startup of my application? Thanks in advance.
-
June 1st, 1999, 01:40 AM
#2
Re: How to display a bmp with a dialog adapted to it
Why don't you use 'search' ?
just search with 'splash' (what you said is the splash window.. 
or visit page "http://www.codeguru.com/dialog/splash.shtml".
Have a nice day !!
-
June 1st, 1999, 03:13 AM
#3
Re: How to display a bmp with a dialog adapted to it
As Anonymous said, you should use the splash screen code if possible; but the answer to your question is to override the OnPaint() (add a handler for WM_PAINT) of the dialogue box or window (OnDraw() for a CView-derived) and use the supplied CPaintDC (or the supplied pDC from OnDraw() ). Like this:
---void CMyDlgOrWnd::OnPaint()
{
CPaintDC dc(this); // device context used for painting
// Do your bitmap stuff here...
// Don't use bla bla.
}
---
or for CView-derived:
---void CMyView::OnDraw(CDC *pDC)
{
// Do your bitmap stuff here...
}
---
You will need to handle painting the bitmap to the screen by selecting it into a temporary DC and the BitBlt-ing (or StretchBlt-ing) it.
Wish you hadn't asked now?(!)
-
June 2nd, 1999, 10:45 AM
#4
Re: How to display a bmp with a dialog adapted to it
Your answer is just what I have been looking for. Thank you very much.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|