15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


COlePropertyPage

Graham -- Cunningham@tgd.swissptt.ch
Friday, February 23, 1996

Hi all,

env : WinNT 3.51 VC4.0

I am attempting to write a COM object in MFC that uses OLE property pages=
. I can get my custom interfaces to work but I would really like to use =
COlePropertyPage, cause it does a lot of work for me :-) However I cant s=
eem to work out how to declare that the interfaces used in COlePropertyPa=
ge are part of my COM object, ie QueryInterface using my objects IUnknown=
 on=20
IID_ISpecifyPropertyPages fails.

I have successfully implemented a class derived from COlePropertyPage.

I could declare my own class to handle all the various property page inte=
rfaces but I feel sure that there should be a way to use the ones in mfc.=


Currently I am facing 2 choices.
1. Implement my object as an OCX cacuse then I get the propertypage stuff=
 for free.
2. Use the various IPropertyPage interfaces directly in my code.

Any advice help gratefully recieved.
Graham Cunningham=20
email         : Cunningham@tgd.swissptt.ch
phone       : 00 41 31 338 0633



Dicky Singh -- Dicky@landmark.com
Tuesday, February 27, 1996

Thought I'll add: =20
Call OleCreatePropertyFrame's parameters 2 and 3 (x and y) don't work on =
95. e.g.
hr=3DOleCreatePropertyFrame(
        this->m_hWnd,    100/* x */,        300 /* y */,  =20
        L"QBA", //Query based action
        1,      (IUnknown **)&pIDispatch,=20
        c.cElems,    c.pElems,=20
        GetUserDefaultLCID(),=20
        0L,    NULL);
I was advised to write my own frame code (and that's what I plan to do, =
for reasons stronger than this) and call IPropertyPage interfaces =
directly.  (i.e. your choice 2.)  You'll have to implement =
IPropertyPageSite, ISpecifyPropertyPages, IPageContainer(!!) interfaces =
along with some other interfaces.

----------
From: 	Cunningham, Graham[SMTP:Cunningham@tgd.swissptt.ch]
Sent: 	Friday, February 23, 1996 5:21 a
To: 	'mfc-l@netcom.com'
Subject: 	COlePropertyPage

Hi all,

env : WinNT 3.51 VC4.0

I am attempting to write a COM object in MFC that uses OLE property =
pages. I can get my custom interfaces to work but I would really like to =
use COlePropertyPage, cause it does a lot of work for me :-) However I =
cant seem to work out how to declare that the interfaces used in =
COlePropertyPage are part of my COM object, ie QueryInterface using my =
objects IUnknown on=20
IID_ISpecifyPropertyPages fails.

I have successfully implemented a class derived from COlePropertyPage.

I could declare my own class to handle all the various property page =
interfaces but I feel sure that there should be a way to use the ones in =
mfc.

Currently I am facing 2 choices.
1. Implement my object as an OCX cacuse then I get the propertypage =
stuff for free.
2. Use the various IPropertyPage interfaces directly in my code.

Any advice help gratefully recieved.
Graham Cunningham=20
email         : Cunningham@tgd.swissptt.ch
phone       : 00 41 31 338 0633


------------------------------
// Dicky
// Dicky@Landmark.com




| Вернуться в корень Архива |