|
Ok, first of all hello folks, I'm new here and I'm in a new challenge now that I hope someone will be able to help me.
I'm working on making a Keyboard Device Driver, but I'm completely new at this issue, but not so new about C language.
My goal is to make a device driver to automate an application. In this application I have to press 2 on the keyboard every, lets say, 3 seconds.
Why do a device driver for it? Because SendKeys stuff did not worked, and I liked the challenge.
But it's becoming more then a challenge since I could not find information about Keyboard Device Drivers, the best info so far came from Toby Opferman's Driver Development Part 1: Introduction to Drivers (http://www.codeproject.com/system/driverdev.asp).
So, does anyone have a link, or some piece of code that may help me?
Any info will be appreciated.
|
|
|
|
|
Hi there,
I am a very beginner so please be pacient .
I've tried to add an own Property to the Property Page of my ActiveX Control in VC++ 6.0. But I've got a Problem there with serializing it.
I added the Bold line in my Control's Ctrl Class.
void CButtonCtrl::DoPropExchange(CPropExchange* pPX)<br />
{<br />
ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));<br />
COleControl::DoPropExchange(pPX);<br />
<br />
<br />
<br />
PX_Long( pPX, _T("DBID"), m_CTRL_DBID ); <br />
<br />
}
And the Class Wizard added the following bold lines in the PropPage Class:
void CButtonPropPage::DoDataExchange(CDataExchange* pDX)<br />
{<br />
DDP_Text(pDX, IDC_CAPTION_EDIT, m_PPG_Caption, _T("Caption") );<br />
DDX_Text(pDX, IDC_CAPTION_EDIT, m_PPG_Caption);<br />
DDP_Text(pDX, IDC_DBID_EDIT, m_PPG_DBID, _T("DBID") );<br />
DDX_Text(pDX, IDC_DBID_EDIT, m_PPG_DBID); <br />
<br />
DDP_PostProcessing(pDX);<br />
}
But every time I open the Property Page in the Test Container for ActiveX Controls, change the value of my Property, click on "Apply" and "OK" and open the Properties Page again, the Value I put in isn't there anymore.
Can you tell me, what I've done wrong or what I maybe forgot?
Do I have to do something in the Get/Set Methods?
Greetings TheInfernalCrow
-- modified at 19:08 Tuesday 15th May, 2007
|
|
|
|
|
I'm having difficulty playing .wav files in Vista. I'm currently using PlaySound(), which works in XP, but Vista does not. I've seen at least one other person with this problem elsewhere, but I can't seem to find a solution. I'm running VS C++ 2005. Thanks.
-- modified at 2:20 Wednesday 16th May, 2007
Perhaps a little clarification. When executing the PlaySound() function in XP (as part of a larger program) the sound gets played correctly. However, when this program is run in Vista, the sound does not get played.
|
|
|
|
|
I just used Vista to test an app that has an about box with sound effect via PlaySound() . It worked fine. Have you tried to play the wav file in WMP on Vista? Do you hear any sounds at all?
|
|
|
|
|
I've tried playing the sound in WMP and it worked properly. I'm getting the path from the registry and the path seems correct. PlaySound() actually returns 0 (error) when I try to don't pass in SND_ASYNC, but returns 1 (the sound was put into the sound queue) when SND_ASYNC is passed in. In each case, the sound does not play properly.
|
|
|
|
|
I am interested in blocking Joystick devices in some game client software I am extending. The software doesn't have any use for joysticks, so disabling them entirely would be even better.
To be specific, I want to block dangerous "joysticks" like Nostromo[^] and Logitech G15[^] which can do macros, simple programs, etc. These are really deadly since players can use them to cheat and create home-made bots.
Belkin's FAQ page says that Nostromo installs as a standard Joystick device if you don't install their software. Anyone know how I can block these devices in my game client only? Perhaps there is a way to "block" joystick input and allow normal keyboard input. If that's not possible, can I disable them system-wide while the game is running?
Thanks for any answers.
|
|
|
|
|
Hello in one of my projects i want to make a Select Folder Dialog
(i only know about CFileDialog :/ )
and while you have select the folder it gonna get you
the full path of each file this folder contains.(so i can next edit this files)
msdn has problems on C++ library so i cant find it from there :/
anyone could tell me a code that i have to put in (OnSelectFolderButton fuction) it will appear a Folder selection Dialog and when you select a Folder it will add in an array the fullNamePaths of each File this Folder contains ?
thanks John
|
|
|
|
|
|
|
i find how to create a folder dialog.
Now as I am able to take the path
how i get the pathNames of all the files that contains this folder?
|
|
|
|
|
Search MSDN for the FindFirstFile() and FindNextFile() functions.
|
|
|
|
|
thank \o/
|
|
|
|
|
I've created a menu and want to launch other projects from the menu project.
Assume I want to launch MyApp.exe from the menu project.
I'm having trouble figuring out the code statement to accomplish this.
Can you help me out with the code?
Thanking you in advance for your help and time.
|
|
|
|
|
Check out ShellExecute() and CreateProcess() .
Anything I will say you will bring it down to whatever you want.
|
|
|
|
|
Jerry Burns wrote: I'm having trouble figuring out the code statement to accomplish this.
Do you mean the code to launch the app, or the code to handle the menu click?
|
|
|
|
|
The line of code needed to launch the other app.
Thanking you in advance for your help and time.
|
|
|
|
|
You can use ShellExecute() or the older & simpler WinExec() .
|
|
|
|
|
Do you want to have name of other program that you want to lanuch on your menu?
|
|
|
|
|
hello
There are two things here.
WinExec : with this you can launch another process (Myapp.exe) . But you have no programatic control over the exe after you launch it .
CreateProcess : with this you can have the process handle of Myapp.exe so that later you can kill it .
Sample is here
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
if( !CreateProcess( NULL, // No module name (use command line).
"myapp.exe" // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi) ) // Pointer to PROCESS_INFORMATION structure.
{
AfxMessageBox("can not start process");
}
redindian
|
|
|
|
|
Of course if you see MSDN it says:
This function is provided only for compatibility with 16-bit Windows. Applications should use the CreateProcess function.
Now whats your problem?
|
|
|
|
|
Hi all.
I write program and in my program I must sonvert texo from one font to enoder and
I dont know how to do this.
can help?
|
|
|
|
|
david bagaturia wrote: I write program and in my program I must sonvert texo from one font to enoder
|
|
|
|
|
david bagaturia wrote: from one font to enoder
You mean you want to support multiple languages in your program?
|
|
|
|
|
david bagaturia wrote: I write program and in my program I must sonvert texo from one font to enoder and
I dont know how to do this.
Well whats meaning of that?
|
|
|
|
|
Ok.
I have MyFile_1 and text in it and I must copy that text into File_2, but font in File_1 is MyFont_1 and font in MyFile_2 is MyFont_2.
Sow I must sonvert text from MyFont_1 to MyFont_2. But I dont know how to do this .
|
|
|
|