// Charge le swf depuis le repertoire courant char currentDir[2048]; GetCurrentDirectory(2047, currentDir); CString swfPath = currentDir; swfPath = "file://" + swfPath + "/test.swf"; m_flash.put_Movie(swfPath); // Redimensionne la fenêtre et le contrôle flash aux dimensions du swf CRect clientRect, windowRect; GetClientRect(&clientRect); GetWindowRect(&windowRect); long windowW = windowRect.right - windowRect.left + 1; long windowH = windowRect.bottom - windowRect.top + 1; long clientW = clientRect.right - clientRect.left + 1; long clientH = clientRect.bottom - clientRect.top + 1; long marginW = windowW - clientW; long marginH = windowH - clientH; long flashW = atol(m_flash.GetVariable("width")); long flashH = atol(m_flash.GetVariable("height")); long newWinW = flashW + marginW; long newWinH = flashH + marginH; windowRect.right = windowRect.left + newWinW -1; windowRect.bottom = windowRect.top + newWinH -1; clientRect.right = flashW; clientRect.bottom = flashH; MoveWindow(windowRect, 1); m_flash.MoveWindow(clientRect, 1); CenterWindow();
// Minimiser & maximiser static bool init = false; if (init) { CRect clientRect; GetClientRect(&clientRect); m_flash.MoveWindow(clientRect, 0); }
// Redimensionner static bool init = false; if (init) { CRect clientRect; GetClientRect(&clientRect); m_flash.MoveWindow(clientRect, 0); } init = true;
// Traiter la requête if (strcmp(command, "send")==0) { // votre code (après analyse des paramètres args si besoin) // ... // Acquitement m_flash.SetVariable("MFCobjet.msg", "done"); } // Quitter l'application if (strcmp(command, "quit")==0) OnCancel();
fscommand("send", "mes paramètres"); fscommand("exit"); fscommand("exec", "monappli.exe -mesparam"); // à coder dans le MFC ...
// Création d'un object MFCobjet = new Object(); MFCobjet.msg = ""; // appellé par le watch quand le paramètre surveillé change MFCobjet_callback = function (prop, oldVal, newVal, userData) { // votre code (après analyse des paramètres newVal si besoin) // ... msg = newVal; return newVal; } // paramètre "msg" de l'objet "MFCobjet" surveillé MFCobjet.watch("msg", MFCobjet_callback);
Avis de décès, Carte de voeux, Bricolage, Coloriages, Cinéma, Coiffure, Cuisine, Déco, Dictionnaire, Horoscope, Jeux en ligne, Programme TV, Recettes, Restaurant, SMIC, Test débit, Voyage, Signification prénom