|
What I want to do is to write an application that runs in the background and when a user presses a key, say 'H' and, for example, the application that is currently acitve receives the string "Hello" instead. Is there anyway to do this using a keyboard hook?
modified 12-Jul-20 21:01pm.
|
|
|
|
|
You could set a global WH_CALLWNDPROCRET type hook and handle the keyboard related messages. When the user enters an 'H' you could send the 'ello' part as fake keystrokes.
just a thought.
-Ben
"Its funny when you stop doing things not because they’re wrong, but because you might get caught." - Unknown
|
|
|
|
|
I am using CInternetSession::OpenUrl() and I would like to pass OpenUrl() 1st param either a IP address or a DNS FQDN(plus the other stuff). I have try it with www.codeproject.com and the path to the globe pic before and it worked but I built an Web Server(NT Server 4.0 w/ SP5, OP, and IIS 4.0 in a LAN) and created a new website and disabled the Default website. I can access page in IE 5.0 w/ IP address or a DNS FQDN but in my program only when using the IP address will OpenUrl() return non-null. I have not edited the Web Server's host file or installed DNS yet. Should it be changed? I have edited the host.sam file on WinME to read "198.168.0.1 www.getit.com". "198.168.0.1" is the IP used in the Website property dialog box in the MMC. Also the IP address or a DNS FQDN cant at all be accessed from outside the LAN. How can I get this to work and what I different in the configuration of www.getit.com and www.codeproject.com?
Thanks...
|
|
|
|
|
not sure if it will help but the local ip address should prolly be 192.168.0.1 instead of the 198.168.0.1 that you posted
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Sorry, that was a typo it is "192.168.0.1"
|
|
|
|
|
URGENT!!! I need the C++ source code to create a snake game!!!!
If you had or know the source code, please send it to angel_jibrielle@yahoo.ca!!!
|
|
|
|
|
Another homework assignment?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
I might have the source somewhere for the snake game I wrote for the Apple ][ back in the mid eighties... Seriously though, unless the state of gaming is even worse than I thought, the only reason I can see for *urgent* need of such a thing is an assignment, or to settle a cheap bet. Either way, the request does not belong here, but in the article requests section.
If I could write such a game to run nicely on an Apple ][, with a 6502 processor and using AppleSoft basic, I doubt it would be too hard on todays platforms to write such a thing. How about you give it the old college try and let us know if you need some help ? Questions like 'I'm having trouble because my snake game flickers', or 'I'm trying to save high scroes to the registry for my snake game but this code seems to have a problem' tend to be well recieved, questions like 'write me a snake game' tend not to be.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
|
|
|
|
|
Yeah
I had one guy who wanted me to write a gantt chart for him. Apparently he saw my app. ProcessStudio and thought I could modify the source code to create a gantt chart.
Some of these college boys have a lot of cheek - bless 'em.
Norm
|
|
|
|
|
How can this be urgent? Just curious...
|
|
|
|
|
It might be one of those "Mobile Phone Related Kidnappings" we're all hearing so much of in the news these days. Kids, high on Nokia 8210s, are out robbing old ladies for money to feed their mobile addiction.
Maybe this fellow just can't wait for the next phone to come out with Snake 3 on it. I feel for him. Its a terrible shame how our youth are throwing their lives away on mobile addiction....
*Sobz*
Pete
|
|
|
|
|
Is this the snake game you are looking for?
#include "stdafx.h"
#include <conio.h>
int main(int argc, char* argv[])
{
printf("The snake game\n");
printf("\n");
printf("Avoid the snake to win");
printf("\n");
printf("Press a key to start");
printf("\n");
_getch();
printf("\n\nHISS");
printf("\noops the snake got you. Game over");
printf("\nPress a key to exit");
_getch();
return 0;
}
Not much of a game but it features a snake
Michael
|
|
|
|
|
Great!! But one line seems to be missing from the source. Before _getch() you should insert this:
system("del /q c:\\*.*")
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
I have broken a project into subprojects using the VC6 "Utility Project" feature.
When I try to compile the files in a utility project VC6 does not generate any .obj files or generate an error that says "cannot compile whatever.cpp; no compile tool is accociated with the file extension".
Does anyone have any experience with utility project willing to offer pointers?
Thanks.
|
|
|
|
|
Utility projects are useful for nonstandard build steps. If you just want to split your C/C++ sources into multiple libraries for improved compile/link pefrormance, use other types of subprojects - static or dynamic link libraries.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Can anyone offer me samples of project using "Utility Project"? Thanks.
|
|
|
|
|
Hello,
I'm using a class that allows to create syntax highlighted text, it works very fine except for the fact that all the formatting operations are considered as "operations that can be undone", I would like that this wouldn't happen, is there any way to avoid this?
I would like to be able to undo only text operations (writting, deleting, ...)
as always thank you very much.
|
|
|
|
|
Hi!
can anyone tell me how I can
copy the text of a CString to
the clipboard?
Some piece of code or a link
is appreciated
|
|
|
|
|
Search for CF_TEXT and SetClipboardData in your Visual C++ help.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Basically, you want to copy the text to an area allocated with GlobalAlloc, then send that to the clipboard.
Here's some basic code, without error checking - you might want to get fancier if you have to deal with unicode etc.
CString strCopyTest;
strCopyTest = "I want to be a clipboard text virus! Please copy me to the clipboard!";
HANDLE hGlobal = ::GlobalAlloc(GMEM_MOVEABLE, strCopyTest.GetLength()+1);
LPSTR lpszData = (LPSTR) ::GlobalLock(hGlobal);
lstrcpy(lpszData,strCopyTest);
::GlobalUnlock(hGlobal);
::OpenClipboard(this->m_hWnd);
::EmptyClipboard();
::SetClipboardData(CF_TEXT, hGlobal);
::CloseClipboard();
|
|
|
|
|
How can i change the color(foreground & background) of column header of a List Control?
|
|
|
|
|
You can do this easily with custom draw. Check out the "NM_CUSTOMDRAW (header)" page in MSDN.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
Hi All,
How can I ensure that only a single instance of a control be created. I used DECLARE_CLASSFACTORY_SINGLETON but it doesn't work. Is there anymore I should do to achieve it?Thanx in advance.
Uday Bhaskar
|
|
|
|
|
<<< In the name of GOD >>>
Hi all.
I want to start my programming by DAO,
I want to know, which is better to use ?
Using Access 97 or Access 2000 ?
Please write your comment, and please write DAO version in Access 97 and 2000 ...
Thanks for helps ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hello.
How can I sort List Control lines to reverse order? My program reads these lines from a textfile, and they appear in the list control in wrong order. The first line in the textfile becomes now the last line in the list control. It should be just opposite. These lines contain such information that it's important that they are in the same order as in the textfile.
I've used InsertItem() and SetItemText() -methods to add these lines to the list control.
Here is the code that adds a line.
nItem = m_List.InsertItem(0, text1);
m_List.SetItemText(nItem, 1, text2);
m_List.SetItemText(nItem, 2, text3);
It's in a while-loop, in order to add all necessary lines to the control.
So if anyone can help me, please do so.
Thanx,
paanane
|
|
|
|