Hello, I am looking for a way to add menu items and toolbar bitmaps through registration of a COM object and using component categories. I have seen the "WordPad snap-in" sample in MSDN and the interfaces defined here pass HMODULE's to the main application so it can load directly from the dlls resources (specically bitmaps/strings and menus) I have a problem and a question. 1.) I get error on MIDL(MIDL2139) compiler because HMODULE is of type void or void*... 2.) Should COM objects do this sort of thing? or should all resource items be stored in a main application - this kindof defeats the object of me designing my app + "snap-ins" to make adding functionality a question of simply registering a dll..... If anyone can show me an example of how this sort of thing can be done or any pointers you can give me that would be great. thanks :confused:
P
Paul Rogan
@Paul Rogan
Posts
-
Snap-in resources -
Interface InheritanceI have had a look at aggregation - could I override methods from my base interface using this? e.g. where IB : IA IA* pIA = null pIB->QueryInterface(IID_IA, &pIA) 1) pIA->methodA() 2) pIB->methodA() would 1) call the same thing as 2) -- I think it would if these were C++ classes (using cast instead of QI). help! :confused: :confused: :confused:
-
Interface InheritanceHello, I am new to COM/ATL programming and have a question. If I want to inherit one interface from another I have previously written (e.g. IB : IA ) do I need to implement all of IA's methods in IB? if so is there any way I can use some technique that allows you to just directly call the IA method instead of having to re-write (as in C++). Thanks. Paul.