|
No, it is not that. A group box has a caption, but I don't want a gray background for it.
|
|
|
|
|
So you are saying if you put a group box in a standard white window the caption has a gray background? That's nasty. I see Michael Dunn has given you the answer. Give him a 5 for that.
led mike
|
|
|
|
|
Remember, led mike, you can give a man a gift certificate for a filet-o-fish and he'll eat for a
day. Get a man a job at McDonalds and he'll have an employee discount for life.
I think that's how the saying goes...
|
|
|
|
|
led mike
|
|
|
|
|
You cold resize/reposition the tab control to fit in the group box.
Making the groupbox text transparent is tough. Ownerdraw may help but it seems easier to just
draw a frame and the text.
I don't use ATL, I use MFC so I can't provide an example.
Mark
|
|
|
|
|
Yeah....this is why more and more businesses are dumping Visual C++...this is something that C# or VB programmers are not even thinking about, they just put it on the window and concentrate on the more important business logic.
|
|
|
|
|
Yeah, I can only dream of using those fancy new Windows controls they have in C# and VB.
|
|
|
|
|
Yeah non-software companies usually use VB for their internal programming and software companies usually do not use VB for their products.
Microsoft could have provided for VC the conveniences they provided for VB but they just did not.
Many things are easier in VB but when we need to do things that VB is not designed to do then VB is more difficult.
|
|
|
|
|
That is fine, but we could just have at least the basic functionality, not to bother with the transparency of static controls, for goodness sake.
Sarajevo, Bosnia
|
|
|
|
|
Set the Transparent style bit on the group box (WS_EX_TRANSPARENT ).
|
|
|
|
|
If only they had implemented it in the text part of the control. What's interesting is the part
inside the box is transparent with or without that style set
|
|
|
|
|
Yeah, the group box has weird behavior when themes are on in XP (maybe Vista too? not sure about that)
|
|
|
|
|
I truly believe that with Vista we'll encounter a whole new set of problems with even the most common controls.
Sarajevo, Bosnia
|
|
|
|
|
Thanks for your help, Mike, but it doesn't work.
Simply selecting a Transparent property from the property control ( I use Visual Studio .Net 2005, but the application is Visual C++ with ATL 8 ) would add a WS_EX_TRANSPARENT bit to the group box (I checked the .rc file and it is like that). However, even though the group box does draw transparently, the caption bar of the group box still has an ugly gray background behind the black color text. I just don't know how to get rid of it.
|
|
|
|
|
Hi
I have a Picture Controls (IDC_STATIC) on a DIALOG
and I wish to Transparent the corners of the
Picture in the Control
but when i use the
SetWindowRgn ( HWND hWnd, HRGN hRgn, BOOL bRedraw );
nothing happen.
maybe because it a STATIC winds ?
any suggestion ?
|
|
|
|
|
Probably because it's a control it draws itself the way it chooses (ok, the way it was written).
You could just draw the picture yourself and clip it any way you want.
Mark
|
|
|
|
|
I need help learning how to convert a WCHAR* which points to a string such as L"118.000" to a FLOAT64.
I am trying to do it like this:
if(IsValidComFreq(freq))
{
wchar_t** end = NULL;
m_Com3Stby = wcstol(freq, end, 10);
}
** Where:
FLOAT64 m_Com3Stby; // a double
WCHAR *freq = L"118.000"; // for example
But I am guessing this is wrong. What is the best way to do this?
Thanks.
|
|
|
|
|
How about _wtof() instead of wcstol()?
Mark
|
|
|
|
|
|
You should use wcstod instead - it returns a double. Your wcstol only returns a long, so it will just return 118 (even if your input was 118.243).
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Thanks, that was the ticket. Stupid me forgot the diff between a long and a double.
|
|
|
|
|
I do not think that FLOAT64 is a proper type... Are you sure that is what you need to convert to, and not int64 or double ?
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
It could be a typedef or define somewhere ... Most likely for double .
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
FLOAT64 is an MS typedef that is commonly used by those of us that program for Windows.
|
|
|
|
|
Hmmm... Not viewed my profile, eh?
I have been programming on Windows ever since the 3.0 days and I have never seen FLOAT64 . I would bet that the typedef is not found in a common (common as is commonly available) MS SDK file. In fact, the only pseudo-Windows-specific place I can find it is in MSIL, and this IS the VC++ board...
Anyway... A 64-bit floating point variable is a double, and that is likely the real type behind the typedef. In that case, something like ::_wcstod(...) should do the trick.
Peace!
-- modified at 8:24 Wednesday 13th December, 2006
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|