EliMLi

I found that there is a subtle difference between html page in IE (IE7) and in a ActiveX window ( ATL - CAxWindow). For example in IE the default buttons are slightly rounded while in ActiveX - rectangular; the default input fields in IE have got solid borders, in ActiveX - the border is 3D.

Is it any possibility to make an activex window that looks exactly like IE


Re: Internet Explorer Extension Development Difference between IE and ActiveX windows

IECUSTOMIZER

Hi Eli,

I think you will find that this is a Windows Theme setting for Windows XP. Using the Windows Classic Theme should make everything look consistant.

Regards






Re: Internet Explorer Extension Development Difference between IE and ActiveX windows

EliMLi

So, do you mean windows theme doesn't apply on active x windows




Re: Internet Explorer Extension Development Difference between IE and ActiveX windows

Sdi

The control "window" objects displayed by IE are not "real" window objects (except for pre-IE7 <select> controls); IE draws all the borders, shading, effects, etc. of those objects on its own client area. If you want your objects to look like IE controls, you'll need to draw your object using the same logic. As the other post mentions, you'll need to be aware of the active UI theme.



Re: Internet Explorer Extension Development Difference between IE and ActiveX windows

EliMLi

Right, but the control objects displayed by an activex window (that hosts a web control) are not "real" objects as well. But why the look is different Is it possible to make it identical



Re: Internet Explorer Extension Development Difference between IE and ActiveX windows

Sdi

IE doesn't draw what's inside the ActiveX control's area; you do. So you have to draw them themed. Read up on the Theme APIs, and take a look at one of Raymond's blog pages on drawing themed UI elements.



Re: Internet Explorer Extension Development Difference between IE and ActiveX windows

EliMLi

I mean an activex window that hosts a web browser control. This web browser control looks different from a web browser control in IE (I guess IE uses a web browser control in its window as well)



Re: Internet Explorer Extension Development Difference between IE and ActiveX windows

Sdi

Who's hosting the WebOC What does IsAppThemed() say



Re: Internet Explorer Extension Development Difference between IE and ActiveX windows

EliMLi

In my experiments the control is hosted by a notepad window (or any other window application). Here is what I do:

Code Snippet


HWND hwnd = (HWND)0x0167077A; // some hwnd I found using spy++
RECT rect;
GetClientRect(hwnd, &rect);
CAxWindow browser;
browser.Create(hwnd, rect, _T(""), WS_CHILD | WS_VISIBLE, 0);
// message loop


IsAppThemed() returns FALSE




Re: Internet Explorer Extension Development Difference between IE and ActiveX windows

Sdi

IsAppThemed() returns FALSE

Which answers your question: if the app says "I don't do themes", you get the un-themed window adornments.