mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 08:25:48 +00:00
dynamically calculating the required size for the clock bar window based on the font size [patch of Ge van Geldorp <ge@gse.nl>]
svn path=/trunk/; revision=7266
This commit is contained in:
parent
2ff0dc4d33
commit
957a258b42
4 changed files with 13 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
|||
<tr>
|
||||
<td><address style="align: right;"><small>
|
||||
ROS Explorer Source Code Documentation
|
||||
<br>generated on 23.12.2003 by <a href="http://www.doxygen.org/index.html">
|
||||
<br>generated on 27.12.2003 by <a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border=0>
|
||||
</small></address>
|
||||
</td>
|
||||
|
|
|
@ -191,6 +191,10 @@ SOURCE=.\Jamfile
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Makefile
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Makefile.MinGW
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|
|
@ -307,9 +307,16 @@ HWND ClockWindow::Create(HWND hwndParent)
|
|||
{
|
||||
ClientRect clnt(hwndParent);
|
||||
|
||||
WindowCanvas canvas(hwndParent);
|
||||
FontSelection font(canvas, GetStockFont(DEFAULT_GUI_FONT));
|
||||
|
||||
RECT rect = {0, 0, 0, 0};
|
||||
DrawText(canvas, TEXT("00:00"), -1, &rect, DT_SINGLELINE|DT_NOPREFIX|DT_CALCRECT);
|
||||
int clockwindowWidth = rect.right-rect.left + 4;
|
||||
|
||||
return Window::Create(WINDOW_CREATOR(ClockWindow), 0,
|
||||
BtnWindowClass(CLASSNAME_CLOCKWINDOW,CS_DBLCLKS), NULL, WS_CHILD|WS_VISIBLE,
|
||||
clnt.right-(CLOCKWINDOW_WIDTH+1), 1, CLOCKWINDOW_WIDTH, clnt.bottom-2, hwndParent);
|
||||
clnt.right-(clockwindowWidth+1), 1, clockwindowWidth, clnt.bottom-2, hwndParent);
|
||||
}
|
||||
|
||||
LRESULT ClockWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#define CLASSNAME_CLOCKWINDOW TEXT("TrayClockWClass")
|
||||
|
||||
#define NOTIFYAREA_WIDTH 244
|
||||
#define CLOCKWINDOW_WIDTH 32
|
||||
|
||||
|
||||
/// NotifyIconIndex is used for maintaining the order of notification icons.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue