大家好啊。
我想用delphi 7给另一个窗口发一条指令
但是这条指令必须是双字类型的值比如0xEF3A,不是一个整型的值。
怎么办?TheWindow:HWND;
commandID:integer; //commandID 必须赋值0xEF3A所以不是整形//这样不能工作
SendMessage(TheWindow, WM_COMMAND, commandID, 0); 
 
//我需要类似这样的
SendMessage(TheWindow, WM_COMMAND, 0xEF3A, 0); 

解决方案 »

  1.   

    what is your 0xEF3A value? ? this does not look like a Delphi Pascal. . .  if you mean a hecidecimal notation, you use the dollar sing in Delphi$EF3Ato tell the compiler to use it as a HexI beleive you can use Integers  as HexcommandID := $EF3A;SendMessage(TheWindow, WM_COMMAND, $EF3A, 0); 
    // this should workAm I missing something in your question?it seems likeSendMessage(TheWindow, WM_COMMAND, commandID, 0);should work?,  since the wParam is defined as an Integer;