Link to home
Start Free TrialLog in
Avatar of chikersal
chikersal

asked on

three

Sir,
    I have three questions

1) like toolbar, i want my pushbutton to display tooltips when mouse linger over it for more then a sec. For that, i gave my button style as BS_NOTIFY in my resource file or in the CreateWindow() function if i am creating a stand alone pushbutton. But it does not generate any notification message. So tell me in detail how to go about it. Show sample code if possible

2) When we create window we write like this :

CreateWindow(), int this function the third parameter is WS_SRTLE-- which we give like this -- WS_OVERLAPPEDWINDOW,WS_VISIBLE|WS_SYSMENU ETC ETC. Now my question is that this parameter is a 32 bit value. At the most two pieces of information can be put in the low order and high order of this 32 bit value by using MAKELONG() macro. But here we are putting more then 2 pieces of information like ws_child|ws_visible|ws_tabstop|ws_sysmenu etc so how is it possible, is it thatwe have reserved bits for all these values like maybe firts bit is reserved of rws_child,if its 0 it means this style is applicable, is this the case. if not then how do we store these so many values

3) my third question is related to mfc. In mfc the prototype for message handler is afx_msg void .... etc

now they say afx_msg is a placeholder. Can u throw somelight on what do we mean by this
ASKER CERTIFIED SOLUTION
Avatar of jtwine100697
jtwine100697
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chikersal
chikersal

ASKER

#2: In a 32-bit value, you can hold 32 unique, exclusive values.  For example, the value "1" sets bit
0, the value "2" sets bit 1, the value "3" sets bits 0 and 1.  You can easily and quickly set and test
for bit values using the bit-wise operators ("|" and "&" are most used).



how can value 1 set bit 0, i mean in 0th bit the value stored can either b itself 0 or 1, but if u talk about 1 2 and 3 they further get converted into 0's and 1's so how is it possible
> how can value 1 set bit 0, i mean in 0th bit the value stored can either b itself 0 or 1,

   Because the bit zero is set when the 32-bit value contains a "1".  Bit one is set when the 32-bit vlaue contains a "2".  When bits zero and one are both set, the 32-bit value contains both a "1" and a "2", which are treated as added values, so you get "3".

> but if u talk about 1 2 and 3 they further get converted into 0's and 1's so how is it possible

Because bit values are always treated th same.  When you put a value of "3" into a 32-bit value, it will set bits zero and one in the value.  Here is a small example of how how binary works:

   0000    0
   0001    1
   0010    2
   0011    3
   0100    4
   0101    5
   0110    6
   0111    7
   1000    8

So the value of "7" affects bits zero (1), one (2), and two (4).  When you add up the values of the bits, 1, 2, and 4, you get 7.

Boolean operations are often used to combine/manipulate bits.

The following link (and the Boolean logic page linked from it) should help a bit: http://www.howstuffworks.com/bytes.htm

-=- James.
chikersal,

You have a large number of questions have been open for some time, and our records show you logged in as recently as today. Please resolve them appropriately as soon as possible. Continued disregard of your open questions will result in the force/acceptance of a comment as an answer; other actions affecting your account may also be taken. I will revisit these questions in approximately seven (7) days.

https://www.experts-exchange.com/jsp/qShow.jsp?qid=11443178
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11964778
https://www.experts-exchange.com/jsp/qShow.jsp?qid=12043279
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11564958
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20104338
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20104344
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20105195
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20107021
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20117736
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20123376
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20128779
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11146525
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11559878
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11540439
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20158555
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20174325
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20176309
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20177269
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20183746
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20184309
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20188568
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20260766
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20260773
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20262003

Thanks,

Netminder
Community Support Moderator
Experts Exchange
Force/accepted by

Netminder
Community Support Moderator
Experts Exchange