ok here is your explaination 1. Run your Application, 2. run spy++ and set it to capture KeyBorad messages (using Finder tool). 3. Press F1 key (or what ever key you want to send). 4. analyze the Messages log window and double click on the message having WM_KEYDOWN and nVirtualKey:VK_F1
or WM_KEYUP and nVirtualKey:VK_F1
. Get LPARAM value from there. you are done. The LPARAM valur for F1 remains constant. no matter where you run your application and when you run it. This way u can get LPARAM values for all your virtual key simulations, infact LPARAM contains bit combinations for ScanCode,RepeatCout,AltDown, Extended Value for the WM_KeyDown event. Thanks Azam
Muhammad Azam
Posts
-
Sending keys -
Sending keysNo I guess not, is it working with VK_F1?
-
Sending keyshi, Assuming m_pWnd is pointer to the window you want to send keys then use,
m_pWnd->SendMessage(WM_KEYDOWN,WPARAM(VK_DELETE),LPARAM(0x01530001)); m_pWnd->SendMessage(WM_KEYUP,WPARAM(VK_DELETE),LPARAM(0xC1530001));
or::SendMessage(hwnd,WM_KEYDOWN,WPARAM(VK_DELETE),LPARAM(0x01530001)); ::SendMessage(hwnd,WM_KEYUP,WPARAM(VK_DELETE),LPARAM(0xC1530001));
:) if this answers you then, vote for 5 :cool: -
Getting Exception when two instance of ActiveX control are opened using Ctrl+N in IEThanks a Lot Mike, your answer has given me a new dimension to think. first of all i need to know 2 things 1. what is
Mike Dimmick wrote:
IIRC Internet Explorer
and what it does? 2. how co i know whether my control is
Mike Dimmick wrote:
marked apartment-threaded
and is the problem due to the fact that you wrote:
Mike Dimmick wrote:
your control is marked apartment-threaded (which it is, by default), then the second instance of your control will be running on a different thread from the first.
yes the line where i am getting the Assert is, when i try to access Frame window ( that i have created in my control) using
AfxGetApp()->m_pMainFrame
orAfxGetMainWnd()
. thanks once again for your response Muhammad Azam -
Inserting ActiveX control in ActiveX serverHi, As far as i Know the ActiveX control that you have bought from your customer is a liscensed ActiveX control, means that you can't use this control in your applications. Only those persons who have .lic file of this control can use the control in their applications. since you might not have .lic file so you can only see this control in your customer's built application and you can't built an application, making use of the control. I guess this answers you Muhammad Azam
-
Getting Exception when two instance of ActiveX control are opened using Ctrl+N in IEHi, I have developed a MFC ActiveX control and embeded it in IE. The control is working fine but when another instance of IE is opened using Ctrl+N, I am getting ASSERT exception in debug mode and in Release mode IE crashes. Note that if the second instance is opened without using Ctrl+N (i.e by using explorer icon) no exception arrises. what could be wrong. your support is highly appreciated. Thanks Muhammad Azam
-
Determine bounding rect of a string [modified]try using
\r\n
instead of\n
only inszText
-
on-the-fly html file generationHi, An elegent way could be, have your data in
xml
format, write anxsl
file that will transform your data fromxml
tohtml
and display that html in webbrowser Your can search forIDOMDocument
interface for transformation ofxml
throughxsl
intohtml
. hope this satisfies you:cool: Thanks -
Getting Exception when two instance of ActiveX control are opened using Ctrl+N in IEHi, I have developed a MFC ActiveX control and embeded it in IE. The control is working fine but when another instance of IE is opened using Ctrl+N, I am getting ASSERT exception in debug mode and in Release mode IE crashes. Note that if the second instance is opened without using Ctrl+N (i.e by using explorer icon) no exception arrises. what could be wrong. your support is highly appreciated. Thanks Muhammad Azam
-
Setting Rich edit control's width dynamically to fit entire textThanks Viorel, No the problem is not with scroll-bars the problem is that when user types some text in the control and the text reaches right border of control than how much should i increase width of my edit control (based on current font size, face name etc..) so that the next character typed, is visible and no scroll bar or word-wrapping should occur. And when the control's width reaches right border of dialog than word wrapping should occur. thanks Muhammad Azam
-
image processing using VC++Hello li zhiyuan, the warning is due to the fact that your are assigning a
double
value to a variable of typelong
. i.e.double d = 3.5f; long l = d;
and the warning says that you will loose your data andl
will caontain only 3 instad of 3.5. if this is ok for you than you can suppress this warning by typecasting. i.e.double d = 3.5f; long l = (long)d;
hope this answers your quetion. Also have you added message handler for the new menues that you are creating??:confused: -- modified at 7:31 Thursday 8th June, 2006 -
Setting Rich edit control's width dynamically to fit entire textHi I want to change WIDTH of my rich edit control as user types text in it, so that it displays the entire text instead of scrolling text horizontally. My rich edit is a multiline control I have used
EN_REQUESTRESIZE
notification msg but this works only for adjusting height of control andEN_REQUESTRESIZE
is working perfectly in case of height, i.e I use to change the control height when i get this msg to show all lines of text. kindly help!!!! its urgent Muhammad Azam -
Setting properties of ActiveX usingthanks Sheng it worked :) Azam
-
Setting properties of ActiveX usinghi I have developed an ActiveX control using MFC and i am using it in IE. The control has a boolean property
ShowThumbNail
which i am able to set through scripting, but when i set this property using< PARAM >
tag it seems that the property is not set and nothing happens. please tell me how to set exposed properties of an ActiveX using< Param >
tag. The control is developed using MFC thanks Azam -
Backspace problem in MFC ActiveX in IEthanks steve i will evaluate the posibility that u suggested Azam
-
inserting ActiveX controll problemIs this a dialog based application? verify that you have called
AfxEnableControlContainer()
in your application's InitInastance Method see this article in MSDN "ActiveX Control Containers: Manually Enabling ActiveX Control Containment" dont forget to include"#include <Afxdisp.h>"
hope this work Azam -
inserting ActiveX controll problemIs this a dialog based application? verify that you have called
AfxEnableControlContainer()
in your application'sInitInastance
Method see this article in MSDN "ActiveX Control Containers: Manually Enabling ActiveX Control Containment" dont forget to include "#include <Afxdisp.h>" hope this work Azam -
Backspace problem in ActiveX embeded in IEKhan, could you please ellaborate your point. I am not able to get it. My ActiveX control contains other controls along with the Edit control. AZam
-
Subclassing ActiveX controlHello Alton Williams, I don't have answer to your question but i just want to know why are you doing this through ActiveX control. I mean you can change the background and text color of standard Edit control by Handling WM_CTLCOLOR Message. Is ActiveX your requirement? Muhammad Azam
-
Backspace problem in MFC ActiveX in IEHi Gurus, I have an ActiveX control that has an Edit control inside. I have embeded this control in IE. the problem is when i try to delete some text in Edit control using backspace key the browser takes me to the previous page instead of Erasing the text in Edit control. Does any one know how to deal with this situation please its urgent thanks Muhammad Azam