开发者

Is there an Eventing mechanism to get updated the Window Coordinates(C++) when the window is moved or resized?

Thanks to this board, I am able to get the window coordinates with a known Title, but I need to get the coordinates if the window is moved or resized. I am new to MS Visual C++, any help on this from the experts will be so appreicated .... Here is my code I got from this great forum to get the handle of a particular window ( this function is being called by a java program via JNI :

JNIEXPORT jint JNICALL Java_JavaHowTo_getHwnd
     (JNIEnv *env, jclass obj, jstring title){

HWND hwnd = NULL;
const char *str = NULL;

str = (*env)->GetStringUTFChars(env, title, 0);

hwnd开发者_如何学JAVA = FindWindow(NULL,str);

(*env)->ReleaseStringUTFChars(env, title, str);

return (jint) hwnd;


In addition to WM_SIZE, WM_MOVE, you might also want to try WM_WINDOWPOSCHANGING . See this thread http://social.msdn.microsoft.com/Forums/en-US/vcmfcatl/thread/78229960-8dba-46a5-8f0b-90896a7c9f1d/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜