--
Best Regards,
Hynek Cihlar
Sent via Deja.com http://www.deja.com/
Before you buy.
I don't belive there is much in the way of official documentation for this
file. It does have a number of helpfull macros, one can only determine their
usage by examining the windowsx.h file and making an educated guess.
Chris
--
VisualC++ & Win32 FAQ: http://www.mvps.org/vcfaq
My Win32 Page: http://www.mvps.org/user32
For lots of info, search for message crackers and win32 on the net, or buy
these books
Advanced Windows 3rd Ed by J Richter (95 and NT 4)
or his newer Advanced Windows Programming for Win2000
Message Crackers allow you to split up callback procedures. switch case
statements can get ridiculously big so
HANDLE_MSG (hwnd, WM_COMMAND, Cls_On_Command) says if the procedure
recieves WM_COMMAND, then forward the message to a function called
Cls_On_Command in a really usefull format.
The prototypes for the functions the message gets redirected to are in
windowsx.h
Search for WM_COMMAND in windowsx.h and you will find this (maximise your
window now!)
/* void Cls_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) */
#define HANDLE_WM_COMMAND(hwnd, wParam, lParam, fn) \
((fn)((hwnd), (int)(LOWORD(wParam)), (HWND)(lParam),
(UINT)HIWORD(wParam)), 0L)
#define FORWARD_WM_COMMAND(hwnd, id, hwndCtl, codeNotify, fn) \
(void)(fn)((hwnd), WM_COMMAND,
MAKEWPARAM((UINT)(id),(UINT)(codeNotify)), (LPARAM)(HWND)(hwndCtl))
All you need do is find this section for any command e.g WM_PAINT, search in
windowsx.h and get the prototype from above the #define HANDLE_?????????
and use this in your code instead!
Did I help?
Cheers,
Djc2000
<lop...@my-deja.com> wrote in message news:8f9lbg$mif$1...@nnrp1.deja.com...
> Hi,
> today I found out, that there is windowsx.h in WIN API. I had never
> seen this header file and any functions defined in it before. So I
> tried, of course, to look in MSDN, but I couldn't find anything about
> this file and functions it supports. For example I was looking for
> HANDLE_MSG macro, which is defined in windowsx.h.
> Can anyone help me and tell where can I find these information??
> Thanks a lot!
>
I thought si and I hoped I was wrong...
At least I can invest the time, otherwise spent looking for some
documentation, into examining the source files.
Djc2000
<lop...@my-deja.com> wrote in message news:8f9lbg$mif$1...@nnrp1.deja.com...
> Hi,
> today I found out, that there is windowsx.h in WIN API. I had never
> seen this header file and any functions defined in it before. So I
> tried, of course, to look in MSDN, but I couldn't find anything about
> this file and functions it supports. For example I was looking for
> HANDLE_MSG macro, which is defined in windowsx.h.
> Can anyone help me and tell where can I find these information??
> Thanks a lot!
>
> --
>
> Best Regards,
AFAIK, windowsx.h was first included with the Windows 3.1 SDK. It
was documented in a file named windowsx.txt that was included at the
time. MS has a KB article (Q83456) that provides a _little_ bit of
material about it, but not nearly as much as windowsx.txt did.
Unfortunately, while windowsx.h has been updated for Win32, it
doesn't look like windowsx.txt has received nearly as much (if any)
attention.
This is too bad, as windowsx.h has a lot of handy stuff and it works
quite nicely. When you get down to it, an awful lot of what people
associated with MFC is provided by windowsx.h. The biggest
difference is in the overhead; MFC's is a LOT higher.
--
Later,
Jerry.
The universe is a figment of its own imagination.
Sincerely,
Hynek Cihlar
In article <8fa36c$fe2$1...@uranium.btinternet.com>, dontb...@nospam.com
says...
> http://support.microsoft.com/support/kb/articles/q83/4/56.asp
>
> Djc2000
>
>
> <lop...@my-deja.com> wrote in message news:8f9lbg$mif$1...@nnrp1.deja.com...
> > Hi,
> > today I found out, that there is windowsx.h in WIN API. I had never
> > seen this header file and any functions defined in it before. So I
> > tried, of course, to look in MSDN, but I couldn't find anything about
> > this file and functions it supports. For example I was looking for
> > HANDLE_MSG macro, which is defined in windowsx.h.
> > Can anyone help me and tell where can I find these information??
--
-----------------------------------------
To reply to me, remove the underscores (_) from my email address.
Robert E. Zaret
PenFact, Inc.
20 Park Plaza, Suite 454
Boston, MA 02116
www.penfact.com
lop...@my-deja.com wrote in message <8f9lbg$mif$1...@nnrp1.deja.com>...