Click here to Skip to main content
15,919,132 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: problem with pointer Pin
zizzzz19-Sep-06 22:43
zizzzz19-Sep-06 22:43 
GeneralRe: problem with pointer Pin
Cedric Moonen19-Sep-06 22:54
Cedric Moonen19-Sep-06 22:54 
QuestionMFC and MySQL problem Pin
DDeliyiannis19-Sep-06 22:15
DDeliyiannis19-Sep-06 22:15 
QuestionVC++ Setting Background as BMP Pin
arti mujumdar19-Sep-06 21:27
arti mujumdar19-Sep-06 21:27 
AnswerRe: VC++ Setting Background as BMP Pin
Naveen19-Sep-06 21:43
Naveen19-Sep-06 21:43 
AnswerRe: VC++ Setting Background as BMP Pin
_AnsHUMAN_ 19-Sep-06 21:53
_AnsHUMAN_ 19-Sep-06 21:53 
AnswerRe: VC++ Setting Background as BMP Pin
Anilkumar K V19-Sep-06 22:37
Anilkumar K V19-Sep-06 22:37 
AnswerRe: VC++ Setting Background as BMP Pin
Nibu babu thomas19-Sep-06 22:53
Nibu babu thomas19-Sep-06 22:53 
arti mujumdar wrote:
How to set the Dialog Screen itself as a BMP (e.g. company logo),for placing various controls on it


BEGIN_MESSAGE_MAP(CDlbClickEventDlg, CDialog)
<code>    ON_WM_ERASEBKGND()</code>
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


//In .h file
BOOL OnEraseBkgnd( CDC* pDC );

// In .cpp file
BOOL CDlbClickEventDlg::OnEraseBkgnd( CDC* pDC )
{
    CBitmap bmp;
    bmp.LoadBitmap( IDB_BITMAP1 );

    const int nSavePrevState = pDC->SaveDC();

    CBrush brush;
    brush.CreatePatternBrush( &bmp );
    pDC->SelectObject( &brush );

    CRect rcClient;
    GetClientRect( &rcClient );

    pDC->Rectangle( &rcClient );

    pDC->RestoreDC( nSavePrevState );

    return TRUE;
}



Nibu thomas
A Developer

Programming tips[^]  My site[^]

AnswerRe: VC++ Setting Background as BMP Pin
Hamid_RT19-Sep-06 23:17
Hamid_RT19-Sep-06 23:17 
QuestionQuestion Pin
messages19-Sep-06 21:11
messages19-Sep-06 21:11 
AnswerRe: Question Pin
Christian Graus19-Sep-06 21:21
protectorChristian Graus19-Sep-06 21:21 
GeneralRe: Question Pin
messages19-Sep-06 21:34
messages19-Sep-06 21:34 
GeneralRe: Question Pin
Christian Graus19-Sep-06 21:41
protectorChristian Graus19-Sep-06 21:41 
GeneralRe: Question Pin
messages19-Sep-06 21:48
messages19-Sep-06 21:48 
GeneralRe: Question Pin
Christian Graus19-Sep-06 21:51
protectorChristian Graus19-Sep-06 21:51 
GeneralRe: Question Pin
messages19-Sep-06 22:05
messages19-Sep-06 22:05 
GeneralRe: Question Pin
David Crow20-Sep-06 3:07
David Crow20-Sep-06 3:07 
AnswerRe: Question Pin
toxcct19-Sep-06 21:22
toxcct19-Sep-06 21:22 
GeneralRe: Question Pin
messages19-Sep-06 21:34
messages19-Sep-06 21:34 
GeneralRe: Question Pin
Christian Graus19-Sep-06 21:35
protectorChristian Graus19-Sep-06 21:35 
GeneralRe: Question Pin
Cedric Moonen19-Sep-06 21:37
Cedric Moonen19-Sep-06 21:37 
GeneralRe: Question Pin
Christian Graus19-Sep-06 21:38
protectorChristian Graus19-Sep-06 21:38 
GeneralRe: Question Pin
Cedric Moonen19-Sep-06 21:47
Cedric Moonen19-Sep-06 21:47 
GeneralRe: Question Pin
Christian Graus19-Sep-06 21:50
protectorChristian Graus19-Sep-06 21:50 
GeneralRe: Question Pin
messages19-Sep-06 21:42
messages19-Sep-06 21:42 

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.