I find myself with two problems, one led to the other.
I created a custom OCX in VC, a pretty simple one that acts like a button
but is drawn differently to standard buttons. This control is used in a
couple of VB projects (which of course use OCXs very easily). It works fine,
and has done for a good year or so; but I've just found out its one flaw -
actually I'm not sure whether the control is at fault, or VB's handling of
visible OCXs. When I tried to create and position a standard label
overlapping the button, the idea being that the label would appear
temporarily to give information and a small countdown then disappear again,
I found that the label was always /underneath/ the OCX control. VB wouldn't
let me change the tab order (and thus creation order of controls, and thus
ZOrder) to make it work - even though I can change its tab order nominally
(the number indicating order of creation), it makes no difference. I even
tried adding a SendToBack() method to its interface and calling that (it
calls SetWindowPos(&CWnd::wndBottom...) ), but even that doesn't work. I
also checked that it had the WS_CLIPSIBLINGS style, because without it it
won't remove the client area of overlapping controls from its paint DC and
thus would blindly paint over the top of their client areas, which this
might have been - but it already has that style (confirmed by removing it
and checking the style DWORD had changed).
So, I wanted to test the control in VC, to see if it still had the same
ZOrder problem or was something unique to VB. But when I #imported the TLB
file, I find that I can't get the code to compile, because it references a
"PicturePtr" object, and I cannot find the right header file to include
anywhere. CPictureHolder in MSDN mentions including "ocidl.h" - no joy. It
also mentions "afxctl.h" - no joy. So I can't even do that. I'd test it in
the ActiveX control test container but I don't think I'd be able to get a
standard label in it to test overlapping {:v(
Help? Anyone seen this effect before, and know what's wrong?
--
Jason Teagle
[EMAIL PROTECTED]
_______________________________________________
msvc mailing list
[EMAIL PROTECTED]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription
changes, and list archive.