|
yes I am displaying the video and at the same time trying to process the pixels. The problem is that the program doesn't seem to be responding as it does with still images.
|
|
|
|
|
hiho@ll
i just need to sniffer what the user enters and the exact mouse events the user makes (mouse click (which button), mouse moves)
and i need to send such events to the OS (windows)
the problem: 1. i really have no idea how this could work
2. how can i send such events to the OS on an independent way
this means, i just don't know which window is focused (which application gets the events) and that's also what i want! i want to send these events to the OS which processes it for the right application! i don't want to know which app is focused because it's not necessary for what i need to do! (well, later maybe it will be necessary but that's another topic/post)
thx@ll
|
|
|
|
|
Hi,
to log the users keyboard and mouse activity you'll have to take a look
at the 'SetWindowsHookEx' function. This allows you to set system-wide keyboard and mouse
hooks which will receive all keyboard and mouse activity.
Once you have captured the events you can make use of the 'SendInput' function
to send the events to the OS which will handle them as if you were really
typing or moving the mouse...
Don't think you are, know you are...
|
|
|
|
|
Global hook is the solution to your problem, but hooks are not stable and are specifically used for debugging purposes.
While implementing the global hooks be curious O.W it would screw entire system.
Have a look at the API's
SetWindowsHookEx, UnhookWindowsHookEx etc...
You can get tons of information about hooks on codeproject and online MSDN.
All the best !
Cheers,
Vishal
|
|
|
|
|
|
Hi,
I want to disable some functions in the release build.
This is the fucntion:
void func1(...)
{
#ifdef _DEBUG
func2();
#endif //_DEBUG
}
I still see the outputs of func2() in the release build.
My preprocessor definitions for the
release build: WIN32;_CONSOLE;NDEBUG
debug build: WIN32;_CONSOLE;_DEBUG
I don't understand what is wrong. How can i solve the problem? Any help appreciated.
Thanks in advance
|
|
|
|
|
caykahve wrote:
I still see the outputs of func2() in the release build.
i don't understand well.
does func2() execute ?
what happens when you explicitely write a #undef _DEBUG (at the begining of stdafx.h for example) ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Yes func2() executes. I wrote #undef _DEBUG in stdafx.h and it still executes.
|
|
|
|
|
did you try rebuilding the whole project ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I always choose "Rebuild Solution" from build menu. i am using Visual Studio .net 2003 BTW.
|
|
|
|
|
|
|
Use the /P compiler switch on this file. It will preprocess the file into a file with a .i extension. Open that file and look for func1() . That will let you know if _DEBUG is being seen by the preprocessor or not.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
It's hard to believe that your function gets executed. Maybe you call func2 somewhere else?
Try using the debugger and set a breakpoint in func2. Then see the callstack for the caller.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
How can i at runtime copy a window (Cwnd object) and place it in another position?
/\|-||\/|/\|)
|
|
|
|
|
what do you want exactly ? move a window ? or copy it (i never heard of this before)...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
i want to move the one i copied
/\|-||\/|/\|)
|
|
|
|
|
use SetWindowPos() to move a window.
for copying a window, i really doubt you can do this...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
k
thx anyway
/\|-||\/|/\|)
|
|
|
|
|
It woudln't really be copying, per se, but couldn't you just get all the window styles and attributes from the first window and create a new window with all the same attributes? Or just make a class derived from the one you wanna copy and make a copy constructor that does all this work for you?
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
all depends if we talk about run time or design time...
i think he was thinking when the program was running...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
How can i wait for 1 seconds in my program before continuing executing the code?
What function ca i use?
/\|-||\/|/\|)
|
|
|
|
|
1- Sleep().
2-
HANDLE hEvent;
hEvent = CreateEvent(NULL,FALSE,FALSE,NULL);
WaitForSingleObject(hEvent,1000);
CloseHandle(hEvent);
this is this.
|
|
|
|
|
If it's a single threaded or want to stop one thread, you can use Sleep(1000).
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|