I know someone must have asked this before...
Does anyone know what to make a checkbox transparent on a PropertyPage? It seems to work fine on a Dialog, but it's all black on the PropertyPage.
// Change any attributes of the DC here
CBrush m_HollowBrush;
// Return a different brush if the default is not desired
// let static controls shine through
switch(nCtlColor) {
case CTLCOLOR_STATIC :
case CTLCOLOR_BTN:
case CTLCOLOR_MSGBOX:
pDC->SetBkMode(TRANSPARENT);
VERIFY(m_HollowBrush.CreateStockObject(HOLLOW_BRUSH));
return HBRUSH(m_HollowBrush);
default:
break;
}
I'm using Visual C++ .NET which is version 7.0 I think.
I created my project as a Dialog project and then created my PropertyPages. I'm only having problems on the PropertySheets with a background. If there's no background, there's no problem.
What I posted is exactly what I have. How do you use tags?
Please let me know what else I can get you to make this easier for you.
I'm using Visual C++ .NET which is version 7.0 I think.
Visual C++ .NET is not a Widows version. You are using Visual Studio 2000 (ver. 7.0) that is part of .NET programming environment.
If you are not sure go Help->About. It is important to know what environment you are working in. Windows versions differ and behave differently, that is why I have asked for Windows version not developer tool version.
I am not able to tell you what is wring since I have not encounter problem you have running app in Windows 2000.
To reproduce an error I would have to test it on the same platform as you do. Did you try running it on different versions of Windows?
There are only 10 types of people in the world: Those who understand binary and those who do not.
// Change any attributes of the DC here
CBrush m_HollowBrush;
// Return a different brush if the default is not desired
// let static controls shine through
switch(nCtlColor) {
case CTLCOLOR_STATIC :
case CTLCOLOR_BTN:
case CTLCOLOR_MSGBOX:
pDC->SetBkMode(TRANSPARENT);
VERIFY(m_HollowBrush.CreateStockObject(HOLLOW_BRUSH));
return HBRUSH(m_HollowBrush);
default:
break;
}
You're aware this thread is 6 years old, are you? However, at least JohnCz is still around and maybe he sees your post.
Note that the thread was erroneously moved here: The code discussed is native C++ with MFC while this section is for C++/CLI (formerly known as Managed C++). Which development platform are you using? In case it's C++ with MFC, the right place to ask about that is: http://www.codeguru.com/forum/forumdisplay.php?f=7
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
Yes, I am still here.
It is (as Eri523 pointed) a very old thread.
Also, I have never seen problems that are exactly the same. Result may be the same or similar bur source of a problem is not the same.
I would follow Eri523’s suggestion and create new thread in proper forum, attaching either snippets of your code or better yet entire sample application project presenting problem you are trying to solve.
There are only 10 types of people in the world: Those who understand binary and those who do not.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.