comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
May 2007
motuwethfrsasuw
 123456 18
78910111213 19
14151617181920 20
21222324252627 21
28293031    22
2007
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007    
total
comp.os ... win32 Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Re: Any key pressed?         


Author: JussiJ
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
  Re: Send message from a process to a thread in another process         


Author: Kellie 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
  Re: Send message from a process to a thread in another process         


Author: Kellie 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
  Re: Send message from a process to a thread in another process         


Author: Kellie 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
  Re: Send message from a process to a thread in another process         


Author: Kellie 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
  Re: Send message from a process to a thread in another process         


Author: Kellie 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
  ComboBox & Mouse Events         


Author: hconnell
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
  Re: Error ERROR_INVALID_HANDLE directly after WinMain (created with VC++ 2003, .net 1.1)         


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
  Re: How to launch Acrobat Reader from my own source         


Author: nospam
Date: May 23, 2007 04:50

"Alf P. Steinbach" wrote:
>* nospam@thank.you.com:
>> 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
  Re: Any key pressed?         


Author: aleksa
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:
>> In article <1179865815.707221.309...@x35g2000prf.googlegroups.com>,
>
>> 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
1 2