|
thanks i will try that.
Could you please have a look at my thread 'ATL activeX control Initialize', directly below this one.
|
|
|
|
|
thanks i will try that.
Could you please have a look at my thread 'ATL activeX control Initialize', directly below this one.
|
|
|
|
|
|
thanks i will try that.
Could you please have a look at my thread 'ATL activeX control Initialize', directly below this one.
|
|
|
|
|
Hi, i've just created an ATL dll which houses a full control for activeX support.
Basically it's working ok.
However i need to run some code once the control has been installed successfully. (after Register server)
This control is windowless.
In an MFC based control i could use something like OnCreate() but i don't have a clue where to start here.
I basically need an event that gets called once the control is installed.
Please Help
Thanks in advance!!!
Carl
|
|
|
|
|
|
Hello
Every time I try to create a RichEdit (using CRichEditCtrl), Create fails and GetLastError returns either ERROR_CANNOT_FIND_WND_CLASS or ERROR_CLASS_DOES_NOT_EXIST. I looked in the CRichEditCtrl class and the window class seems to be "RICHEDIT". Has anyone else had this problem or am I just doing something wrong? (When I use MFC, it works fine.)
|
|
|
|
|
|
|
Hi,All,I am developing an ACTIVEX control embedded in IE, which is used to display continuous jpegs captured from a server.Firstly I wrote my ACTIVEX control in MFC,and call InvalidateControl() to realize control window redraw.It is ok.Then I rewrote my ACTIVEX in ATL,most of the code regards to grapic are same,but this time since InvalidateControl() can not be called in ATL based control, I call FireViewChange() to realize control window redraw time by time.However,I found that the control window got flicker when it is redraw.What happened and how to deal with?
please contact:
max_xiayi@hotmail.com
|
|
|
|
|
FireViewChange() calls InvalidateRect with bErase=TRUE. You'll need to write your own FireViewChange() and pass FALSE for bErase.
<br />
inline HRESULT CComControlBase::FireViewChange()<br />
{<br />
if (m_bInPlaceActive)<br />
{<br />
if (m_hWndCD != NULL)<br />
::InvalidateRect(m_hWndCD, NULL, TRUE);
else if (m_spInPlaceSite != NULL)<br />
m_spInPlaceSite->InvalidateRect(NULL, TRUE);
}<br />
else
SendOnViewChange(DVASPECT_CONTENT);<br />
return S_OK;<br />
}<br />
Todd Smith
|
|
|
|
|
Having the same problem here. I have tried the above suggestion but it has not worked. I still get flickering. I have also user temporary DC buffer to do all the drawing onto before copying the buffer to the final output in one step.
Anybody come up with another way arround this?
Thanks,
Aristotel
|
|
|
|
|
Anyone?
|
|
|
|
|
Ok...quite embarrasing but basically I had forgotten to add
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkgnd)
So onEraseBkgnd was not being called at all. Silly me...
|
|
|
|
|
Hi
I create in VC.7 an control and when one of property change it affected other,
and container should change this second property also.But when i test
my control in VB.NET affected property not changed(in property window),althoughi invoke FireOnChange for one.
<br />
class ATL_NO_VTABLE CMyControl : <br />
public CComObjectRootEx<CComSingleThreadModel>,<br />
public CStockPropImpl<CMyControl, IDigDisplay><br />
public IPersistStreamInitImpl<CMyControl>,<br />
public IOleControlImpl<CMyControl>,<br />
public IOleObjectImpl<CMyControl>,<br />
public IOleInPlaceActiveObjectImpl<CMyControl>,<br />
public IViewObjectExImpl<CMyControl>,<br />
public IOleInPlaceObjectWindowlessImpl<CMyControl>,<br />
public IConnectionPointContainerImpl<CMyControl>,<br />
public IPropertyNotifySinkCP<CMyControl>,<br />
public CProxy_IDigDisplayEvents<CMyControl>, <br />
public IPersistStorageImpl<CMyControl>,<br />
public ISpecifyPropertyPagesImpl<CMyControl>,<br />
public IQuickActivateImpl<CMyControl>,<br />
public IDataObjectImpl<CMyControl>,<br />
public IProvideClassInfo2Impl<&CLSID_CMyControl, &__uuidof(_IMyControlEvents), &LIBID_MyControlLib>,<br />
public CComCoClass<CDigDisplay, &CLSID_CMyControl>,<br />
public CComControl<CMyControl><br />
{<br />
..<br />
}<br />
<br />
<br />
CMyControl()::put_FirstProperty(short newVal)<br />
{<br />
m_firstValue = newVal;<br />
m_secondValue = newVal + 1;<br />
<br />
FireOnChanged(1);<br />
FireOnChanged(2);<br />
}<br />
<br />
...<br />
<br />
CMyControl()::put_SecondProperty(short newVal)<br />
{<br />
m_secondValue = newVal;<br />
FireOnChanged(2);<br />
}<br />
<br />
CMyControl()::get_SecondProperty(short* pVal)<br />
{<br />
*pVal = m_secondValue;<br />
}<br />
<br />
Thats i miss here???
Thank
|
|
|
|
|
I am trying to develop the gird control in which Comboboxes are displayed over each subitem.
In DrawItem event i am displaying the combobox for each subitem, which is i think cause the flickering problem. Anyone knows the solution to remove the flickering in this scenario.
<br />
for(int nRow = 0; nRow < rows; ++ nRow)<br />
{<br />
<br />
for(int nCol = 0; cols; nCol++ )<br />
{<br />
}<br />
}<br />
|
|
|
|
|
While I've never had to do what you're doing, two things come to mind
1. Queue up the display of multiple windows with DeferWindowPos()
2. In the parent, change the erase background code to create a region that exclude the area of the child windows - I neat trick for dealing with excessive flickering when resizing a dialog.
I hope this helps
[ Jason De Arte | Toy Maker | 1001010.com ]
|
|
|
|
|
Jason De Arte wrote:
2. In the parent, change the erase background code to create a region that exclude the area of the child windows - I neat trick for dealing with excessive flickering when resizing a dialog.
Isn't WS_CLIPCHILDREN supposed to do this... I've a couple of dialogs which I want flicker free. WS_CLIPCHILDREN doesn't always help me. Say, you don't have a small dialog sample anywhere you'd like to show me, or better yet, write an article about it?
--
Arigato gozaimashita!
|
|
|
|
|
Jörgen Sigvardsson wrote:
Say, you don't have a small dialog sample anywhere you'd like to show me, or better yet, write an article about it?
When I have some time, I might write a small article - but it's realy easy to do for most controls (except group boxes) on your resizing dialog.
1. In your WM_ERASEBKGND handler...
2. Create a region of the client area
3. For each valid & visible child window you want to exclude,
3.a. create a region of that window (try GetWindowRgn, XP Themes tends to make buttons round)
3.b. remove the child region - CombineRgn(rgnChild,rgnDlg,RGN_XOR)
4. Paint your background, I use FillRgn
5. return TRUE from WM_ERASEBKGRND, or all your work will be undone.
Minor details were left out, but you'll get the idea.
[ Jason De Arte | Toy Maker | 1001010.com ]
|
|
|
|
|
I think I understand the idea. Now the question is; is this applicable for other controls than dialogs? I've had controls on resizable tab controls, and the flickering has been so bad. For this to work I need to be able to draw theme backgrounds using regions (tab controls have gradient backgrounds in XP). Seeing that the theme APIs don't make use of regions, I suppose I will have to give the HDC a clipping region. Do you know if that is possible? I'm guessing that selecting (SelectObject) a region will cause DC operations to be clipped by the region. (I'm really lost when it comes to advanced GDI )
--
Arigato gozaimashita!
|
|
|
|
|
I want to use a button or link on the HTML page to invoke an action contained on my custom tool bar. Using JavaScript, how can I get a reference to the toolbar?
I've reviewed the the article and source code at http://www.codeproject.com/atl/dahlia.asp[^].
I see that the developer somehow injects a property into the document that has a reference to the control into the top window's document, but I can't understand the cpp code that does it.
I've written my toolbar with c# and a COM wrapper, as I'm not a c++ man.
Thanks,
Mark Varvil
|
|
|
|
|
What I've done is have the toolbar listen for navigaion events, then have the link in the page navigate to some special URL like:
<a href="http://--toolbarcommand--/commandname">Click here</a>
When the toolbar sees the "--toolbarcommand--" part in the OnBeforeNavigate2 event, it cancels the navigation and executes the command.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
Four fonts walk into a bar. The bartender says "Hey - get out! We don't want your type in here."
|
|
|
|
|
how do I solve the problem like:
error C2970: 'IDispEventImpl' : template argument 'plibid' : invalid address of static variable 'LIBID_MoticMotorLib'
error C2065: 'DIID__IStageEvents' : undeclared identifier
.....
thanks!
andy_cn
|
|
|
|
|
want to retieve currently written text in iexlorer address bar when user
press enter button or click go button
pls help
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
1. How about writing an application that connects to running instance of IE and use DWebBrowserEvents2 interface.
2. Write a plugin for IE that uses DWebBrowserEvents2 interface
You can check out IE programming articles on www.codeguru.com
Hope this helps
-------------------------
Have a great day ahead!
Regards,
Sohail Kadiwala
modified 21-Apr-21 21:01pm.
|
|
|
|