Click here to Skip to main content
15,879,326 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: excel problem Pin
MsmVc1-Nov-09 19:09
MsmVc1-Nov-09 19:09 
GeneralRe: excel problem Pin
trioum2-Nov-09 2:17
trioum2-Nov-09 2:17 
QuestionRetreive ip address of all pcs connected to LAN Pin
Abinash Mohanty1-Nov-09 18:07
Abinash Mohanty1-Nov-09 18:07 
AnswerRe: Retreive ip address of all pcs connected to LAN Pin
Adam Roderick J1-Nov-09 19:16
Adam Roderick J1-Nov-09 19:16 
QuestionExcel open Pin
MsmVc1-Nov-09 17:49
MsmVc1-Nov-09 17:49 
QuestionTransparentBlt Pin
_T("No name")1-Nov-09 17:45
_T("No name")1-Nov-09 17:45 
AnswerRe: TransparentBlt Pin
Naveen1-Nov-09 18:20
Naveen1-Nov-09 18:20 
GeneralRe: TransparentBlt Pin
_T("No name")1-Nov-09 18:30
_T("No name")1-Nov-09 18:30 
i am calling it before the TransparentBlt() only..



CDialog::OnEraseBkgnd(pDC);
CRect rcClient;
GetClientRect(rcClient);
CDC memDC;
memDC.CreateCompatibleDC(pDC);

/* TODO : Draw according to state */
/* Title left */
memDC.SelectObject(&m_bmpTitleLeft);
pDC->TransparentBlt(rcClient.left,rcClient.top,10,31,&memDC,0,0,10,31,CLR_TRANSPARENT);

/* Title Middle */
int i = 0;
memDC.SelectObject(&m_bmpTitleMiddle);
pDC->StretchBlt(rcClient.left+10,rcClient.top,rcClient.right-10,31,&memDC,0,0,1,31,SRCCOPY);

/*Title Right*/
memDC.SelectObject(&m_bmpTitleRight);
pDC->TransparentBlt(rcClient.right-10,rcClient.top,10,31,&memDC,0,0,10,31,CLR_TRANSPARENT);


/* set Title text */
pDC->SetBkMode(TRANSPARENT);
CSize szTitle = pDC->GetTextExtent(m_strTitle);
CRect rcTitle(rcClient.left+14,rcClient.top+15-(szTitle.cy/2),rcClient.left+14+szTitle.cx,rcClient.top+15+(szTitle.cy)/2);
pDC->DrawText(m_strTitle,-1,&rcTitle,DT_CENTER || DT_SINGLELINE);

/* set title box rectangle */
CRect rcTitleBox(rcClient.left,rcClient.top,rcClient.right,rcClient.top+31);
m_rcTitleBox = rcTitleBox;

/* set main view rectangle */
CRect rcViewDlg(rcClient.left,rcTitle.bottom,rcClient.right,rcClient.bottom);
m_rcViewDlg = rcViewDlg;

/* Middle right and left area */
memDC.SelectObject(&m_bmpMiddleLeft);
pDC->StretchBlt(rcClient.left,rcClient.top+31,10,rcClient.bottom-10,&memDC,0,0,10,1,SRCCOPY);

memDC.SelectObject(&m_bmpMiddleRight);
pDC->StretchBlt(rcClient.right-10,rcClient.top+31,10,rcClient.bottom-10,&memDC,0,0,10,1,SRCCOPY);

/* Middle ares is done by fill rectangle as drawing bitmap in loops makes it slow */
/* Middle area */
CRect rcMiddle(rcClient.left+10,rcClient.top+31+1,rcClient.right-10,rcClient.bottom-10);
CBrush brushMiddle(RGB(219,230,244));
pDC->FillRect(&rcMiddle,&brushMiddle);


/* Bottom left area */
memDC.SelectObject(&m_bmpBottomLeft);
pDC->BitBlt(rcClient.left,rcClient.bottom-50,10,50,&memDC,0,0,SRCCOPY);

/* Bottom middle area */
memDC.SelectObject(&m_bmpBottomMiddle);
pDC->StretchBlt(rcClient.left+10,rcClient.bottom-50,rcClient.right-10,50,&memDC,0,0,1,50,SRCCOPY);

/* Bottom right area */
memDC.SelectObject(&m_bmpBottomRight);
pDC->BitBlt(rcClient.right-10,rcClient.bottom-50,10,50,&memDC,0,0,SRCCOPY);

memDC.DeleteDC();
return TRUE;
GeneralRe: TransparentBlt Pin
Ramon F. Mendes2-Nov-09 7:23
Ramon F. Mendes2-Nov-09 7:23 
QuestionIs there any mistake for right click menu for List Ctrl. Pin
Le@rner1-Nov-09 17:15
Le@rner1-Nov-09 17:15 
AnswerRe: Is there any mistake for right click menu for List Ctrl. Pin
Naveen1-Nov-09 17:30
Naveen1-Nov-09 17:30 
QuestionHow can I implement a schedule reboot prompts using WUAPI? Or some other way? Pin
hanq_389101301-Nov-09 17:06
hanq_389101301-Nov-09 17:06 
AnswerRe: How can I implement a schedule reboot prompts using WUAPI? Or some other way? Pin
Naveen1-Nov-09 17:44
Naveen1-Nov-09 17:44 
GeneralRe: How can I implement a schedule reboot prompts using WUAPI? Or some other way? Pin
hanq_389101301-Nov-09 18:01
hanq_389101301-Nov-09 18:01 
Questionwhy CCriticalSection::Lock doesn't allow to set the timeout Pin
Ramon F. Mendes1-Nov-09 14:52
Ramon F. Mendes1-Nov-09 14:52 
AnswerRe: why CCriticalSection::Lock doesn't allow to set the timeout Pin
«_Superman_»1-Nov-09 16:02
professional«_Superman_»1-Nov-09 16:02 
AnswerRe: why CCriticalSection::Lock doesn't allow to set the timeout Pin
Naveen1-Nov-09 17:48
Naveen1-Nov-09 17:48 
AnswerRe: why CCriticalSection::Lock doesn't allow to set the timeout Pin
cmk1-Nov-09 18:31
cmk1-Nov-09 18:31 
QuestionFailure opening/reading a large file Pin
jocasa1-Nov-09 12:36
jocasa1-Nov-09 12:36 
AnswerRe: Failure opening/reading a large file Pin
CPallini1-Nov-09 20:54
mveCPallini1-Nov-09 20:54 
QuestionRe: Failure opening/reading a large file [modified] Pin
Adam Roderick J1-Nov-09 20:54
Adam Roderick J1-Nov-09 20:54 
AnswerRe: Failure opening/reading a large file Pin
jocasa1-Nov-09 22:23
jocasa1-Nov-09 22:23 
AnswerRe: Failure opening/reading a large file [solved] Pin
jocasa2-Nov-09 2:37
jocasa2-Nov-09 2:37 
QuestionWhy wifstream can not read in numbers? [modified] Pin
transoft1-Nov-09 10:31
transoft1-Nov-09 10:31 
QuestionRe: Why wifstream can not read in numbers? Pin
«_Superman_»1-Nov-09 12:18
professional«_Superman_»1-Nov-09 12:18 

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.