image thumbnail


version (25.9 KB) by Mihai Moldovan
The function warps the WIN32 ShowWindow API in User32.dll.


Updated 24 Jul 2002

translation missing:

When using MATLAB on windows platforms one could write MEX files to access the WIN32 API functions. However such a tutorial is difficult to find.

I decided to post an example with a commented C-MEX file that will demonstrate how to accurately find the windows handle of a MATLAB figure window and then do some API command on it.

For simplicity I selected the 'ShowWindow' API because it can be used to solve the 'common' figure maximization problem. (maximizefigure.m sample included)

Cite As

Mihai Moldovan (2022). api_showwindow (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R12.1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: maxfig, WindowAPI

Community Treasure Hunt

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

Start Hunting!