Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Win API / January 2007



Tip: Looking for answers? Try searching our database.

Message only window

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve - 24 Jan 2007 14:14 GMT
Can somebody provide me with some example code for creating a message
only window.

Thanks
Bob Butler - 24 Jan 2007 15:11 GMT
> Can somebody provide me with some example code for creating a message
> only window.

What do you mean by that?

Signature

Reply to the group so all can participate
VB.Net: "Fool me once..."

Steve - 24 Jan 2007 15:30 GMT
> > Can somebody provide me with some example code for creating a message
> > only window.What do you mean by that?
>
> --
> Reply to the group so all can participate
> VB.Net: "Fool me once..."

I have read that you can create a "message-only-window" that has no
visible representation and is light on resource usage.  This window
would then be used to receive callbacks from APIs.  I know that this is
done using the CreateWindowEX function but that is all I know.  I do
not know what (if any) special parameters need to be passed to the
createwindow function and I also am not sure how to receive messages
from the window oncew it is created.

Thanks
Thorsten Albers - 24 Jan 2007 17:11 GMT
Steve <sredmyer@rfcorp.com> schrieb im Beitrag
<1169652613.499253.285470@l53g2000cwa.googlegroups.com>...
> I have read that you can create a "message-only-window" that has no
> visible representation and is light on resource usage.  This window
[quoted text clipped - 3 lines]
> createwindow function and I also am not sure how to receive messages
> from the window oncew it is created.

- Register a window class of your own
- Create a window of the registered window class without specifying the
WS_VISIBLE style.

All messages for this window will be sent to the Window procedure of the
registered window class.

Presumably a hook of some kind will do all what can be done with this kind
of window, and it doesn't need a window...

Signature

----------------------------------------------------------------------
THORSTEN ALBERS                       Universität Freiburg
                                               albers@
                                                      uni-freiburg.de
----------------------------------------------------------------------

Steve - 24 Jan 2007 19:34 GMT
On Jan 24, 12:11 pm, "Thorsten Albers" <alber...@MOVEuni-freiburg.de>
wrote:
> Steve <sredm...@rfcorp.com> schrieb im Beitrag
> <1169652613.499253.285...@l53g2000cwa.googlegroups.com>...
[quoted text clipped - 21 lines]
>                                                        uni-freiburg.de
> ----------------------------------------------------------------------

I realize that I could do that but that is no different than having a
non visible form.  What I am looking for is a "Message-Only-Window".  I
think I remeber reading somewhere that one is created by calling
CreateWindowEX using the HWND_MESSAGE parameter but I am not sure.  I
also need to know how I would get messages from this window once it is
created.
Thorsten Albers - 24 Jan 2007 21:41 GMT
Steve <sredmyer@rfcorp.com> schrieb im Beitrag
<1169667271.756687.182070@q2g2000cwa.googlegroups.com>...
> I realize that I could do that but that is no different than having a
> non visible form.  What I am looking for is a "Message-Only-Window".  I
> think I remeber reading somewhere that one is created by calling
> CreateWindowEX using the HWND_MESSAGE parameter but I am not sure.  I
> also need to know how I would get messages from this window once it is
> created.

O.k.:
Do what I have said in my previous posting, but:
Create the window (CreateWindow(), CreateWindowEx()) with HWND_MESSAGE
passed for the paramater 'hWndParent'.
Also with this the messages will be send to the default window procedure of
the registered window class. If you would like to use a modified window
procedure, subclass the window.

But be aware of the fact that this is supported on Windows >= 5.0 only!

Signature

----------------------------------------------------------------------
THORSTEN ALBERS                       Universität Freiburg
                                               albers@
                                                      uni-freiburg.de
----------------------------------------------------------------------

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.