|
This[^] is not what you are looking for but it is a start.
Also check out WM_ACTIVATEAPP, your application receives this message when it is being activated or deactivated, along with the thread identifier.
If I was designing both applications I would be looking at using COM to handle the communications between them, by exposing an interface. In the old days I would have been looking at DDE, but that is obsolete.
I am still looking, because now I want to know the answer. But I will be limiting my time, so I may give up before I find an answer.
Good Luck!
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
K Gupta wrote: Actually i want to create a floating Application,
Have you written that APP?
K Gupta wrote: which can send text on selection of a particular option to the window which was having input focus before my app.
Sending text means? Do you need to send key strokes? In that case, I would suggest you install a global hook via a DLL and then let it send key strokes. This may not be applicable if only you want your executable to be visible too. Can you elaborate a little more on your problem?
Nobody can give you wiser advice than yourself. - Cicero
brahmma
|
|
|
|
|
I want to create an app like windows on screen keyboard. The window to which i will be sending characters can be any application like notepad, msword etc.
I want a particular sequence of characters to get typed on target window if the user selects a particular option. I have made the app, but right now i am passing the handle of target window through commandline argument when my app gets spawned. I want to make it independent of that commandline arg. I think i have made my problem clear now. Please help.
|
|
|
|
|
K Gupta wrote: have made the app, but right now i am passing the handle of target window through commandline argument when my app gets spawned.
Who is the rocket scientist that gave you this idea of sending the window handle as a command line argument? Your appplication will be able to work with only one window, currently. How do you get the window handle of the window to which you want to send key strokes? Who sends your application the window handle while spawning? If the *thing* that sends your application has the code to get the window handle, then why should it not be in your application itself so that it can work with any window? What have you achieved so far? I am not on my development machine now, and I shall send you something helpful shortly.
Nobody can give you wiser advice than yourself. - Cicero
brahmma
|
|
|
|
|
Just a stupid question. If an on-screen Keyboard is what you want, then have you tried using MSKLC?
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
I think i am more stupid Whats MSKLC?
|
|
|
|
|
K Gupta wrote: I think i am more stupid
Let us not argue on it
MSKLC is Microsoft Keyboard Layout Creator. I still do not understand what exactly your requirement is, but if it has to be an onscreen keyboard utility, use MSKLC to create a keyboard layout and use MS onscreen keyboard to type with the layout. Google for MSKLC. Let me know if the problem was solved.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
I have a CToolbar ctrl on a CDialog. Can someone tell me how I can capture the messages for the ON_UPDATE_COMMAND_UI for the buttons on the CToolbar, so that I can then enable/diable etc?
|
|
|
|
|
|
How can i make buttons on toolbar of different sizes?
I mean, the size of first button should be different from second button on toolbar.
Is it possible?
|
|
|
|
|
toolbar buttons are created based on the bitmap that they show, and a regular toolbar cannot do what you want. But still there is a way of dowing it by creating custom buttons on a toolbar.
--
======
Arman
|
|
|
|
|
I am reading data in byte from serial port.but when I am trying to added to reply(CString) and I am not getting the string added in relpy from replybyte.
BYTE byte;
char replybyte;
replybyte=(char)byte;
reply+=replybyte;
S.Yamini
|
|
|
|
|
Instead of
yaminisridaran wrote: reply+=replybyte;
try strcpy
|
|
|
|
|
Ouch!
That will not work for a couple or reasons, but the most important reason is that they are not copying a string. They are appending a single character to the end of an existing CString. Crashing the code is not a good solution.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
That should work, although I would shorten it to reply += (char)byte;
Make sure the byte you are trying to append is not zero.
Also make sure that the CString is supposed to hold 'char' and not 'wchar_t' values, although the compiler should probably warn you if that was the case.
If that fails, then try using reply.Insert(reply.GetLength(),(char)byte);
I can think of one other option, but I would not recommend it, so I will leave it there.
Good Luck!
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
yaminisridaran wrote: but when I am trying to added to reply(CString) and I am not getting the string added...
How are you verifying this?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
CString is not a general-purpose data storage system. Use vector<BYTE> instead.
|
|
|
|
|
Hi,
I need to get deselected element of a List box.
Is there any way other than comparing the Selected elements with those of a list of previously Selected.
Any suggestions would be helpful.
Thanks
Today is a gift, that's why it is called the present.
|
|
|
|
|
Hi! using the if(!/*appropriate selecting item function, that would be*/ GetCurSel()), a member of CListBox then do an appropriate action in the if Block. Try using the DDX mechanism.
TreeS
|
|
|
|
|
When an item is unselected, the parent control will receive a LVN_ITEMCHANGING message.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have created a tab with controls on-fly.How to set tab order for controls on dialog.
Then
When i press tab or Enter key it will navigate through the controls.
Now i press Enter key ,the dialog will closed. And for tab key nothing happened.
what I do for that plz help me.
|
|
|
|
|
the closing of the dialog can removed , read the article in this link 7.4
|
|
|
|
|
and for the tab problem just make the property tabstop true
|
|
|
|
|
i have 5 IP address Control in dialog.That are created at run time.then how to navigate between that.
IP address Control created using:
m_cTab.CreateIPEdit(" ", 0, 10, P_LEFT | P_TOP, 130, 0, 130);
m_cTab.CreateIPEdit(" ", 0, 11, P_LEFT | P_TOP, 130, 0, 130); Etc...
|
|
|
|
|
Add this in your code this will enable the tab control,
ON_WM_GETDLGCODE()
UINT Cclassname::OnGetDlgCode()
{
return CButton::OnGetDlgCode()| DLGC_WANTTAB ;
}
When the user presses TAB or SHIFT+TAB, the system first determines whether these keys are processed by the control that currently has the input focus. It sends the control a WM_GETDLGCODE message, and if the control returns DLGC_WANTTAB, the system passes the keys to the control. Otherwise, the system uses the GetNextDlgTabItem function to locate the next control that is visible, not disabled, and that has the WS_TABSTOP style. The search starts with the control currently having the input focus and proceeds in the order in which the controls were created—that is, the order in which they are defined in the dialog box template.
|
|
|
|