Click here to Skip to main content
16,016,894 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Change cursor like http://www.cometzone.com/ ? Pin
Ravi Bhavnani7-Aug-02 15:01
professionalRavi Bhavnani7-Aug-02 15:01 
GeneralChange window styles Pin
alex.barylski7-Aug-02 14:51
alex.barylski7-Aug-02 14:51 
GeneralRe: Change window styles Pin
Tomasz Sowinski8-Aug-02 0:02
Tomasz Sowinski8-Aug-02 0:02 
GeneralRe: Change window styles Pin
alex.barylski9-Aug-02 8:08
alex.barylski9-Aug-02 8:08 
GeneralForcing bits Pin
alex.barylski7-Aug-02 14:47
alex.barylski7-Aug-02 14:47 
GeneralRe: Forcing bits Pin
Ravi Bhavnani7-Aug-02 14:58
professionalRavi Bhavnani7-Aug-02 14:58 
GeneralRe: Forcing bits Pin
alex.barylski7-Aug-02 15:23
alex.barylski7-Aug-02 15:23 
GeneralRe: Forcing bits Pin
MSH_ILC7-Aug-02 15:14
MSH_ILC7-Aug-02 15:14 
I believe that you use the (dwStyle & WS_VISIBLE) to test if WS_VISIBLE bit is set in dwStyle, which might help you with what you want.
However a better way to do this is to use the OR operator ( it's the | : shift+\) the OR operation results in true if any of the arguments was true and false if none were true.
ie 1 or 1 = 1
1 or 0 = 1
0 or 1 = 1
0 or 0 = 0
while the AND (&) is only true if both arguments were true.

Since WS_VISIBLE is always true, the | operator with dwStyle and WS_VISIBLE will always force the bit you are interested in to true. The usage should be along the lines of:
dwStyle= dwStyle | WS_VISIBLE;
This will make sure that the flag bit is forced to true while the rest of the bits are unmodified (since WS_VISIBLE has only one bit turned to true).
exp:
dwStyle 1001110101110111
WS_VISIBLE 0000000010000000
Binary OR (|) 1001110111110111

this is called the Binary OR since it compares bits and results in bits, & is Binary AND too. && and || are the logical operators and compare the arguments bit by bit by return only true or false.

Please correct me if I'm wrong, it's been quite a while Smile | :) ...


-<msh>-
Young Basic programmers never die... they just GOSUB and never RETURN.
GeneralRe: Forcing bits Pin
alex.barylski7-Aug-02 15:24
alex.barylski7-Aug-02 15:24 
GeneralRe: Forcing bits Pin
PJ Arends7-Aug-02 15:31
professionalPJ Arends7-Aug-02 15:31 
GeneralMultithreading :: MFC Pin
valikac7-Aug-02 14:33
valikac7-Aug-02 14:33 
GeneralMSComm32 Pin
Frank Deo7-Aug-02 13:35
Frank Deo7-Aug-02 13:35 
GeneralTrouble w/ Multithreaded Windows Service Please Help Pin
Aisha7-Aug-02 13:29
Aisha7-Aug-02 13:29 
GeneralRe: Trouble w/ Multithreaded Windows Service Please Help Pin
Todd Smith8-Aug-02 18:39
Todd Smith8-Aug-02 18:39 
Generalabout Outlook Pin
rev7-Aug-02 13:24
rev7-Aug-02 13:24 
Generaldialog Pin
danag7-Aug-02 13:13
danag7-Aug-02 13:13 
GeneralRe: dialog Pin
Chris Losinger7-Aug-02 13:15
professionalChris Losinger7-Aug-02 13:15 
GeneralRe: dialog Pin
danag7-Aug-02 14:04
danag7-Aug-02 14:04 
GeneralRe: dialog Pin
Chris Losinger7-Aug-02 15:06
professionalChris Losinger7-Aug-02 15:06 
GeneralRe: dialog Pin
Christian Graus7-Aug-02 13:24
protectorChristian Graus7-Aug-02 13:24 
GeneralRe: dialog Pin
danag7-Aug-02 13:26
danag7-Aug-02 13:26 
GeneralRe: dialog Pin
Christian Graus7-Aug-02 13:44
protectorChristian Graus7-Aug-02 13:44 
QuestionHow to implement Global Pointers ? Pin
oRion7-Aug-02 13:06
oRion7-Aug-02 13:06 
AnswerRe: How to implement Global Pointers ? Pin
Christian Graus7-Aug-02 13:13
protectorChristian Graus7-Aug-02 13:13 
GeneralRe: How to implement Global Pointers ? Pin
Anonymous8-Aug-02 17:59
Anonymous8-Aug-02 17:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.