|
|
Up |
|
|
  |
Author: JussiJJussiJ
Date: May 23, 2007 16:40
On May 23, 8:06 pm, aleksa gmail.com> wrote:
> JussiJ suggested GetKeyboardState.
> I haven't tried anything yet, but it seems
> that GetKeyboardState won't work for me
Another option would be to install a KeyboardProc and keep
processing the message queue as you draw.
The KeyboardProc hook procedure is an application-defined or
library-defined callback function used with the SetWindowsHookEx
function. The system calls this function whenever an application
calls the GetMessage or PeekMessage function and there is a
keyboard message (WM_KEYUP or WM_KEYDOWN) to be processed.
Jussi Jumppanen
http://www.zeusedit.com - Zeus for Windows Programmer's IDE
|
| |
|
| |
no comments
|
|
  |
Author: Kellie FittonKellie Fitton
Date: May 23, 2007 10:36
On May 23, 9:35 am, "Alf P. Steinbach" wrote:
> * Kellie Fitton:
>
>
>
> Kellie, you sent your message /four/ times. Perhaps use some other API
> than the one you used for that? ;-)
>
> Cheers,
>
> - Alf
>
> --
> A: Because it messes up the order in which people normally read text.
> Q: Why is it such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing on usenet and in e-mail?
Hi Alf,
|
| Show full article (0.59Kb) |
|
| |
no comments
|
|
  |
Author: Kellie FittonKellie Fitton
Date: May 23, 2007 09:03
On May 23, 3:40 am, param gmail.com> wrote:
> Hi
> I want to send a message from a process to a thread which is part of
> another process. The process is started as part of a service. So If i
> send a message using PostThreadMessage from unrelated process, it
> returns "ERROR_INVALID_THREAD_ID(1444)". It implies thread ID is local
> to that service (as per my understanding). Is it possible to change
> the scope of the thread ID? If we can, please help me.
>
> Thanks
> Param
Hi,
Well, windows32 applications operate in their own protected address
space. So, if your two application processes/windows are existing in
two different address spaces, you will need to use any form of IPC
mechanism to establish communication between them, named pipes
are efficient, easy to use and provide secure access methods, you can
use event objects with named pipes to signal completion and notify
a waiting thread of the occurrence of an event.
|
| Show full article (2.30Kb) |
|
1 Comment |
|
  |
Author: Kellie FittonKellie Fitton
Date: May 23, 2007 09:02
On May 23, 3:40 am, param gmail.com> wrote:
> Hi
> I want to send a message from a process to a thread which is part of
> another process. The process is started as part of a service. So If i
> send a message using PostThreadMessage from unrelated process, it
> returns "ERROR_INVALID_THREAD_ID(1444)". It implies thread ID is local
> to that service (as per my understanding). Is it possible to change
> the scope of the thread ID? If we can, please help me.
>
> Thanks
> Param
Hi,
Well, windows32 applications operate in their own protected address
space. So, if your two application processes/windows are existing in
two different address spaces, you will need to use any form of IPC
mechanism to establish communication between them, named pipes
are efficient, easy to use and provide secure access methods, you can
use event objects with named pipes to signal completion and notify
a waiting thread of the occurrence of an event.
|
| Show full article (2.30Kb) |
|
no comments
|
|
  |
Author: Kellie FittonKellie Fitton
Date: May 23, 2007 09:02
On May 23, 3:40 am, param gmail.com> wrote:
> Hi
> I want to send a message from a process to a thread which is part of
> another process. The process is started as part of a service. So If i
> send a message using PostThreadMessage from unrelated process, it
> returns "ERROR_INVALID_THREAD_ID(1444)". It implies thread ID is local
> to that service (as per my understanding). Is it possible to change
> the scope of the thread ID? If we can, please help me.
>
> Thanks
> Param
Hi,
Well, windows32 applications operate in their own protected address
space. So, if your two application processes/windows are existing in
two different address spaces, you will need to use any form of IPC
mechanism to establish communication between them, named pipes
are efficient, easy to use and provide secure access methods, you can
use event objects with named pipes to signal completion and notify
a waiting thread of the occurrence of an event.
|
| Show full article (2.30Kb) |
|
no comments
|
|
  |
Author: Kellie FittonKellie Fitton
Date: May 23, 2007 09:01
On May 23, 3:40 am, param gmail.com> wrote:
> Hi
> I want to send a message from a process to a thread which is part of
> another process. The process is started as part of a service. So If i
> send a message using PostThreadMessage from unrelated process, it
> returns "ERROR_INVALID_THREAD_ID(1444)". It implies thread ID is local
> to that service (as per my understanding). Is it possible to change
> the scope of the thread ID? If we can, please help me.
>
> Thanks
> Param
Hi,
Well, windows32 applications operate in their own protected address
space. So, if your two application processes/windows are existing in
two different address spaces, you will need to use any form of IPC
mechanism to establish communication between them, named pipes
are efficient, easy to use and provide secure access methods, you can
use event objects with named pipes to signal completion and notify
a waiting thread of the occurrence of an event.
|
| Show full article (2.30Kb) |
|
no comments
|
|
  |
Author: hconnellhconnell
Date: May 23, 2007 08:05
How can I capture mouseevents using win32 api over an ownerdrawn
combobox?
need to know which selection the mouse pointer is over at any time?
i know there is the CBN_SELCHANGE message but this only says when a
selection changes not when a mouse is over a selection, hope my
question makes sense - thanks.
|
| |
|
1 Comment |
|
  |
Author:
Date: May 23, 2007 05:29
Axel Wild wrote:
> Hello,
>
> when I'm creating a new Win32-Project with MS Visual C++ 2003, I get
> an ERROR_INVALID_HANDLE-error, directly after the beginning of
> WinMain:
>
> sample:
> //==============================================
> int APIENTRY _tWinMain(HINSTANCE hInstance,
> HINSTANCE hPrevInstance,
> LPTSTR lpCmdLine,
> int nCmdShow)
> {
> DWORD word;
> word = GetLastError(); // ==> word = 6, ERROR_INVALID_HANDLE
> //==============================================
>
> I was searching for an other error in an other project and found out
> this. ...
|
| Show full article (0.91Kb) |
|
no comments
|
|
  |
Author: nospamnospam
Date: May 23, 2007 04:50
"Alf P. Steinbach" wrote:
>> I need to launch Acrobat Reader with parameters from my source code.
>> The following opens up test.pdf on page 3:
>>
>> strcpy(sa1,"C:\\Program Files\\Adobe\\Reader 8.0\\Reader\\AcroRd32...
|
| Show full article (1.32Kb) |
|
no comments
|
|
  |
|
|
  |
Author: aleksaaleksa
Date: May 23, 2007 04:15
On May 23, 12:06 pm, aleksa gmail.com> wrote:
> On May 23, 2:13 am, dj3va...@caffeine.csclub.uwaterloo.ca (Dave
>
>
>
>
>
> Vandervies) wrote:
>
>> aleksa gmail.com> wrote:
>>>How do I detect if any key is pressed while I'm processing a message
>>>in a single-threaded app?
>
>>>My WM_PAINT handler may take 2 seconds to finish, and I must
>>>stop drawing if there is *any* key pressed, including mouse buttons.
>
>>>Something like GetAsyncKeyState for all keys?
>
>> Draw incrementally to a bitmap, and in the WM_PAINT handler just copy ...
|
| Show full article (2.13Kb) |
|
no comments
|
|
|
|
|
|
|