Click here to Skip to main content
15,922,533 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can handle buttons of Preview window? Pin
Le@rner29-Dec-08 22:40
Le@rner29-Dec-08 22:40 
GeneralRe: How can handle buttons of Preview window? Pin
pallaka30-Dec-08 1:16
pallaka30-Dec-08 1:16 
GeneralRe: How can handle buttons of Preview window? Pin
Le@rner30-Dec-08 1:26
Le@rner30-Dec-08 1:26 
QuestionRemovable hard disk Pin
MsmVc29-Dec-08 20:55
MsmVc29-Dec-08 20:55 
QuestionHow to create child window in SDI application? Pin
Abhijit D. Babar29-Dec-08 20:24
Abhijit D. Babar29-Dec-08 20:24 
Questionhow to convert binary values into decimal by getting these values from dialog box? Pin
puppya29-Dec-08 20:14
puppya29-Dec-08 20:14 
AnswerRe: how to convert binary values into decimal by getting these values from dialog box? Pin
enhzflep29-Dec-08 20:48
enhzflep29-Dec-08 20:48 
GeneralRe: how to convert binary values into decimal by getting these values from dialog box? Pin
CPallini29-Dec-08 21:04
mveCPallini29-Dec-08 21:04 
enhzflep wrote:
You just need to obtain the state of the check box and use some simple bitwise operations. You'll want to do something like this:

int myNumber = 0;
if (checkBox4.isChecked()) myNumber &= 1;
if (checkBox3.isChecked()) myNumber &= 2;
if (checkBox2.isChecked()) myNumber &= 4;
if (checkBox1.isChecked()) myNumber &= 8;


Two notes:

  • AFAIK there's no isChecked method available (even CMFCButton has IsChecked, i.e. starting uppercase).
  • The correct bitwise operator is OR (|), instead of AND (&).

Be careful when proposing code.
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

Questionstd::map or stdex:hash_map Pin
Swinefeaster29-Dec-08 18:13
Swinefeaster29-Dec-08 18:13 
QuestionLinking to another project [SOLVED] Pin
Christian Flutcher29-Dec-08 17:17
Christian Flutcher29-Dec-08 17:17 
AnswerRe: Linking to another project [SOLVED] Pin
Cedric Moonen29-Dec-08 21:40
Cedric Moonen29-Dec-08 21:40 
GeneralRe: Linking to another project [SOLVED] Pin
Christian Flutcher30-Dec-08 1:12
Christian Flutcher30-Dec-08 1:12 
GeneralRe: Linking to another project [SOLVED] Pin
Cedric Moonen30-Dec-08 22:15
Cedric Moonen30-Dec-08 22:15 
QuestionNeed help with writing an audio stream in avi Pin
monoceres29-Dec-08 14:41
monoceres29-Dec-08 14:41 
QuestioncapCreateCaptureWindow - source code wanted Pin
Vaclav_29-Dec-08 8:21
Vaclav_29-Dec-08 8:21 
AnswerRe: capCreateCaptureWindow - source code wanted Pin
Randor 29-Dec-08 8:52
professional Randor 29-Dec-08 8:52 
GeneralRe: capCreateCaptureWindow - source code wanted Pin
Vaclav_30-Dec-08 7:09
Vaclav_30-Dec-08 7:09 
QuestionHow to find an Access violation error(involving CStringT) in 3rd Party program Pin
Larry Mills Sr29-Dec-08 6:37
Larry Mills Sr29-Dec-08 6:37 
GeneralRe: How to find an Access violation error(involving CStringT) in 3rd Party program Pin
CPallini29-Dec-08 7:56
mveCPallini29-Dec-08 7:56 
GeneralRe: How to find an Access violation error(involving CStringT) in 3rd Party program Pin
Randor 29-Dec-08 9:02
professional Randor 29-Dec-08 9:02 
GeneralRe: How to find an Access violation error(involving CStringT) in 3rd Party program Pin
Larry Mills Sr29-Dec-08 11:35
Larry Mills Sr29-Dec-08 11:35 
QuestionRandom seeding in C++ different to Java? Pin
c#_keithy29-Dec-08 6:16
c#_keithy29-Dec-08 6:16 
GeneralRe: Random seeding in C++ different to Java? Pin
Luc Pattyn29-Dec-08 6:26
sitebuilderLuc Pattyn29-Dec-08 6:26 
QuestionRe: Random seeding in C++ different to Java? Pin
CPallini29-Dec-08 7:50
mveCPallini29-Dec-08 7:50 
AnswerRe: Random seeding in C++ different to Java? Pin
BobInNJ29-Dec-08 9:44
BobInNJ29-Dec-08 9:44 

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.