bonjour
j'ai essayé le fichier du FEX propos par Duf42 car cette fonction peut aussi m'intéresser.
il me renvoie l'erreur concernée par le code suivant.
1 2 3 4 5 6
| figureHandle = (short int)mxGetScalar(prhs[0]);
/* check that first input argument is a valid figure handle */
if( mexGet(figureHandle,"Visible") == NULL )
mexErrMsgIdAndTxt("MATLAB:winontop",
"First input argument must be a figure handle"); |
Pourtant si je debug mon code juste avent la fonction avec hWindow le handle de ma figure:
1 2 3 4 5 6 7 8 9 10 11
| get(hWindow, 'Visible')
ans =
on
K>> hLogWindow
hWindow =
1.4200e+003 |
j'ai aussi essayé de recompiler le fichier. La première fois j'ai eu leWarning suivant
1 2 3 4 5 6 7 8
| **************************************************************************
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the new
API. You can find more information about this at:
http://www.mathworks.com/support/solutions/data/1-5C27B9.html?solution=1-5C27B9
Building with the -largeArrayDims option enables the new API.
************************************************************************** |
J'ai aussi essayé de recompiler avec des int à la place de short int.
Je suis sous Windows XP SP2 avec Matlab R2008A.
edit:
en ajoutant
mexPrintf("%u\n", figureHandle);
j'obtiens
1 2 3 4 5 6 7
| hWindow =
1.4200e+003 % provient de Matlab argument d'entrée que j'envoie
1420 % provient du code précédent du fichier c
??? Error using ==> winontop
First input argument must be a figure handle |
Partager