How to handle KeyPress event of a activex control?

add KeyPress event to my control:
OcxTest.odl:
   [id(DISPID_KEYPRESS)] void KeyPress(short* KeyAscii);

OcxTestCtl.cpp:
 EVENT_STOCK_KEYPRESS()


but howto use in my web page?
these are my codes below, but it dose't work!

///////////////////////////////////////////////////
<objecc id="..." ...... onkeypress="OnKeyPress()">

<SCRIPT LANGUAGE="JavaScript">
function SetFlag()
{
     alert("OnKeyPress");
}
</SCRIPT>




0
funfound (4)
4/23/2007 12:35:49 PM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
538 Views

Similar Articles

[PageSpeed] 57

Reply:

Similar Artilces:

How to use Windows Media Player control to play avi file
Hello, I need to play an avi file in my program using the media player activex control.I need to be able to indicate a starting frame and an end frame that the control will stop playing after reaching it. Thanks in advance ...

xp sp2
Hi, we have performed an ActiveX for Internet Explorer using Visual C++ ..net, and Windows 2000 Service Pack 4. We have tested it in different versions of IE and Windows 2000, always successfully. Then, we tried with Windows XP, and Windows XP Service Pack 1, with no problems. But when I tested it on Windows XP Service Pack 2, an error occurs and Internet Explorer is closed. It happens just when ie try to call a method of our OCX. Does anybody know what is happening? Is there any feature of XP SP2 that may make the OCX crash? Thank you in advance, and best regards, Manuel ...

Exchange 2K to 2K3 migration
I'd like to get some advice on the best approach to handle the STM file during an Inter-Org mailbox move. The Exchange migration wizard will handle the the mailbox but how do you handle the content in the STM file? Thanks. You don't need to worry about it. Mailbox data is stored in both the EDB and STM files. Typically, message content from the Internet will be in the STM file. I'd suspect that when you migrate the mailboxes, all data will be converted to native MAPI format (moved to EDB file) and will then be moved to the new mailbox. -- Ben Winzenz Exchange MVP Me...

MS Chart control axes limits
Hi, On trying to set high axes values for the MS Chart control, of about 500 the Visual Studio hangs for some time. It just does not accept anything above 1000 in resource editor mode. Is there any way to set such high values, I need values till about 10000? Also, does MS Chart control support things like moving average? TIA, Sucharit ...

Handle to an ActiveX control
Hi... What if I use GetModuleHandle(L"abc.ocx") in the InitInstance() of the of the App class derived from 'COleControlModule'...of the ActiveX control "abc.ocx" ? Will I get the Handle or it will return NULL....? I have encountered controls, in some of them..handle is found and in others its NULL... Wat is the reason behind this behavior..? Can any one explain? "Abby++" <asthana.abhinav@gmail.com> wrote in message news:1174308443.062622.51500@b75g2000hsg.googlegroups.com... > What if I use GetModuleHandle(L"abc.ocx") in the InitI...

dead Domain Controller
Our company has three DCs (2 in our main office and 1 in via WAN). The hard drive in one of the DCs (main office) died yesterday. We have a copy of that DC from a week ago. If we simply replace the drive will it sync up OK with the two working DCs or can it cause problems with our AD? Hello Don, Images or snapshots are not supported ways of backup for Active directory, this will result in USN rollbacks. http://support.microsoft.com/kb/875495 If you don't have an AD aware backup please cleanup AD database from the old DC and add a new DC to the domain, after cleanup you c...

invalid handle
hi frds i m very new in vc++ and i m founding too much difficulty in this so plz can any one solve this problem .... actully i m inserting a image in list box using this code ........ everything is returning write thing still it is saying invalid handle after ImageList_Add(hList,m_hBmpNew,0); when i m going to dibug it plz help me BOOL Fun() { // Create 256 color image lists HIMAGELIST hList = ImageList_Create(32,32, ILC_COLOR8 , 8, 1); HBITMAP m_hBmpNew = (HBITMAP) LoadImage( AfxGetInstanceHandle(), // handle to instance "c:\\img.bmp", /...

Thunking a 32-bit HANDLE to a 64-bit HANDLE
Currently I am converting a 32-bit WDM driver to a 64-bit KMDF driver that will continue to work with our 32-bit DLL and our customer's 32-bit applications. The sample code for thunking 32-bit items shows the following Buffer->Handle = (HANDLE)Buffer32->Handle; see: http://msdn.microsoft.com/en-us/library/aa489604.aspx Buffer32->Handle is declared as UINT32 Handle The driver compiler issues error number C4312 for this cast. The code that I have adopted (to get it to compile) is: handlerInputs.hEvent = (HANDLE) (ULONG_PTR) p_handlerInputs3...

i can't see a past event
Some of my past events are shaded blue and I can't access them. Auto archiving is set to off for my calandar. I have looked at those past events which still show but can't see the difference. Any ideas welcome. "CMck" <CMck@discussions.microsoft.com> wrote in message news:6F32C2AD-FB6F-43EE-8AE0-BCECA26307E6@microsoft.com... > Some of my past events are shaded blue and I can't access them. Auto > archiving is set to off for my calandar. I have looked at those past events > which still show but can't see the difference. Outlook v...

Daily Bank Sweep
New GP Client that is reconciling for the first time their operating account. We have entered the last reconciled balance and dates as of 12/31/08. Operating account gets swept every night and redeposited the next day. With each sweep interest is calculated. My question is how to handle the last sweep of the month, which is a sweep in transit. We have tried entering as a decrease adjustment (not posting to GL as it should not effect the GL balance). We have also tried entering as an adjustment to see what the effect is. We don't even come close to the bank ending balance. Pl...

unwanted control toolbox
I use Word as my email editor in Outlook. From time to time, and apparently only for some email messages, Outlook automatically adds the "control toolbox" toolbar to the message reply window. Typically, in addition to the toolbar, a small box of some sort opens in the text box portion of the message window. I have no need for the toolbar or the additional box, but even after I eliminate the toolbar and close the additional box I typically find that every time I open a new message window the toolbar and box reappear. Is there some way to prevent this from happening? ...

Help Troubleshooting Before Update event
I've run into a problem getting a Before Update event to launch. I'm trying to update the LastUpdate field with the current date and time when data on a form is changed. The control is on a subform, which is also located on a tab control. I've checked the code on a "plain" form so I know it works, but I'm missing something when trying to make it work on the subform. Form Name: frmVisits Subform Name: frmVisitOrgTab Tab Name: pgVisitInfo Control Name: LastUpdate (formatted as General Date) Current Code: Private Sub Form_BeforeUpdate(Cancel As Integer) Me![frmVi...

KeyPress Event
Hi , I m new to mfc. Once I have 1 parent dialog box and one child dialog box. i have to catch keypressed message in parent dialog box and have to display the keypresses in the child dialog box .in parent dialog box i do the following BOOL CDay5Dlg::PreTranslateMessage(MSG* pMsg) { // TODO: Add your specialized code here and/or call the base class if(pMsg->message==WM_CHAR) { SendMessage(WM_CHAR,?,?); } return CDialog::PreTranslateMessage(pMsg); } How can i get Which character was pressed so that i could send it to the child dialog box I would suggest a good start is reading the ...

Control Source code
How can I join these two codes together .....Thanks for any help ...Bob =IIf([tbGSTOptionsValue]=0,Null,[TaxLabel]) =DLookUp("TaxLabel","tblCompanyInfo") well, who knows, since we have no idea what you're trying to do, or where. what are you trying to accomplish, and what is the setup? hth "Bob V" <rjvance@ihug.co.nz> wrote in message news:e%23lJv6n8HHA.3624@TK2MSFTNGP05.phx.gbl... > > How can I join these two codes together .....Thanks for any help ...Bob > =IIf([tbGSTOptionsValue]=0,Null,[TaxLabel]) > =DLookUp("TaxLabel",&...

help me set up a Event Macros
i am looking to use more than 3 colors in my spreadsheet i can do the conditional formatting for 3 colors but need help to use 5 colors. I am new to this so please tell me how to do this thank -- Message posted from http://www.ExcelForum.com You could use a worksheet_change event: rightclick on the worksheet tab that should have this behavior. Select View code and paste this in the code window. Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim myColor As Long If Target.Cells.Count > 1 Then Exit Sub If Intersect(Target, Me.Range("a:a")) I...

ActiveX Timer Control IN VBA
In Access 2002 Should I be able to use the activex timer control in vba as I do in vb6? This is my test form: Private Sub Timer4_Timer() Me!Timer4.Enabled = False bEndTimer4 = True End Sub Private Sub cmdTimerTest_Click() Me!frmTime_Test.Timer4.Interval = 2000 bEndTimer4 = False Me!frmTime_Test.Timer4.Enabled = True Do DoEvents Sleep 5 LogItem$ = "Timer now timing" Forms!frmTimer_Test.List46.AddItem LogItem$ Loop Until bEndTimer4 End Sub It never reaches the interval. What might I be doing wrong? Hi Rhonda, Why are you using the a...

another "Unable To Load Client Print Control" post
I'm moving an application to a new web server. The current web server has the SQL database on the same box, but the new one has a separate sql server box. There is no problem with the client print control on the existing app run from the old server, but running the app off the new server gives me an error loading the Client Print Control when I try to print. The web.configs are pretty much identical and reference the webforms report viewer 8.0.0.0. The only difference in web.config is the change to the SQL Server location. Since it works on one server but not another, I gues...

Event ID 4117 4125 4009
Source is MSExchangeIMC, Category is Internal Processing. The message text for 4117 is: An error was returned from the messaging software the Internet Mail Service uses to process messages on the Microsoft Exchange Server. As a result, the message in spool file MZ0T6AVS failed to be delivered. The message has been moved to the IMCDATA\IN\ARCHIVE directory. For 4125 it's: An error was returned from the messaging software used to construct notifications to the administrator's mailbox. The inbound message file or subject of the outbound message is included in the data portion o...

Need help on usng windows control library component in mfc application
Hi , I have Created a Windows control library component to draw a bitmap image using VC.Net 2003 , I can able to use the component in wndows form application. I dont know how to use the same in VC.Net MFC application can any one help me in this. With regards, Sathish. ...

Script Event for Read vs Reply to Email
Hello - I would like to find a unique even that is called when one reads an Email and also when one replies to an Email. Suppose I have two forms. I read Form1 and I can click Reply to open Form2. I noticed that the Read event is called when one opens and reads Form1 but it is not called on the Reply Form (Form2) when one clicks Reply so that works great. However, when one clicks reply on Form1 and Form2 opens, I'm looking for an event that is called on the Reply form (Form2) that is opened. I don't want this event to be called on Form1. I don't want it to be called when...

ActiveX event and DoModal
Hi, I use VS2008Pro. I have created an ActiveX control dat shows a chessboard etc, I have created an ActiveX event called OnPromotion(); I created a standard CDialog project and inserted the chess activex control. I added the activex event OnPromotion() and want to show a second CDailog using DoModal() inside of this OnPromotion() event. The second (promotion dialog) is shown, but when i click it i get a debug assertion failed message. Can i not call a DoModal() inside an activex event in my dialog? BEGIN_EVENTSINK_MAP(CXPTESTDlg, CDialog) ON_EVENT(CXPTESTDlg, IDC_CHESSACTIVEC...

Is It Possible to Control Access Warning Pop-Up Message Boxes?
When running an update query, Access displays a warning message box and prompts for a response ("You are about to run an update query that will modify data in your table"). I have a macro that runs a series of update queries. Right now, I get the message box/response for each query. In this case, there is no need for the message box at all. Is there a way to (ideally) turn off this message for the duration of the query) or to answer it once for all of the queries? Thanks TerryoMSN It is possible to turn the warning off ... WARNING!!! If you forget to turn it bac...

Handling blank data points
I have a chart which is has "" in a formula to clear contents when not applicable to show error. This results in the chart treating the cell as 0 and therefore ugly result in data point. All other post responses to this type of question suggest using NA() and conditional formation to hide the error.. Unfortunately when this is used this screws up my SUM() and AVG() formulas.. Any other suggestions? Thanks Jo Hi Jo, I don't know if this is the best way but what I have done under similar circumstances is use the #N/A for the chart series data column and then I use a hel...

Enabling/disabling Tree Control items
I've seen it mentioned in several articles in the MSDN Library and the Visual Studio help that you can disable individual items in a tree control by setting a state, yet I cannot find anything anywhere that says what that stat is. How does one go about enabling and disabling individual items? I should note that I've set the control to use check boxes, and I am not supporting any OS older than XP (i.e., I'm only supporting version 6 or newer of comctl32.dll). (According to the documentation, I should be able to use check boxes without specifying that my tree control uses imag...

Default on date control shows yesterday.
The default date on many date control shows yesterday. The Crm Tools | Options Time zone is set to (GMT +10) Canberra, Melbourne, Sydney. The user formats and system formats are set to English-Australia. The computer clock and timezone settings are correct. Done iisreset. Any ideas? Hi Bill, I remembered there might be a patch that you need to install for Austrialia time zone. You might want to do a search in the MBS KB to see if it applies to you. Darren Liu, Microsoft CRM MVP Crowe http://www.crowecrm.com On Aug 12, 6:06=A0pm, Bill Altmann <BillAltm...@discussions.microsoft.com...