Click here to Skip to main content
15,893,161 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CRecordSet ? - adding new records Pin
ddmcr3-Oct-05 5:51
ddmcr3-Oct-05 5:51 
AnswerRe: CRecordSet ? - adding new records Pin
Ghasrfakhri3-Oct-05 5:57
Ghasrfakhri3-Oct-05 5:57 
QuestionTransparent drawing Pin
Jagadeesh VN3-Oct-05 2:55
Jagadeesh VN3-Oct-05 2:55 
AnswerRe: Transparent drawing Pin
vikas amin3-Oct-05 3:24
vikas amin3-Oct-05 3:24 
AnswerRe: Transparent drawing Pin
Chris Losinger3-Oct-05 6:28
professionalChris Losinger3-Oct-05 6:28 
AnswerRe: Transparent drawing Pin
Lane Yu3-Oct-05 19:22
Lane Yu3-Oct-05 19:22 
Questionword addin Pin
a0kboy3-Oct-05 2:12
a0kboy3-Oct-05 2:12 
QuestionBitmap dialog Pin
rajeev823-Oct-05 2:04
rajeev823-Oct-05 2:04 
Hello Friends,
I'm developing an application in which there are few dialog boxes and i decided to make them colourful using bitmaps,So i used the OnEraseBkGnd function to load the bitmaps .but there was an mismatch between the dialog size and bitmap size so i decided to capture the size of the dialog and the bitmap,after which i repainted the dialog calling the BitBlt function many number of times.
Is there anyother way to load the bitmaps so that i dont have to call the BitBlt function more than once.I've attached the piece of code what i'm using now.it'd be great if someone could help me in this...
BOOL dialog::OnEraseBkgnd(CDC* pDC)
{

CBitmap bmp;
CBitmap *ptrBmpOld;
CDC dcMemory;
BITMAP bm;
CRect rect;
int i, j;
int nHor, nVer;
bmp.LoadBitmap(IDB_BITMAP1);
bmp.GetBitmap(&bm);
GetClientRect(rect);
nHor=rect.Width()/bm.bmWidth+1;
nVer=rect.Height()/bm.bmHeight+1;
dcMemory.CreateCompatibleDC(pDC);
ptrBmpOld=dcMemory.SelectObject(&bmp);
for(i=0; i<nhor; i++)
{
for(j="0;" j<nver;="" j++)
{
pdc-="">BitBlt
(
i*bm.bmWidth,
j*bm.bmHeight,
bm.bmWidth,
bm.bmHeight,
&dcMemory,
0,
0,
SRCCOPY
);
}
}
dcMemory.SelectObject(ptrBmpOld);
return TRUE;
}


Rajeev

-- modified at 8:05 Monday 3rd October, 2005
AnswerRe: Bitmap dialog Pin
Mircea Puiu3-Oct-05 2:28
Mircea Puiu3-Oct-05 2:28 
AnswerRe: Bitmap dialog Pin
vikas amin3-Oct-05 2:51
vikas amin3-Oct-05 2:51 
AnswerRe: Bitmap dialog Pin
vikas amin3-Oct-05 3:40
vikas amin3-Oct-05 3:40 
Questionhow many message maps in MFC Pin
Santosh Kumar793-Oct-05 1:52
Santosh Kumar793-Oct-05 1:52 
AnswerRe: how many message maps in MFC Pin
toxcct3-Oct-05 2:01
toxcct3-Oct-05 2:01 
QuestionRe: how many message maps in MFC Pin
David Crow3-Oct-05 2:44
David Crow3-Oct-05 2:44 
AnswerRe: how many message maps in MFC Pin
vikas amin3-Oct-05 3:09
vikas amin3-Oct-05 3:09 
AnswerRe: how many message maps in MFC Pin
Ghasrfakhri3-Oct-05 5:52
Ghasrfakhri3-Oct-05 5:52 
AnswerRe: how many message maps in MFC Pin
Prakash Nadar3-Oct-05 6:41
Prakash Nadar3-Oct-05 6:41 
JokeRe: how many message maps in MFC Pin
Jose Lamas Rios3-Oct-05 15:47
Jose Lamas Rios3-Oct-05 15:47 
GeneralRe: how many message maps in MFC Pin
ThatsAlok3-Oct-05 17:50
ThatsAlok3-Oct-05 17:50 
JokeRe: how many message maps in MFC Pin
Jose Lamas Rios3-Oct-05 20:08
Jose Lamas Rios3-Oct-05 20:08 
GeneralRe: how many message maps in MFC Pin
ThatsAlok3-Oct-05 20:40
ThatsAlok3-Oct-05 20:40 
AnswerRe: how many message maps in MFC Pin
ThatsAlok3-Oct-05 17:51
ThatsAlok3-Oct-05 17:51 
JokeRe: how many message maps in MFC Pin
toxcct3-Oct-05 21:17
toxcct3-Oct-05 21:17 
Questionhow can i make frame in the center of the screen Pin
Intertherain3-Oct-05 1:46
Intertherain3-Oct-05 1:46 
AnswerRe: how can i make frame in the center of the screen Pin
Mircea Puiu3-Oct-05 2:26
Mircea Puiu3-Oct-05 2:26 

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.