p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Ivor Horton's Beginning Visual C++ 2005 (http://p2p.wrox.com/forumdisplay.php?f=249)
-   -   Chapter 11 WINAPI or CALLBACK in WindowProc (http://p2p.wrox.com/showthread.php?t=58154)

proslambano May 21st, 2007 06:02 PM

Chapter 11 WINAPI or CALLBACK in WindowProc
I was a little confused in the WindowProc() header.

Should it be,
as on page 633 at top of page

LRESULT WINAPI WindowProc(.....
as on pages 636, 637



shade cat May 27th, 2007 03:56 PM

I don't fully understand everything I am reading in this book. Maybe this is an error that has not been added to the Errata sheet. You can submit an error via an errata form ( https://hub.wiley.com/community/support/wrox )and the author or his people will attempt to verify the error and add it to the errata sheet.

hope this helps

Dan6 July 18th, 2007 02:44 PM

Hi Brian,

If you've had a go at Ex11_01 you'll probably have the code available inside Visual Studio. If you right-click on WINAPI and select 'Go to definition' it will bring up 'windef.h'.

In here you can see that if you are compiling on a Windows system, as opposed to a Mac or something else, WINAPI is defined as '__stdcall'. Directly above it you can see that CALLBACK is defined as exactly the same thing.

So it shouldn't make any difference to the compilation process. If you're supposed to use one or the other for code readability purposes I couldn't tell you.

Hope this is helpful.


All times are GMT -4. The time now is 06:55 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.