getHWnd - retrieve the underlying Windows handle for Matlab figure(s)

Enable C++ GUI integration by retrieving the HWnd handle of matlab figure(s)

Al momento, stai seguendo questo contributo

Syntax:
hWnd = gethwnd(hFig)

Description:
HWnd = GETHWND retrieves the current figure (gcf)'s underlying Windows handle, thus enabling integration of Matlab GUI in C/C++/C# programs.
HWnd = GETHWND(hFig) retrieves a specific figure's underlying Windows handle. hFig is a Matlab handle, or a list of handles (not necessarily figure handle(s) - the handles' containing figure is used).

Limitations:
Windows-only (duh!); Java must be enabled

Warning:
This code heavily relies on undocumented and unsupported Matlab functionality. It works on Matlab 7+, but use at your own risk!

Bugs and suggestions:
Please send to Yair Altman (altmany at gmail dot com)

Cita come

Yair Altman (2026). getHWnd - retrieve the underlying Windows handle for Matlab figure(s) (https://it.mathworks.com/matlabcentral/fileexchange/16743-gethwnd-retrieve-the-underlying-windows-handle-for-matlab-figure-s), MATLAB Central File Exchange. Recuperato .

Categorie

Scopri di più su Interactive Control and Callbacks in Help Center e MATLAB Answers

Informazioni generali

Compatibilità della release di MATLAB

  • Compatibile con qualsiasi release

Compatibilità della piattaforma

  • Windows
  • macOS
  • Linux
Versione Pubblicato Note della release Action
1.2.0.0

Fix for R2014b onward (HG2)

1.1.0.0

Fix for R2011b

1.0.0.0