Page 1 of 1

Out-of-focus window render

Posted: 07 Jun 2021, 11:12
by DiNWw
Hello

I am developing a Windows program to display various data coming from other programs. I am using Application Framework with C++. I have faced with the fact that most of the time the program window may not be active (the focus is on another application), but I need to see all the changes that occur in real time, not when I return the focus. How can I solve this issue?

Re: Out-of-focus window render

Posted: 07 Jun 2021, 12:06
by jsantos
DisplayLauncher exposes a virtual function for that purpose:
virtual bool GetRunInBackgroundOverride() const;
It is implemented by default to read from the command line but you can reimplement it on you AppLauncher.
bool DisplayLauncher::GetRunInBackgroundOverride() const
{
    return GetArguments().HasOption("runInBackground");
}

Re: Out-of-focus window render

Posted: 07 Jun 2021, 13:57
by DiNWw
Thank you for such a quick response, now everything is working as it should :)