|
Hi, i am not familiar to win32 api so this may seen a easy question, i have a handle to a menu item, how can i action (virtual press that menu) and run it's method. I want to do this from other program ,from my programm i want to control menus from other apps(i already read the menus,i have handles to them).
Thx.
I found that it will work in most cases with WM_command
simion314
modified on Sunday, September 20, 2009 7:02 AM
|
|
|
|
|
Use FindWindow() to find the other program and use SendMessage()/PostMessage() (probably a WM_COMMAND message) to "press" the button.
|
|
|
|
|
How do you bind a Microsoft Forms TextBox in a Access 2002 Memo Field in VC++ 6? I am using this but just get a blank field
CWnd* pDSC = GetDlgItem(IDC_ADODC1);
pEdit = GetDlgItem(IDC_TEXTBOX1);
pEdit->BindDefaultProperty(0x16,VT_BSTR, _T("Synopsis"), pDSC);
|
|
|
|
|
|
Please must delete this post and re-post in the C# forum yourself.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Why didn't you post this question here[^] the first place?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
i want to compile the c/c++ programs using commands in cmd promt in windows
|
|
|
|
|
|
|
I have a problem. I make a program like this:
One Form, 2 ListBoxs, 1 grammar file and SAPI. ListBox1 have 3 items (Blue, Green, White). ListBox2 is empty. Grammar file have 'Blue', 'Green' and 'White'.
When i talk 'Blue', 'Green' or 'White' the program recognize the word and add to ListBox2.
In Windows XP (Sapi 5.1) the program works wonderful. In Windows Vista when i talk 'Blue', 'Green', 'White' the word in ListBox1 is selected and nothing happen to ListBox2 (Windows Vista recognize, not my program). How can i fix it?
modified on Saturday, September 19, 2009 12:03 PM
|
|
|
|
|
FredBrina wrote: SAPI
I'm not familiar with this API, what is its purpose?
Can you post the portion of code that has the problem? Everyone then has a better idea of what your program is trying to do.
|
|
|
|
|
SAPI = Speech Recognition API from Microsoft. Windows Vista (english version) have the version 5.3. Windows XP u can install version 5.1. I dont post the code because i am using Borland C++ and the code is bigger. My program recognize the words with no problems. The problem is: In Windows Vista the native recognize program seems to try to recognize first then my program.
|
|
|
|
|
FredBrina wrote: The problem is: In Windows Vista the native recognize program seems to try to recognize first then my program.
I don't quite understand what you are saying here, but rereading your original post it sounds as though the SAPI is recognising the word you speak, and selecting that item into one of the list boxes. You then expect some action in the other listbox which works in XP but not in Vista. Have you checked the differences between the two SAPI versions for any known errors? Have you checked the relationship between the two list boxes?
FredBrina wrote: I dont post the code because i am using Borland C++ and the code is bigger.
Without seeing the code where the problem is occurring it is impossible to make any further guesses as to what may be happening.
|
|
|
|
|
Yes, Sapi is recognising the word. The problem is: Windows XP -> my program recognize. Windows Vista -> Windows Vista recognize. See the problem:
The program now:
ListBox1 = "Blue", "White" ...
ListBox2 = Empty
Grammar file = "Blue", "White" ...
When i talk "Blue", Windows Vista recognize the word and select the item. My program not recognize!
The program fixed:
ListBox1 = "B.l.u.e", "W.h.i.t.e" ...
ListBox2 = Empty
Grammar file = "Blue", "White" ...
When i talk "Blue", Windows Vista didnt recognize (ListBox1 now have "B.l.u.e"). My program recognize!
|
|
|
|
|
Well I can't say that I understand your explanation, but I'm happy that your problem is resolved.
|
|
|
|
|
Actually I did not resolve my problem. Only demonstrated that speech recognition of my program works on Windows Vista.
|
|
|
|
|
How do I prevent the voice recognition native Windows Vista work? It is activated before the speech recognition of my program. He recognizes the text of the listbox and then do not let my program to "act".
When I replace the text of the Listbox ("blue" -> "b.l.u.e.") speech recognition native windows vista can not find anything. So my program can act.
|
|
|
|
|
I am running under Windows Vista. I am adapting to Visual C++ a program which I wrote under Borland C++. It called these:-
DIR :: a struct type which contained the running information on looking through a directory.
Functions:-
opendir(---)
readdir(----) :: step to the next file in the directory
closedir(----)
Please what are their Visual C++ equivalents?
|
|
|
|
|
I think this[^] may have the information you are looking for.
|
|
|
|
|
Check out FindFirstFile[^] and FindNextFile[^] for starters.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
In Visual C++, please how can I stop automatic redirecting of library function names to 2-byte character forms, e.g. SetDlgItemText to SetDlgItemTextW?
modified on Saturday, September 19, 2009 9:57 AM
|
|
|
|
|
Your-Project->Properties menu item, then Configuration Properties->General node , finally set Character Set to Use Multi-Byte character set instead of Use Unicode character set .
however, be aware that (MSDN [^]):
Since Windows NT, all Windows versions are built from the ground up using Unicode. That is, all the core functions for creating windows, displaying text, performing string manipulations, and so forth require Unicode strings. If you call any Windows function passing it an ANSI string (a string of 1-byte characters), the function first converts the string to Unicode and then passes the Unicode string to the operating system. If you are expecting ANSI strings back from a function, the system converts the Unicode string to an ANSI string before returning to your application. All these conversions occur invisibly to you. Of course, there is time and memory overhead involved for the system to carry out all these string conversions.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks. I have sorted it.
|
|
|
|
|
Hi,
Please let me know how to convert Convert CString to std::string
|
|
|
|
|
CString cstr = "This is a CString";
std::string str;
char* cp = cstr;
str = cp;
Why not try it?
|
|
|
|