oui mais mais "parcours" ne viens pas de rien j'ai crée une fenetre opencv avant :
cvNamedWindow( "parcours",1);
.Tu ferais comment ?
parceque la fonction cvGetWindowHandle marche bien quand je l'utilise en api win32 . (dans la doc il mettait qu'elle retournait : HWND in case of Win32 and GtkWidget in case of GTK+)
J'ai donc utilisé les fonctions de l'api window :
1 2 3 4 5
| SetWindowPos((HWND)cvGetWindowHandle("CamShiftDemo"),(HWND)-1,0,0,480,640,SWP_NOMOVE);
SetForegroundWindow((HWND)cvGetWindowHandle("CamShiftDemo"));
BringWindowToTop((HWND)cvGetWindowHandle("CamShiftDemo"));
SwitchToThisWindow( (HWND)cvGetWindowHandle("CamShiftDemo"),FALSE); |
Aucune ne m'a fais ce que je voulais : à savoir : mon executable ouvre plusieurs fenetre et je ve mettre l'une d'elles (CamShiftDemo) au premier plan...J'ai juste réussi à la mettre prioritaire avec SetForegroundWindow du coup maintenant elle clignote en orange mais je dois toujours cliqué dessus pour l'afficher au premier plan...

C'est pour ça si je pouvais me servir de GTK ça serait génial
Partager