question

MichaelSabo avatar image
0 Votes"
MichaelSabo asked RLWA32-6355 answered

Tablet mode and window maximation in MFC-Apps

If I switch into tablet mode (manually) and goto into the task switch view, all applications already maximized, but not the sample application (see red rectangle).
122329-task-switch-screen.jpg

The question is, is this done by programmer or does this do windows automatically?
I can't believe that every "old" application was modified and optimized for tablet mode. But you can see notepad is also maximed. It looks, that Windows just automatically maximize every application, except mine. ;)

Of course, I can do a maximation self in code after event WM_SETTINGSCHANGED. Then the application is also shown maximized in the preview. But then I have other small issues.
Most importantly, there are several ways to maximize a window. The question is which one to prefer.


You can use this sample.


c++
· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I just tested wih simple C++/Win32 or C# apps and they are automatically maximized...

0 Votes 0 ·

Yes, they also automatically maximize on my computer. It's just wrong in the task view before choosing once.
It seems that my default MFC application (automatically created from the wizard. You can download above) will only maximize AFTER selecting it. But the notepad seems to be maximized BEFORE the selection.

0 Votes 0 ·

How did you determine that both the explorer and notepad windows were maximized in the task view?

0 Votes 0 ·
Show more comments

Perhabs this is only a problem on big resolutions (4k) and less running application, because else the preview windows a much smaller.

0 Votes 0 ·

Is it because the app you show in your image is a dialog-based app ? Try if you see the same with a regular MFC MDI/SDI app.

-SM

0 Votes 0 ·

Yes. It's a dialog based sample app.
Created from wizard. You can download above.

0 Votes 0 ·

@MichaelSabo

My notepad window is not maximized in task view.

122548-image.png

After manually maximize the notepad window, and then switch into tablet mode (manually), goto into the task switch view:

122520-image.png

My system: Windows 10 20H2


0 Votes 0 ·
image.png (276.4 KiB)
image.png (271.5 KiB)

1 Answer

RLWA32-6355 avatar image
0 Votes"
RLWA32-6355 answered

I think you are misinterpreting the image in Task View. For example, in the following Before/After screen shots you can easily see that Notepad was not maximized in Task View. Had it been maximized all of the lines would have been displayed with a ton of empty space below them. So it seems that Win32 Desktop application windows are not automatically maximized when entering the task view in Tablet mode.

Before
122656-before-tablet.png

After
122628-after-tablet.png



before-tablet.png (266.5 KiB)
after-tablet.png (168.9 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I'm ashamed, but you are absolutely right!

Since in the first screenshot all thumbnails had the same height, i assumed that windows scales all preview images to a fixed row height.
However, after doing more experiments over the weekend, it turns out that is only half the story. If the windows are too small, they will not be enlarged. Only reduced in size. If you drag the editor to the same size as the sample program, you can see that the preview looks identical.
It is not even necessary to switch to tablet mode for this!

123702-task-view.jpg

Sorry for your time!


(sorry for my late response)


0 Votes 0 ·
task-view.jpg (204.1 KiB)