Wince workspace and taskbar

Source: Internet
Author: User
// ================================================ ========================================
// Title:
// Wince workspace and taskbar
// Author:
// Norains
// Date:
// Saturday 5-may-2007
// Environment:
// Wince 5.0
// ================================================ ========================================

Simply put, the so-called workarea of Wince is to remove the remaining space in the taskbar. of course, this statement is not always accurate. if you remove the "always at the beginning" check in the taskbar settings, the workspace is the entire screen.

So what is the role of the workspace? What is the specific performance? We use the IE provided by wince as an example.

1. select "always at the beginning" of the task, remove the "Auto Hide" check box, open IE, we will find that the size of the IE window is at the lowest end (bottom) A pixel higher than the top of the taskbar.

2. check "always at the beginning" and "Auto Hide" and re-open ie. In this case, the IE window is higher than that of "1", but the bottom of the window (bottom) A pixel higher than the top of the taskbar. after "Auto Hide" is selected, the height of the taskbar is reduced, so the height of IE is large.

3. remove the check box before "always at the beginning", select "Hide automatically", and re-open IE. at this time, we can find that IE has ignored the height of the taskbar, and its bottommost and bottommost overlap with the screen's bottommost. in short, ie is full screen.

4. Remove the hooks before "always at the beginning" and "automatically hide", and re-open ie. ie, which is the same as "3.

For other Microsoft applications, the representation is basically the same as that of IE.

From this we can see the size relationship of the Workspace:
Not at the beginning> Auto Hide (always at the beginning)> normal (always at the beginning, not automatically hide)

Why is this happening? In explorer, setting the taskbar is actually a change to the workspace scope to a large extent.

From a code snippet in Microsoft's taskbar, we can better understand: // The height of the taskbar. Its value is taken from the original definition of Microsoft.
# Define taskbar_height_autohide 5
# Define taskbar_height 26

Void ctaskbar: setworkarea (void)
...{
Rect rcworkarea =... {0}, rcworkareanew =... {0 };

// Obtain the current work area
Systemparametersinfo (spi_getworkarea, 0, (void *) & rcworkarea, 0 );

// If the taskbar is not "always at the top", set the workspace to the entire screen.
Setrect (& rcworkareanew, 0, 0, getsystemmetrics (sm_cxscreen ),
Getsystemmetrics (sm_cyscreen ));

// When m_btaskbarontop = true, it indicates "always at the beginning"
If (m_btaskbarontop)
...{
// M_btaskbarautohide = true indicates automatic hiding.
If (m_btaskbarautohide)
...{
Rcworkareanew. Bottom-= taskbar_height_autohide;
}
Else
...{
Rcworkareanew. Bottom-= taskbar_height;
}
}

// Only change the bottom (bottom)
If (rcworkarea. Bottom! = Rcworkareanew. Bottom)
...{
Systemparametersinfo (spi_setworkarea, 0, (void *) & rcworkareanew, spif_sendchange );
}

Sip_initializesiprect ();
}

In other words, one of the functions of the workspace is to let our program determine the size of the custom full screen window. of course, if the program does not adapt to the work zone, but has its own fixed orientation, the size of the work zone is not that meaningful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.