473,387 Members | 3,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Most significant bit in WM_COMMAND wparam

I've seen this in examples:

Case User.WM_COMMAND

Select Case (m.WParam.ToInt32 And &H7FFF0000) \ &H10000

My question is why is the most significant bit ignored?

Does it have some significance or maybe not allowed

thanks


Nov 16 '05 #1
4 2812
I think this is due to VB's lack of bit operations, but then again I
can't tell VB from a hole in the ground :-)

Read this:
http://support.microsoft.com/kb/q189170/

Regards,
Joakim

Just Me wrote:
I've seen this in examples:

Case User.WM_COMMAND

Select Case (m.WParam.ToInt32 And &H7FFF0000) \ &H10000

My question is why is the most significant bit ignored?

Does it have some significance or maybe not allowed

thanks

Nov 16 '05 #2

You would use FFFF0000 ??

thanks

"Joakim Karlsson" <jk*******@NOSPAMjkarlsson.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I think this is due to VB's lack of bit operations, but then again I can't
tell VB from a hole in the ground :-)

Read this:
http://support.microsoft.com/kb/q189170/

Regards,
Joakim

Just Me wrote:
I've seen this in examples:

Case User.WM_COMMAND

Select Case (m.WParam.ToInt32 And &H7FFF0000) \ &H10000

My question is why is the most significant bit ignored?

Does it have some significance or maybe not allowed

thanks


Nov 16 '05 #3
I'd guess that the purpose is to avoid sign extension that would result in the
division operation.

" Just Me" <gr****@a-znet.com> wrote in message news:OY***************@TK2MSFTNGP15.phx.gbl...
I've seen this in examples:

Case User.WM_COMMAND

Select Case (m.WParam.ToInt32 And &H7FFF0000) \ &H10000

My question is why is the most significant bit ignored?

Does it have some significance or maybe not allowed

Nov 16 '05 #4
guess that's it
thanks

"jeff" <ms**********@xoxy.net> wrote in message
news:en**************@TK2MSFTNGP14.phx.gbl...
I'd guess that the purpose is to avoid sign extension that would result in
the
division operation.

" Just Me" <gr****@a-znet.com> wrote in message
news:OY***************@TK2MSFTNGP15.phx.gbl...
I've seen this in examples:

Case User.WM_COMMAND

Select Case (m.WParam.ToInt32 And &H7FFF0000) \ &H10000

My question is why is the most significant bit ignored?

Does it have some significance or maybe not allowed


Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
3
by: Søren Badstue | last post by:
Hey there, I have just learned C++ for Windows programming, and try to understand the PeekMessage and the WM_COMMAND. When I click on a Menu-Item, I can reseive a WM_COMMAND in one of my...
8
by: MLH | last post by:
If I choose to dim MyDate as Date or MyDate as Variant, what is the most significant difference between the two choices?
56
by: infidel | last post by:
Where are they-who-hate-us-for-our-whitespace? Are "they" really that stupid/petty? Are "they" really out there at all? "They" almost sound like a mythical caste of tasteless heathens that "we"...
1
by: Qudus | last post by:
How to use WM_COMMAND when press the push button through BS_PUSHBUTTON in WINDOWS XP Platform give me the example of it in the source code visual c++ Thank You
2
by: Mukesh_Singh_Nick | last post by:
What is meant by the "most significant digits" in the following statement? <BLOCKQUOTE> With %g and %G, the precision modifier determines the maximum number of significant digits...
4
by: thegeneralguy | last post by:
Hello, I'm trying to find the least significant set bit (i.e. the first '1' bit in an int) through just bit twiddling, but I can't get it without resorting to a loop. My original idea was to...
3
johny10151981
by: johny10151981 | last post by:
Hi, Here a code part that create a group box and radio button hGroup=CreateWindowEx(0,L"BUTTON",L"Choose Connection type",...
1
johny10151981
by: johny10151981 | last post by:
In the program there two custom WNDCLASS 1. holder 2. inp_b a holder class window is generated in main window on WM_CREATE. 9 inp_b window is generated in holder window WM_CREATE 9...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.