Customizing Inspector's caption

  • Thread starter Vladimir Chtchetkine
  • Start date
V

Vladimir Chtchetkine

Hi everyone!

How can I customize the caption of Inspector window? Do I have any
control over it at all? I know that this property is r/o but may be
there are some other places where I can make adjustmens that would
result in a desired caption? What I'm doing in my code is calling
CreateItemFromTemplate and then creating and displaying new Inspector
for that item. Any advice would be very welcome :)

TIA,

Vladimir
 
M

Matt Fletcher

Vladimir Chtchetkine said:
Hi everyone!

How can I customize the caption of Inspector window? Do I have any
control over it at all? I know that this property is r/o but may be
there are some other places where I can make adjustmens that would
result in a desired caption? What I'm doing in my code is calling
CreateItemFromTemplate and then creating and displaying new Inspector
for that item. Any advice would be very welcome :)

TIA,

Vladimir

As OOM doesn't support this why not get the Inspector's window handle using
IOleWindow and set the caption using SetWindowText - the code below seems to
work.

Matt Fletcher


_InspectorPtr spInspector;
HWND hwndInspector;

// need to initialise spInspector

CComQIPtr<IOleWindow> spOleWindow = spInspector;

if (spOleWindow)
spOleWindow->GetWindow(&hwndInspector);

if (hwndInspector)
SetWindowText(hwndInspector, "Customised caption");
 
V

Vladimir Chtchetkine

Thank you, Sue! That's what I figured out too :) The problem is that
it is not only "possible form name" but IT IS form name and I do not
want it to be that form name. I don't want to go directly to Window
stuff (as Matt suggested) 'cause it's sort of a hack and I don't like
doing it as long as there are some legitimate ways around.

Regards,

Vladimir
 
V

Vladimir Chtchetkine

Matt: Thanks a lot! If other ways fail I'll do as you suggested :)

Regards,

Vladimir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top