How to load Bitmap at Dialogbakground in an MFC application?
Submitted by: AdministratorIn OnInitDialog:
-----------------
1. Create CBitmap from the bitmap.
2. Create a memory DC (CDC)
3. Put the CBitmap into the memory DC (Use
CDC::SelectObject function).
In OnPaint:
------------
4. Get your dialog DC (CDialog::GetDC)
5. Do BitBlt or StretchBlt on dialog DC with memory DC as
source DC (this will paint the bitmap on your dialog).
6. Release dialog DC (ReleaseDC function)
Submitted by: Administrator
-----------------
1. Create CBitmap from the bitmap.
2. Create a memory DC (CDC)
3. Put the CBitmap into the memory DC (Use
CDC::SelectObject function).
In OnPaint:
------------
4. Get your dialog DC (CDialog::GetDC)
5. Do BitBlt or StretchBlt on dialog DC with memory DC as
source DC (this will paint the bitmap on your dialog).
6. Release dialog DC (ReleaseDC function)
Submitted by: Administrator
Read Online Win32API Job Interview Questions And Answers
Top Win32API Questions
☺ | Write About send message and post message? |
☺ | What is Win32? |
☺ | In win32 application if defining a variable of CString then it gives the error "CString:Undeclared identifier" how to solve the problem? What headerfile need to include? |
☺ | What is GDI object? |
☺ | In Win32 application can we use CString datatype? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |