1. visual c# advancedsearch does not return results or will not fire
2. Activex control events not firing or ActiveX composite control not listening
I'm new to ATL so please bear with me.
I'm using VS2005. I generated a composite ActiveX control to host
ActiveX controls. It will host two or more ActiveX controls. I put the
ActiveX controls on the dialog at design time. I've also put a few
standard buttons.
Here's a clip of the generated class def:
class ATL_NO_VTABLE CTest5Ctrl :
....
public CComCompositeControl<CTest5Ctrl>,
public IDispEventImpl<IDC_MMHITIMERX1,CTest5Ctrl>,
public IDispEventImpl<IDC_MMWAVERECORDERX1,CTest5Ctrl>
{...}
I used GetDlgItem() and AtlAxGetControl() to get smart pointers around
the ActiveX controls. I used CAxWindow.Attach() and GetDlgItem() to get
wrappers around the buttons. I did all of this in OnInitDialog -- (side
question: should I be doing this in OnInPlaceActivate?). This, I'm
guessing, doesn't really pertain to my problem, but I put it out there.
I added event handlers for the buttons which then call some methods on
the ActiveX controls. For ex:
LRESULT CTest5Ctrl::OnBnClickedBtnRecord(WORD /*wNotifyCode*/, WORD
/*wID*/, HWND /*hWndCtl*/, BOOL& bHandled)
{
HRESULT r = m_spWaveRecorder->Recording(); // ActiveX control
bHandled = TRUE;
return 0;
}
Calling Recording() should fire a OnStart event. I added an OnStart
handler. Here's the generated sink map entry and my handler.
BEGIN_SINK_MAP(CTest5Ctrl)
SINK_ENTRY(IDC_MMWAVERECORDERX1, 1, OnStartMmwaverecorderx1)
END_SINK_MAP()
void __stdcall CTest5Ctrl::OnStartMmwaverecorderx1()
{
// I should get here
}
Now I get the button events. I can step into them and call methods on
the ActiveX controls. I put breakpoints in all of my ActiveX control
event handlers and none of them are entered. I put breakpoints in
BEGIN_SINK_MAP and they are entered upon startup.
I tried Spy++ and I don't see events being fired from the controls but
being new to ATL and Spy++, I don't know if what I'm seeing is normal
or not. I see other events such as mouse movements and clicks, but
nothing unique to the controls.
I have no idea why I'm not getting events from the ActiveX controls.
Any ideas?
Gary F.
3. DocumentComplete Does Not Fire When WebBrowser Is Not Visible
4. Simple composite control fires event fires first time but not second
Hello,
I have a simple composite control (asp.net 1.1). The on click event
fires the first time the button is clicked but not on subsequest
clicks. Any ideas why please?
Imports System.ComponentModel
Imports System.Collections.Specialized
Imports System.Web.UI
Imports System.Web
Imports System.Web.UI.WebControls
Imports Microsoft.ContentManagement.Common
Imports Microsoft.ContentManagement.Publishing
Imports System.Web.UI.WebControls.WebControl
Imports Microsoft.ContentManagement.WebControls.Design
Imports Microsoft.ContentManagement.WebControls
<ToolboxData("<{0}:TopNavMenuComp runat=server></{0}:TopNavMenuComp>")
> _
Public Class TopNavMenuComp
Inherits Control
Implements INamingContainer
Private _SearchTerm As TextBox
Private _GoSearch As Button
Protected Overrides Sub createchildcontrols()
Controls.Clear()
_GoSearch = New Button
_SearchTerm = New TextBox
_SearchTerm.ID = "searchtermID"
_GoSearch.Text = "Go Search"
_GoSearch.ID = "mysearchID"
With Me.Controls
.Add(_SearchTerm)
.Add(_GoSearch)
End With
AddHandler _GoSearch.Click, New EventHandler(AddressOf
Me.OnSearchClick)
ensurechildcontrols()
End Sub
Private Sub OnSearchClick(ByVal sender As Object, ByVal e As
EventArgs)
Dim buttonclicked As String
buttonclicked = _SearchTerm.Text
End Sub
There is then a render
Protected Overrides Sub Render(ByVal output As
System.Web.UI.HtmlTextWriter)
that includes the lines:
_SearchTerm.RenderControl(output)
_GoSearch.RenderControl(output)
Regards,
Paul
5. Server-side events do not fire the first time after client-side validators have fired - Asp.Net
6. LoadViewState not firing / fired in ASP.NET 2.0
7. events do not fire from exe but fire from vb6 ide - VB.Net
8. TextBox_ChangedText event fires but button_click does not fire