Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | raltbos@xs4all.nl (Richard Bos) |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: VS2015 |
| Date | 2015-06-20 09:16 +0000 |
| Organization | Go wash your mouth. |
| Message-ID | <55852ef4.2374218@news.xs4all.nl> (permalink) |
| References | <f7d2d395-4619-418b-8bdb-a38c322321eb@googlegroups.com><mvb3oal715qbbo0vfccpjjt391soglm01s@4ax.com><lnwpz2jjll.fsf@nuthaus.mib.org><5581BDAF.1090903@verizon.net> <20150617204429.6c71ddcc@maxa-pc> <mlso4c$fhr$1@dont-email.me> <mm0bps$j30$1@dont-email.me> <121604f6-4ce2-420b-9d39-0c3275f2ebbe@googlegroups.com> |
Paul N <gw7rib@aol.com> wrote: > Mind you, only this week I was using GetWindowLongPtr and I thought to myse= > lf that only Microsoft would make a compiler where you can get rid of a war= > ning by casting the result of a function call to the type the funtion retur= > ns. GetWindowLongPtr returns a LONG_PTR (according to MSDN) but VC++ compla= > ins about > > ppp =3D (int *) GetWindowLongPtr(hWnd, GWL_STYLE); > > (converting to a greater size) > > while allowing > > ppp =3D (int *) (LONG_PTR) GetWindowLongPtr(hWnd, GWL_STYLE); > > with no warning. Of course, one might expect GetWindowLongPtr to return an = > actual pointer... Now, it wouldn't be out of character for Mickey$oft to demand that you pervert your code like that, but a thought _does_ occur... Are you sure you #included the relevant header? This sounds as if the compiler thinks GetWindowLongPtr() _doesn't_ return a LONG_PTR. Richard
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
VS2015 esamiira@gmail.com - 2015-06-17 09:50 -0700
Re: VS2015 Barry Schwarz <schwarzb@dqel.com> - 2015-06-17 10:36 -0700
Re: VS2015 Keith Thompson <kst-u@mib.org> - 2015-06-17 11:05 -0700
Re: VS2015 James Kuyper <jameskuyper@verizon.net> - 2015-06-17 14:34 -0400
Re: VS2015 Melzzzzz <mel@zzzzz.com> - 2015-06-17 20:44 +0200
Re: VS2015 "Charles Richmond" <numerist@aquaporin4.com> - 2015-06-17 16:18 -0500
Re: VS2015 jacobnavia <jacob@jacob.remcomp.fr> - 2015-06-19 08:12 +0200
Re: VS2015 Paul N <gw7rib@aol.com> - 2015-06-19 07:39 -0700
Re: VS2015 jacobnavia <jacob@jacob.remcomp.fr> - 2015-06-19 17:59 +0200
Re: VS2015 raltbos@xs4all.nl (Richard Bos) - 2015-06-20 09:16 +0000
Re: VS2015 Richard Heathfield <rjh@cpax.org.uk> - 2015-06-17 19:07 +0100
csiph-web