当然有,Delphi的位操作和C/C++的同样强大。
看看and、and、not、xor的帮助吧。发消息就看看Sendmessage、Postmessage的API帮助文档吧。

解决方案 »

  1.   

    哈哈,收到了,谢谢!
    下面是关于位运算的所有运算符号The following logical operators perform bitwise manipulation on integer operands. For example, if the value stored in X (in binary) is 001101 and the value stored in Y is 100001, the statementZ := X or Y;assigns the value 101101 to Z.Operator Operation Operand types Result type Examples
    not bitwise negation integer integer not X
    and bitwise and integer integer X and Y
    or bitwise or integer integer X or Y
    xor bitwise xor integer integer X xor Y
    shl bitwise shift left integer integer X shl 2
    shr bitwise shift right integer integer Y shl I
    The following rules apply to bitwise operators.The result of a not operation is of the same type as the operand.
    If the operands of an and, or, or xor operation are both integers, the result is of the predefined integer type with the smallest range that includes all possible values of both types.
    The operations x shl y and x shr y shift the value of x to the left or right by y bits, which is equivalent to multiplying or dividing x by 2^y; the result is of the same type as x. For example, if N stores the value 01101 (decimal 13), then N shl 1 returns 11010 (decimal 26).
      

  2.   

    是不是俺这次给的分太低??俺是要对某个特定的控件发消息!!还要用弱智的api?再说,俺也不知道那些控件接受的是什么信息?!!hank,总是只回答一半吗?这次,又
      

  3.   

    俺是问了16进制数在DELPHI中如何表示!
      

  4.   

    不好意思,没有看到另外的问题;
    $10是十六进制的10,也就是十进位制的16;DELPHI中用$标识十六进制,同C/C++中的0x
    发送消息激发特定的事件?搞不清楚什么意思!你是不是激发指定控件的指定时间?这倒有简单方法,例如:
    Bit1Click中写入:
    Bit2.OnClick:=Bit1Click;
      

  5.   

    比如说,俺为button1写了一个OnClick事件的处理函数叫Bit1click。其中写一些语句。
    俺在button2的OnClick事件中想触发button1的OnClick事件,模拟户不点击button1的效果。
    俺想应该只用在Bit2Click中写入

    Bit1Click;

    即可。估计button1不会有被按下的效果。如果不是button1,而是一些复选项的东西。那
    它的状态就不会改变了。对吗?所以,俺想传递一个消息给Button1,模拟OnClick事件。
      

  6.   

    比如说,俺为button1写了一个OnClick事件的处理函数叫Bit1click。其中写一些语句。
    俺在button2的OnClick事件中想触发button1的OnClick事件,模拟户不点击button1的效果。
    俺想应该只用在Bit2Click中写入

    Bit1Click;

    即可。估计button1不会有被按下的效果。如果不是button1,而是一些复选项的东西。那
    它的状态就不会改变了。对吗?所以,俺想传递一个消息给Button1,模拟OnClick事件。
      

  7.   

    还是没有明白。
    BUTTON1没有按下的效果,但它的作用还是实现了。如果它要改变什么状态,应该有改变了!
      

  8.   

    要给特定的控件发信息
    先要想办法获得那个控件的句柄,或那个控件所在窗口的句柄
    然后可以用postmessage,或mouse_event, ken_event等函数来发出相应的消息
    应该没问题的
    还有,我看到有人小看API,你别告诉我你是ASM高手,或更厉害,能直接用01写代码
    只有掌握了API,才是真正的编程高手,至少在WIN下是这样的
    在我看来,几乎全世界也没几个人全面了解API的函数,更别说它的强大了
      

  9.   

    要给特定的控件发信息
    先要想办法获得那个控件的句柄,或那个控件所在窗口的句柄
    然后可以用postmessage,或mouse_event, ken_event等函数来发出相应的消息
    应该没问题的
    还有,我看到有人小看API,你别告诉我你是ASM高手,或更厉害,能直接用01写代码
    只有掌握了API,才是真正的编程高手,至少在WIN下是这样的
    在我看来,几乎全世界也没几个人全面了解API的函数,更别说它的强大了
      

  10.   

    看来我估计的没错,不过没有必要那么麻烦!
    例如建立两个Button,然后:
    procedure TTemplyForm.Button1Click(Sender: TObject);
    begin
    ShowMessage('Click Button2 Active Button1');
    Button2.OnClick:=Button1Click;
    end;当然,你可以在其它地方写入:Button2.OnClick:=Button1Click;
    但是如果的的两个Button激活的事件完全一样,那么可以在设计时选中Button2,然后从OnClick中选择你要激活的事件(注意:是选择,这可能是我首先发现的!)
      

  11.   

    谢谢了。不过。俺也知道你很牛,不过这次你的牛皮也吹的太大了!!俺虽然是上个星期才碰delphi,也知道OnClick是个复选框!当然可以选啦,还用说?!好啦,俺还是会给分的哦。
      

  12.   

    dinosaur_分猪肉啦,随便切了切,向空中抛洒开去
      

  13.   

    壮丁兄:你言重了!谁都知道api无所不能,问题是delphi声称对消息封装的很好!所以,应该有一套更好的方法来传递消息。不是吗?呵呵!不过俺也多谢你告诉俺delphi的不足。
    给三分别嫌少哦。