Click here to Skip to main content
15,923,083 members
Home / Discussions / COM
   

COM

 
GeneralRe: Do you own "Inside COM" Please Help Me. Pin
Anonymous20-Jan-03 21:47
Anonymous20-Jan-03 21:47 
GeneralRe: Do you own "Inside COM" Please Help Me. Pin
Ryan B.21-Jan-03 3:28
Ryan B.21-Jan-03 3:28 
GeneralRe: Do you own "Inside COM" Please Help Me. Pin
21-Jan-03 14:22
suss21-Jan-03 14:22 
GeneralBooklist Help / Suggestions... Pin
Ryan B.20-Jan-03 3:45
Ryan B.20-Jan-03 3:45 
GeneralRe: Booklist Help / Suggestions... Pin
Christian Graus21-Jan-03 20:12
protectorChristian Graus21-Jan-03 20:12 
GeneralRe: Booklist Help / Suggestions... Pin
thowra22-Jan-03 9:01
thowra22-Jan-03 9:01 
GeneralRe: Booklist Help / Suggestions... Pin
Renjith Ramachandran23-Jan-03 4:50
Renjith Ramachandran23-Jan-03 4:50 
GeneralDrawing subclassed ActiveX Control Pin
Tym!19-Jan-03 6:17
Tym!19-Jan-03 6:17 
I am attempting to develop an ActiveX control subclassed from the MFC Listbox.
Following the MSDN tutorial, I set everything up through the Control Wizard, including setting LISTBOX as the subclassed windows control. The problem is, the tutorials (I have read several) all say "If you want your subclassed control to keep the same appearance as the corresponding Windows control, the OnDraw member function for the control should contain only a call to the DoSuperclassPaint member function, as in the following example:

void CSampleCtrl::OnDraw( CDC* pdc, const CRect& rcBounds,
const CRect& rcInvalid )
{
DoSuperclassPaint( pdc, rcBounds );
}
"

Which is what the Control Wizard automatically does and which is how I left it. I was thinking that if I just leave it like so, when I add it to a new project, it will draw me a standard-looking listbox. Instead, I get a plain white box. I also tried calling AddString in my project and was informed by the compiler that the method does not exist.

So far I see no evidence of my ActiveX control being subclassed form LISTBOX (I have the following as well provided by class wizard:

BOOL CSampleCtrl::PreCreateWindow( CREATESTRUCT& cs )
{
cs.lpszClass = _T("BUTTON");
return COleControl::PreCreateWindow(cs);
}
BOOL CSampleCtrl::IsSubclassedControl( )
{
return TRUE;
}

)

Why am I just getting a white box?? Are there some message handlers I need to address first?? As for the AddString not working, I'm still a little rusty on subclassing... do I have to add methods for all listbox methods I want to use in my control and just call CListbox::Addstring(blah, blah, blah) in order to use the Listbox Functionality???

I have read a lot of articles and tutorials on subclassing and activex controls and mfc controls and there seems to be something that I don't know that is overlooked or assumed to be obvious. Any ideas??

Tym!


GeneralCOM+ Question Pin
voonna17-Jan-03 3:36
voonna17-Jan-03 3:36 
GeneralRe: COM+ Question Pin
Erik Juhl30-Jan-03 7:49
Erik Juhl30-Jan-03 7:49 
GeneralActive X control crash question Pin
bryce16-Jan-03 14:09
bryce16-Jan-03 14:09 
GeneralRe: Active X control crash question Pin
Monty India20-Jan-03 1:54
Monty India20-Jan-03 1:54 
GeneralRe: Active X control crash question Pin
bryce20-Jan-03 10:38
bryce20-Jan-03 10:38 
GeneralPlam Desktop Pin
candan15-Jan-03 20:37
professionalcandan15-Jan-03 20:37 
GeneralRe: Plam Desktop Pin
Christian Graus22-Jan-03 11:17
protectorChristian Graus22-Jan-03 11:17 
GeneralCustom IE Protocol Handlers Pin
Jamie Hale15-Jan-03 3:55
Jamie Hale15-Jan-03 3:55 
GeneralRe: Custom IE Protocol Handlers Pin
Stephane Rodriguez.16-Jan-03 2:00
Stephane Rodriguez.16-Jan-03 2:00 
GeneralRe: Custom IE Protocol Handlers Pin
Jamie Hale16-Jan-03 2:35
Jamie Hale16-Jan-03 2:35 
Generaladd-ins in c++ using the DTE-object Pin
schaereran@gmx.net14-Jan-03 23:52
schaereran@gmx.net14-Jan-03 23:52 
GeneralRe: add-ins in c++ using the DTE-object Pin
Stephane Rodriguez.16-Jan-03 2:04
Stephane Rodriguez.16-Jan-03 2:04 
GeneralRe: add-ins in c++ using the DTE-object Pin
schaereran@gmx.net16-Jan-03 2:38
schaereran@gmx.net16-Jan-03 2:38 
GeneralRe: add-ins in c++ using the DTE-object Pin
Stephane Rodriguez.16-Jan-03 2:40
Stephane Rodriguez.16-Jan-03 2:40 
GeneralRe: add-ins in c++ using the DTE-object Pin
schaereran@gmx.net16-Jan-03 4:55
schaereran@gmx.net16-Jan-03 4:55 
GeneralRe: add-ins in c++ using the DTE-object Pin
Stephane Rodriguez.16-Jan-03 6:18
Stephane Rodriguez.16-Jan-03 6:18 
GeneralRe: add-ins in c++ using the DTE-object Pin
Amit Dey17-Jan-03 13:19
Amit Dey17-Jan-03 13:19 

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.