CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2001
    Posts
    28

    Bit manipulation


    My form consists of a toolbar which has 10buttons and 3 command buttons.All the buttons are disabled on the form load.When i click on the command button1 the second and third buttons of the toolbar gets activated.Here i want to set bits for those activated buttons.

    For ex:

    0000000000 --start condition
    0110000000 --after one command activates
    0001111000 -- after clicking 2nd command button.

    I hv declared 2 constants
    const br= &H68E7780 hex equivalent of 0110000000

    const cr=10F3D8 hex equivalent of 0001111000.

    On command 3 ,i'll be checking as :

    if my_toolbarstatus=br then
    // statements
    elseif my_toolbarstatus=cr then
    //statements
    else
    statements
    endif

    Any help in this regard is appreciated.

    Anita






  2. #2
    Join Date
    Apr 2000
    Posts
    737

    Re: Bit manipulation

    seems like you don't have to make the problem so complicated, just check the .Enable property of each button will let you know which button has been click.


    HTH

    cksiow
    http://vblib.virtualave.net - share our codes

  3. #3
    Join Date
    Jun 2001
    Posts
    28

    Re: Bit manipulation

    hi cksiow

    They are ways to do it, but our requirement is in this way.

    Anita


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured