Author Topic: DreamMovie  (Read 52506 times)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: DreamMovie
« Reply #30 on: January 04, 2017, 12:57:24 am »
If in the end we are still not able to cope with the WM_DROPFILES issue, I think it will be reasonable to at least add a small notification for the user who might be attempting to launch it As Admin, with the help of this simple check function suggested by MSDN:

Code: [Select]
/*++
Routine Description: This routine returns TRUE if the caller's
process is a member of the Administrators local group. Caller is NOT
expected to be impersonating anyone and is expected to be able to
open its own process and process token.
Arguments: None.
Return Value:
TRUE - Caller has Administrators local group.
FALSE - Caller does not have Administrators local group. --
*/
BOOL IsUserAdmin(VOID)
{
    BOOL b;
    SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
    PSID AdministratorsGroup;
    b = AllocateAndInitializeSid(
        &NtAuthority,
        2,
        SECURITY_BUILTIN_DOMAIN_RID,
        DOMAIN_ALIAS_RID_ADMINS,
        0, 0, 0, 0, 0, 0,
        &AdministratorsGroup);
    if (b) {
        if (!CheckTokenMembership(NULL, AdministratorsGroup, &b)) {
            b = FALSE;
        }
        FreeSid(AdministratorsGroup);
    }

    return b;
}

used somewhere at the app initialization stage e.g. like this:

Code: [Select]
    if (IsUserAdmin())
        MessageBox(NULL, L"As Administrator mode disables drag-and-drop.",
        L"Functionality Reduced:", MB_ICONASTERISK);
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: DreamMovie
« Reply #31 on: January 04, 2017, 10:21:00 am »
Mike--

I do not have the same results on Windows 10  :o

Could you try to use D&D on the bottom of the window (gP.hMain), rather than in the center (gP.hGDImage), to see if it makes any difference.

Do you have the same problem when using D&D with ObjReader ?

...
« Last Edit: January 04, 2017, 10:30:00 am by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: DreamMovie
« Reply #32 on: January 04, 2017, 01:30:45 pm »
Do you have the same problem when using D&D with ObjReader ?

Absolutely, Patrice. And not only with ObjReader64, but also with ObjReader PB, and with Objector, and with Eclecta, and with everything else including Notepad. And not only under Windows 7 but also under Windows 10. I just never cared to run them As Administrator until you asked me to extensively test the ZMF64 thingy.


Quote
Could you try to use D&D on the bottom of the window (gP.hMain), rather than in the center (gP.hGDImage), to see if it makes any difference

I am aware of the difference between gP.hMain and gP.hGDImage, Patrice. And all your sources you're sending me also get immediately recompiled in my VS Ultimate 2013 so that I'm testing two executables where you're testing only one. And my own personal home-based NASA Mission Control Center comprises three distinctly different ASUS MB + GenuineIntel CPU desktop computers plus two minor laptops to develop and test my applications on. Otherwise how would I dare claim FBSL's compatibility with everything from Windows 95 to Windows 10, Ubuntu Wine, Mac OS X Wine, and ReactOS?

No, it doesn't make any difference whether the files to be played back are dragged-and-dropped on either the header or the footer part of gP.hMain, nor, as it happens, whether gP.hGDImage is also made aware of D&D and equipped to handle the WM_DROPFILES message all on its own.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: DreamMovie
« Reply #33 on: January 04, 2017, 01:49:08 pm »
Thus, as you suggested, i will just display a popup to inform the user that they can't use D&D while in admin mode.  >:(

...
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: DreamMovie
« Reply #34 on: January 04, 2017, 02:18:44 pm »


If your UAC settings are similar to mine and you actually can D&D the files onto ZMF64 when As Admin while I can't, my only suggestion would be to change the notification to something like:

Code: [Select]
    if (IsUserAdmin())
        MessageBox(NULL, L"\"As Administrator\" mode may compromise drag-and-drop.",
        L"Reduced Functionality Alert", MB_ICONASTERISK);

Don't be angry with me, Patrice. The fault is neither yours nor mine. It's an MS Windows glitch conventionally called a "feature". :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: DreamMovie
« Reply #35 on: January 05, 2017, 08:13:37 pm »
I am almost done converting the Windows controls into GDImage widgets, to have all the GUI working in HUD mode with everything.  8)

...
« Last Edit: January 05, 2017, 08:34:46 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: DreamMovie
« Reply #36 on: January 05, 2017, 09:33:54 pm »
Are you planning to publish a sample HUD demo with all the widgets in one place?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: DreamMovie
« Reply #37 on: January 05, 2017, 10:04:54 pm »
Yes, i hope to be able to post something tomorrow.

The HUD mode is a mandatory when playing HD movie in full screen, it allows to show/hide the widget controls just like in Oblivion or Avatar. ;)

On the attached screen shot the GDImage widgets are floating directly above the movie itself, while the standard controls are still shown on the bottom.
« Last Edit: January 05, 2017, 10:16:54 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: DreamMovie
« Reply #38 on: January 06, 2017, 02:41:04 am »
Aha! So, the widgets aren't really parts, or children, of the movie rendering surface? Each of them is just an own transparent overlay window floating above, and within the clipping region of, the DirectShow/MF/whatever 2D render target the movie is streamed on?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: DreamMovie
« Reply #39 on: January 06, 2017, 09:42:36 am »
This is the same concept that i have used in other demos, however this time everything is inside of the same container (no external popup dependencies).
And the controls, rather than skinned CreateWindowEx, are all GDImage widgets, this gives me full control on their behavior, including the hability to create new specifics like these:



You will understand more once you see the source code being used to create a slider or a gauge.
Using a GDImage callback you can monitor mouse events, and all user interactions (indeed that works just the same that for all the windows that are child of the OS Desktop, or in a MDI form).
« Last Edit: January 06, 2017, 09:58:59 am by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: DreamMovie
« Reply #40 on: January 06, 2017, 11:44:10 am »
OK,

So, there's a "SideBar_AppBarWindow"-like transparent container window covering the app main window's visible areas, and a number of "BasicWindow"-like transparent widget windows (or regions) that it hosts similar to Vista Sidebar?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: DreamMovie
« Reply #41 on: January 06, 2017, 02:08:43 pm »
Yes, except that the widgets sprites are all anchored inside of the same GDImage container, making thing easy to create smooth effect to hide them when looking a video full screen, they will be shown back as soon as there is a mouse activity.

...
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: DreamMovie
« Reply #42 on: January 08, 2017, 10:35:56 pm »
Am I supposed to still see the gray "metal" plate under the video render when in full screen?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1983
    • zapsolution
Re: DreamMovie
« Reply #43 on: January 08, 2017, 11:30:07 pm »
Currently, yes, but that would be done in the next round...

As i said, this build introduces much changes, and my first goal was to ensure that everything is working the same than with Windows controls. By the way, the widgets should work smoother, especially when moving sliders, and updating the status texts.
There is only one single paint, instead of individuals, when using standard controls.

...

Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: DreamMovie
« Reply #44 on: January 08, 2017, 11:33:44 pm »
How would you comment on the application's memory footprint, Patrice?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)