Posted By: Maurits | Mar 19th, 2005 @ 8:26 PM
page 1 of 1
Comments: 18 | Views: 12470 | Downloads: 425
Maurits
Maurits
AKA Matthew van Eerde
Download:Link for Clock app for Title bar(0 Bytes)
This is a clock that auto-fits into the title bar - saves space in the system tray
Requirements:
Windows 2000 or later (for transparency)

EDIT:
v2 - allows a registry setting TimeFormat (string) which overrides the settings pulled from the Regional control panel.  Uses wildcards like these
For example, %#c shows the date (in long format) as well as the time.  AM/PM can be added via %#c %p which yields -- to use the date in the documentation --
Tuesday, March 14, 1995, 12:41:29 PM

v2.1 - fixed bug where if you dragged it close to the left edge of the screen, the next launch would force it to be at least a few hundred pixels away from the left edge
This application failed to start because MFC70.DLL was not found.

I run on Windows 2003, with tons of programs installed like Office 2003, Visual Studio.NET 2003, etc...

Seems like MFC70.DLL is a rare component.

You see, this should be re-written in .NET Wink
Travis H
Travis H
Travis Howle - Elwoh Software, Inc.

Is this supposed to actually hook into the application so that it displays to the left of the control-buttons or is it just to overlay on the screen at the position of the control buttons when it's maximized?

darklotus
darklotus
Carpe Noctum
Is there some way to add the date into this as well? I dont know enough C++ to add it. Just a thought.
darklotus
darklotus
Carpe Noctum
I dont know c++ well enough to write this nice application, i was able to get the date to display though. Most of my programming knowledge is vb6 and c# so the sytax may not look right , but it worked!

darklotus
darklotus
Carpe Noctum

File:Settings.h  Line(s):16

<BR>#define BARCLOCK_CX 128<BR><BR>to<BR><BR>#define BARCLOCK_CX 256<BR>


File:BarClockWnd.h  Line(s):12

<BR>CString m_time;<BR><BR>to<BR><BR>CString m_time;<BR>CString m_date;<BR>


File:BarClockWnd.cpp  Line(s):165

<BR>m_time = COleDateTime::GetCurrentTime().Format(VAR_TIMEVALUEONLY);<BR><BR>to<BR><BR>m_time = COleDateTime::GetCurrentTime().Format(VAR_TIMEVALUEONLY);<BR>m_date = COleDateTime::GetCurrentTime().Format(VAR_DATEVALUEONLY);<BR>

File:BarClockWnd.cpp  Line(s):176

<BR>m_time,<BR><BR>to<BR><BR>m_time + "  " + m_date,<BR>


Its nothing major, just simple addition of some code thats already there, not too bad for someone who doesnt know c++.

I tested it and it work fine.. the catch is that it doesn't work with all software, namely WMP 10. WMP 10 has the fourth button in addition to the 3 usual buttons (min, max/restore, close) it will be overlapped.
Matthew van Eerde
Matthew van Eerde
AKA Maurits
Now that I have two monitors I have to revisit this.  It's not remembering its position (I have it on the non-primary monitor.)

It's probably some sanity-checking code that didn't correctly consider the rights of the purportedly insane.

EDIT: Yup, disabling the sanity checks in the code makes it work with multiple monitors.
poo
poo
Maurits wrote:
This is a clock that auto-fits into the title bar - saves space in the system tray<br>Requirements:<br>
Windows 2000 or later (for transparency)<br>
<br>EDIT:<br>v2 - allows a registry setting TimeFormat (string) which
overrides the settings pulled from the Regional control panel. 
Uses wildcards like <a>these</A><BR>For example, %#c shows the date (in long format) as well as the time.  AM/PM can be added via %#c %p which yields -- to use the date in the documentation --<BR>Tuesday, March 14, 1995, 12:41:29 PM<BR><BR>v2.1 - fixed bug where if you dragged it close to the left edge of the screen, the next launch would force it to be at least a few hundred pixels away from the left edge<BR>


i'm new here. how do you DL the darn clock?!Expressionless
CannotResolveSymbol
CannotResolveSymbol
{insert caption here}
poo wrote:

Maurits wrote: This is a clock that auto-fits into the title bar - saves space in the system tray<br>Requirements:<br>
Windows 2000 or later (for transparency)<br>
<br>EDIT:<br>v2 - allows a registry setting TimeFormat (string) which
overrides the settings pulled from the Regional control panel. 
Uses wildcards like <a>these</A><BR>For example, %#c shows the date (in long format) as well as the time.  AM/PM can be added via %#c %p which yields -- to use the date in the documentation --<BR>Tuesday, March 14, 1995, 12:41:29 PM<BR><BR>v2.1 - fixed bug where if you dragged it close to the left edge of the screen, the next launch would force it to be at least a few hundred pixels away from the left edge<BR>


i'm new here. how do you DL the darn clock?!


Click the Save link at the bottom of the first post.
Hi, I'm even newer here.  I don't have a compiler for Windows.  I can give the app focus and get the colour dialog, but haven't been able to add the date to the display or get a help screen.  Is there a way I can do that, or are there detailed instructions somewhere for how to use regedit or something to display the date?  (The computer I'm running the clock on is my employer's computer, so I really don't want to screw it up.)

Thanks.
There is no documentation for this. No help screen. Not in the actual version.

For the TimeFormat you have to create a REG_SZ under

HKCU\Software\BarClock

called TimeFormat with e.g. the value '%d. %m. %y   %H:%M' (without the quotation marks) and you get the dateformat like "26.07.08 18:05".
You can get the strftime-parameters e.g. from

http://de2.php.net/manual/en/function.strftime.php

There are as well 'Color' (REG_DWORD) e.g. 'ffffff' for white, Left (REG_DWORD) and Top ( REG_DWORD).

If you cannot compile the BarClock, its a pity. Its more useful if you CAN compile it.
You need Visual Studio 2003 or similar.

If you add in BarClockWnd.cpp somewhere after  after:

 int color = a->GetProfileInt(
  "",
  "Color",
  BARCLOCK_COLOR_DEFAULT
 );

 // REG_SZ FontSize (default = 15)
 int fontsize = a->GetProfileInt(
  "",
  "FontSize",
  15 // default is 15
 );

and after

lfCaptionFont = ncmNonClientMetrics.lfCaptionFont;


lfCaptionFont.lfHeight = fontsize;

then you can use a REG_DWORD called FontSize, where you can determine the fontsize.

And i changed the "EasterEgg" :

 if (nChar == VK_ESCAPE) // Easter egg
// this serves as copyright - preserve this feature
{ AfxMessageBox(BARCLOCK_EASTEREGGTEXT);
}


with:


  if (nChar == VK_ESCAPE) // Exit
 {
  AfxGetMainWnd()->DestroyWindow();
 }


to get an exit possibility. Without this, no saving of color and so on in registry

Regards, franc

 
page 1 of 1
Comments: 18 | Views: 12470 | Downloads: 425
Microsoft Communities