I can not find the invisible figure when I used the ::FindWindow function in My Windows application

조회 수: 1 (최근 30일)
Hello:
why I can not find the invisible figure when I used the ::FindWindow function in My Windows application?
matlab:
figure('Name','MyFigure','Visible','off');
C++:
HWND hwnd = ::FindWindow(NULL,'MyFigure') ;

답변 (1개)

Friedrich
Friedrich 2013년 12월 6일
Hi,
an invisble MATLAB figure does not get a Window Handle, so thats why you cannot find it.
You can obtain that by testing with a visible figure where it works, then you make that figure invisible and visible again and you will obtain that the Window Handle changed.
I haven't tested if that is a general JVM behavior of invisble windows or MATLAB specific.
In the case you try it out, let me know ;)
  댓글 수: 3
Walter Roberson
Walter Roberson 2013년 12월 7일
Friedrich's point is that there is no handle for the invisible figure. The window is getting destroyed at the Windows level (or something similar) when it is made invisible.
Friedrich
Friedrich 2013년 12월 10일
Overall: Why not moving the figure from the MATLAB side with MATLAB Code? Why that compilcated way using C/C++ Windows API functions.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by