62,614
社区成员
发帖
与我相关
我的任务
分享
Exception in thread "main" java.lang.NoSuchMethodError: com.sun.jna.platform.win32.WinGDI$ICONINFO.createFieldsOrder([Ljava/lang/String;)Ljava/util/List;[/size][/size]
[/code][/size]
import org.junit.Test;
import org.xvolks.jnative.misc.basicStructures.HWND;
import org.xvolks.jnative.misc.basicStructures.LPARAM;
import org.xvolks.jnative.misc.basicStructures.UINT;
import org.xvolks.jnative.misc.basicStructures.WPARAM;
import org.xvolks.jnative.util.User32;
public class JNativeLearning {
@Test
public void sendMessage() throws Exception{
HWND hWnd = User32.FindWindow("TXGuiFoundation", "QQ2010");
if(hWnd.getValue()>0){
System.out.println("window exists");
User32.SendMessage(hWnd, new UINT(0x10), new WPARAM(0), new LPARAM(0));
}else{
System.out.println("window doesn't exists");
}
}
}
转自:
http://qujianfeng.iteye.com/blog/1258363