Click here to Skip to main content
16,007,809 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: SDK and API Pin
Saurabh.Garg16-Jun-08 21:49
Saurabh.Garg16-Jun-08 21:49 
AnswerRe: SDK and API Pin
Paresh Chitte17-Jun-08 0:26
Paresh Chitte17-Jun-08 0:26 
QuestionCStatic embedded to a Progress Dialog gets disapeared when the window is resized Pin
Raj-Ekoham DwitiyoNasti16-Jun-08 21:02
Raj-Ekoham DwitiyoNasti16-Jun-08 21:02 
AnswerRe: CStatic embedded to a Progress Dialog gets disapeared when the window is resized Pin
Hamid_RT16-Jun-08 21:27
Hamid_RT16-Jun-08 21:27 
QuestionRe: CStatic embedded to a Progress Dialog gets disapeared when the window is resized Pin
David Crow17-Jun-08 3:34
David Crow17-Jun-08 3:34 
AnswerRe: CStatic embedded to a Progress Dialog gets disapeared when the window is resized Pin
Raj-Ekoham DwitiyoNasti17-Jun-08 20:38
Raj-Ekoham DwitiyoNasti17-Jun-08 20:38 
QuestionRe: CStatic embedded to a Progress Dialog gets disapeared when the window is resized Pin
David Crow18-Jun-08 2:25
David Crow18-Jun-08 2:25 
AnswerRe: CStatic embedded to a Progress Dialog gets disapeared when the window is resized Pin
Raj-Ekoham DwitiyoNasti18-Jun-08 20:31
Raj-Ekoham DwitiyoNasti18-Jun-08 20:31 
Well, Run Time.
I have achieved Transparency of the CStatic now.
This is what my sample application has done

HBRUSH CStaticTestDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);

// TODO: Change any attributes of the DC here

if(nCtlColor == CTLCOLOR_STATIC)
{
hbr = (HBRUSH)::GetStockObject(NULL_BRUSH);
pDC->SetBkMode(TRANSPARENT);
}
// TODO: Return a different brush if the default is not desired
return hbr;
}

And my ButtonClick handler is :

void CStaticTestDlg::OnBnClickedButton1()
{
TCHAR szBuff[200];
int i=0;
m_Progress.SetRange(0,100);
m_Progress.SetPos(0);
m_Progress.SetStep(1);
for(m_nNum=0;m_nNum<100;m_nNum++)
{
Sleep(1000);
m_Progress.StepIt();
_stprintf(szBuff, _T("%d"),m_nNum);
m_Static.SetWindowText( szBuff);

}
// TODO: Add your control notification handler code here
}

But Now the problem is that when the szBuff gets overwritten.
Can you please help me achieve removing overwriting.
If I use a WHITE_BRUSH in the OnCtlColor() then everything is fine only the CStatic remains no more transparent.
Plz Help!!

Thanks and Regards,

Purusottam Mishra
Systems Executive
GeneralRe: CStatic embedded to a Progress Dialog gets disapeared when the window is resized Pin
David Crow19-Jun-08 3:30
David Crow19-Jun-08 3:30 
GeneralRe: CStatic embedded to a Progress Dialog gets disapeared when the window is resized Pin
Raj-Ekoham DwitiyoNasti19-Jun-08 4:03
Raj-Ekoham DwitiyoNasti19-Jun-08 4:03 
QuestionRe: CStatic embedded to a Progress Dialog gets disapeared when the window is resized Pin
David Crow19-Jun-08 4:10
David Crow19-Jun-08 4:10 
AnswerRe: CStatic embedded to a Progress Dialog gets disapeared when the window is resized Pin
Raj-Ekoham DwitiyoNasti19-Jun-08 21:12
Raj-Ekoham DwitiyoNasti19-Jun-08 21:12 
QuestionIs it posible to use the hotkeys CTRL-R, CTRL-H for doing some actions in an IE plug-in? Pin
danginkgo16-Jun-08 20:39
danginkgo16-Jun-08 20:39 
AnswerRe: Is it posible to use the hotkeys CTRL-R, CTRL-H for doing some actions in an IE plug-in? Pin
Rajesh R Subramanian16-Jun-08 20:55
professionalRajesh R Subramanian16-Jun-08 20:55 
GeneralRe: Is it posible to use the hotkeys CTRL-R, CTRL-H for doing some actions in an IE plug-in? Pin
danginkgo16-Jun-08 21:02
danginkgo16-Jun-08 21:02 
GeneralRe: Is it posible to use the hotkeys CTRL-R, CTRL-H for doing some actions in an IE plug-in? Pin
Rajesh R Subramanian16-Jun-08 21:11
professionalRajesh R Subramanian16-Jun-08 21:11 
GeneralRe: Is it posible to use the hotkeys CTRL-R, CTRL-H for doing some actions in an IE plug-in? Pin
danginkgo16-Jun-08 21:20
danginkgo16-Jun-08 21:20 
QuestionDialog changes in VC++ Pin
Andy Rama16-Jun-08 20:35
Andy Rama16-Jun-08 20:35 
AnswerRe: Dialog changes in VC++ Pin
Hamid_RT16-Jun-08 20:40
Hamid_RT16-Jun-08 20:40 
QuestionRe: Dialog changes in VC++ [modified] Pin
Andy Rama16-Jun-08 21:04
Andy Rama16-Jun-08 21:04 
AnswerRe: Dialog changes in VC++ Pin
Hamid_RT16-Jun-08 21:19
Hamid_RT16-Jun-08 21:19 
AnswerRe: Dialog changes in VC++ Pin
Naveen16-Jun-08 21:20
Naveen16-Jun-08 21:20 
QuestionRe: Dialog changes in VC++ Pin
Andy Rama16-Jun-08 21:58
Andy Rama16-Jun-08 21:58 
AnswerRe: Dialog changes in VC++ Pin
Hamid_RT16-Jun-08 23:56
Hamid_RT16-Jun-08 23:56 
GeneralRe: Dialog changes in VC++ Pin
Andy Rama17-Jun-08 2:35
Andy Rama17-Jun-08 2:35 

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.