Click here to Skip to main content
15,908,013 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralUnable to add variable for ATL Control Pin
KASR110-Jan-08 22:21
KASR110-Jan-08 22:21 
GeneralConvert CString to BSTR Pin
mandanani10-Jan-08 20:07
mandanani10-Jan-08 20:07 
QuestionRe: Convert CString to BSTR Pin
CPallini10-Jan-08 21:59
mveCPallini10-Jan-08 21:59 
GeneralRe: Convert CString to BSTR Pin
mandanani10-Jan-08 23:17
mandanani10-Jan-08 23:17 
GeneralRe: Convert CString to BSTR Pin
Lim Bio Liong12-Jan-08 3:23
Lim Bio Liong12-Jan-08 3:23 
GeneralRe: Convert CString to BSTR Pin
ShilpiP24-Jan-08 21:08
ShilpiP24-Jan-08 21:08 
GeneralRe: Convert CString to BSTR Pin
ThatsAlok26-Feb-08 22:00
ThatsAlok26-Feb-08 22:00 
QuestionProblem with element event handling of WebBrowser Control Pin
javan10-Jan-08 16:28
javan10-Jan-08 16:28 
Hi, my program uses a WebBrowser Control with the following code:


HRESULT hr = CoCreateInstance(CLSID_WebBrowser,<br />
NULL,<br />
CLSCTX_INPROC,<br />
IID_IWebBrowser,<br />
(void**)&m_spWebBrowser); 



Then I navigate the control to a local html file, which contains some type text inputs, the code is like this;
<span contentEditable="true"></span>


Upon the load completion, I attached a render behevior for each element, the definition is list below:

class ATL_NO_VTABLE CIdsUISpanRB : <br />
public CComObjectRootEx<CComSingleThreadModel>,<br />
public CComCoClass<CIdsUISpanRB, &CLSID_IdsUISpanRB>,<br />
public IDispatchImpl<IIdsUISpanRB, &IID_IIdsUISpanRB, &LIBID_IdsViewer>,<br />
public IElementBehavior,<br />
public IElementBehaviorFactory,<br />
public IHTMLPainter 





The render behavior above implemented an event sink, I conneted it with the webbrowser control by AtlAdvise:
hr = AtlAdvise(m_spElem, (IDispatch*)this, // m_spElem is the element<br />
DIID_HTMLElementEvents2,<br />
&m_dwCookie); 



What I want to do, is to process the input event within the invoke method of IDispatch interface:

STDMETHODIMP CIdsUISpanRB::Invoke( DISPID dispidMember,<br />
REFIID riid,<br />
LCID lcid,<br />
WORD wFlags,<br />
DISPPARAMS* pdispparams,<br />
VARIANT* pvarResult,<br />
EXCEPINFO* pexcepinfo,<br />
UINT* puArgErr)<br />
{<br />
switch (dispidMember)<br />
{<br />
case DISPID_HTMLDOCUMENTEVENTS_ONKEYDOWN:<br />
{<br />
// my handling code, the problem here is that the keydown event<br />
// never happens, instead, I can only get keypress event here.<br />
break;<br />
}<br />
}<br />
}



The problem I have, is that I can't get keydown or keyup event, but only keypress message, so any one can tell me why? how to get the keydown event?



Another thing, I attached an edit designer to the whole html docuement mentioned above, in order to handle events within the html doc. Within the edit designer, I can get keydown event, but no keyup.
moreover, as docuemented, the TranslateAccelerator method of IEditDesigner, will be called first if any keyboard event triggered, but acutally this function was never called even I press the keyborad, what's wrong?Confused | :confused:
GeneralWTL Dialog repaint problem with Vista Pin
mirano10-Jan-08 7:55
mirano10-Jan-08 7:55 
GeneralWTL Menu problem Pin
damir_tk10-Jan-08 7:07
damir_tk10-Jan-08 7:07 
GeneralRe: WTL Menu problem Pin
Michael Dunn11-Jan-08 8:17
sitebuilderMichael Dunn11-Jan-08 8:17 
GeneralRe: WTL Menu problem Pin
damir_tk11-Jan-08 9:47
damir_tk11-Jan-08 9:47 
GeneralRe: WTL Menu problem Pin
damir_tk13-Jan-08 14:09
damir_tk13-Jan-08 14:09 
QuestionHow to access member functions of coclass from its Interface Pin
mandanani8-Jan-08 16:51
mandanani8-Jan-08 16:51 
AnswerRe: How to access member functions of coclass from its Interface Pin
mandanani8-Jan-08 20:41
mandanani8-Jan-08 20:41 
GeneralRe: How to access member functions of coclass from its Interface Pin
Nathan Holt at EMOM9-Jan-08 10:02
Nathan Holt at EMOM9-Jan-08 10:02 
GeneralCOM object and global pointers [modified] Pin
Monty27-Jan-08 21:54
Monty27-Jan-08 21:54 
GeneralRe: COM object and global pointers Pin
led mike8-Jan-08 5:04
led mike8-Jan-08 5:04 
GeneralOleDb, IRowsetIndex Pin
ArielR7-Jan-08 3:38
ArielR7-Jan-08 3:38 
GeneralStatic controls transparency problem Pin
mirano6-Jan-08 10:19
mirano6-Jan-08 10:19 
GeneralRe: Static controls transparency problem Pin
Michael Dunn6-Jan-08 11:05
sitebuilderMichael Dunn6-Jan-08 11:05 
GeneralRe: Static controls transparency problem Pin
mirano6-Jan-08 11:52
mirano6-Jan-08 11:52 
GeneralRe: Static controls transparency problem [modified] Pin
Michael Dunn6-Jan-08 12:09
sitebuilderMichael Dunn6-Jan-08 12:09 
GeneralRe: Static controls transparency problem Pin
mirano7-Jan-08 0:34
mirano7-Jan-08 0:34 
GeneralMSMQ Pin
shakumar_221-Jan-08 22:27
shakumar_221-Jan-08 22:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.