Skip to content

Commit

Permalink
* updated README.md
Browse files Browse the repository at this point in the history
* removed ".dll" suffix from GetModuleHandle() as it's redundant and just wastes space (main.c)
! fixed not big enough static control for "PM symbol:" text on format page (tClock.rc)
  • Loading branch information
White-Tiger committed Nov 5, 2014
1 parent b0f035e commit 483b3f8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
T-Clock Redux
T-Clock Redux <sub><sub><sub><sub>(click picture for full size)</sub></sub></sub></sub>
==============
![clockshowcase](https://cloud.githubusercontent.com/assets/1467733/4608572/71b48156-5283-11e4-960f-b0415b5b7cec.png)
**T-Clock Redux** in an enhanced fork of [Stoic Joker's T-Clock 2010](http://www.stoicjoker.com/TClock/) <br>
Expand Down Expand Up @@ -31,6 +31,7 @@ If you don't mind to read lots of text, and want to know more about T-Clock and
- [x] + simplified mouse click preferences page
- [x] + default configuration with Windows like behavior and clock with line-break on Vista+ *(easier for first-time users)*
- [x] + more mouse commands / customization
- [x] + overall improved settings dialog *(so many changes.. can't name them all)*
- [x] * improved Stopwatch *(hotkeys, export, stats)*
- [x] * improved drag&drop support
- [x] ! some bugfixes
Expand All @@ -49,12 +50,13 @@ If you don't mind to read lots of text, and want to know more about T-Clock and
- [ ] + switching clock text, eg. every 2 seconds another one *tbd*
- [ ] + multiple clock text presets? eg. switch between them on mouse click *tbd*
- [ ] + maybe current sun state picture as clock background (plugin) *tbd*
- [ ] + improved hotkey support *tbd*

### Requirements
* Windows 2000+ (up to Windows 10 as of 2014)
* Microsoft Visual C++ 2010 Redistributables
* Microsoft Visual C++ 2010 Redistributable
([32bit](http://microsoft.com/en-us/download/details.aspx?id=8328) |
[64bit](http://microsoft.com/en-us/download/details.aspx?id=13523)) *(might add static builds on request)*
[64bit](http://microsoft.com/en-us/download/details.aspx?id=13523)) *(or use static builds)*

### Support
* [Forum Topic](http://donationcoder.com/forum/index.php?topic=21944.0)
Expand Down
4 changes: 2 additions & 2 deletions Source/Clock/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void ToggleCalendar(int type) //---------------------------+++-->
//------------------------------+++--> UnRegister the Clock For Login Session Change Notifications:
void UnregisterSession(HWND hwnd) //--------{ Explicitly Linked for Windows 2000 }--------+++-->
{
HINSTANCE handle = LoadLibrary("Wtsapi32.dll"); // Windows 2000 Does Not Have This .dll
HINSTANCE handle = LoadLibrary("wtsapi32"); // Windows 2000 Does Not Have This .dll
// ...Or Support This Feature.
if(handle){
typedef BOOL (WINAPI *WTSUnRegisterSessionNotification_t)(HWND);
Expand All @@ -100,7 +100,7 @@ void UnregisterSession(HWND hwnd) //--------{ Explicitly Linked for Windows 20
//--------------------------------+++--> Register the Clock For Login Session Change Notifications:
void RegisterSession(HWND hwnd) //---------{ Explicitly Linked for Windows 2000 }---------+++-->
{
HINSTANCE handle = LoadLibrary("Wtsapi32.dll"); // Windows 2000 Does Not Have This .dll
HINSTANCE handle = LoadLibrary("wtsapi32"); // Windows 2000 Does Not Have This .dll
// ...Or Support This Feature.
if(handle){
typedef BOOL (WINAPI *WTSRegisterSessionNotification_t)(HWND,DWORD);
Expand Down
4 changes: 2 additions & 2 deletions Source/Clock/tClock.rc
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ BEGIN
CONTROL "Second",IDC_SECOND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,106,109,38,11
CONTROL "Show Internet Time (.beats)",IDC_INTERNETTIME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,164,109,105,11
CONTROL "12H",IDC_12HOUR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,128,48,11
RTEXT "AM Symbol:",IDC_LABAMSYMBOL,83,130,40,12
RTEXT "AM Symbol:",IDC_LABAMSYMBOL,81,130,44,12
COMBOBOX IDC_AMSYMBOL,128,128,35,50,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
RTEXT "PM Symbol:",IDC_LABPMSYMBOL,182,130,38,12
RTEXT "PM Symbol:",IDC_LABPMSYMBOL,179,130,44,12
COMBOBOX IDC_PMSYMBOL,226,128,35,50,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Advanced Clock Configuration Options",IDC_STATIC,7,159,295,33
CONTROL "Custom Format",IDC_CUSTOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,172,62,11
Expand Down
15 changes: 8 additions & 7 deletions Source/common/newapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void InitLayeredWindow(void)
{
if(bInitLayeredWindow) return;

hmodUSER32 = LoadLibrary("user32.dll");
hmodUSER32 = LoadLibrary("user32");
if(hmodUSER32) {
pSetLayeredWindowAttributes = (pSetLayeredWindowAttributes_t)GetProcAddress(hmodUSER32, "SetLayeredWindowAttributes");
if(!pSetLayeredWindowAttributes) {
Expand Down Expand Up @@ -98,7 +98,7 @@ void EndNewAPI(HWND hwndClock)
if(hmodUSER32) FreeLibrary(hmodUSER32);
hmodUSER32 = NULL;
pSetLayeredWindowAttributes = NULL;

/// DrawTheme
THEME_FUNC_RELEASE(DrawThemeParentBackground);
THEME_FUNC_RELEASE(DrawThemeBackground);
THEME_FUNC_RELEASE(GetThemeColor);
Expand Down Expand Up @@ -196,13 +196,14 @@ void TC2DrawBlt(HDC dhdc, int dx, int dy, int dw, int dh, HDC shdc, int sx, int
else StretchBlt(dhdc, dx, dy, dw, dh, shdc, sx, sy, sw, sh, SRCCOPY);
}

void InitDrawTheme(void)
/// DrawTheme

void InitDrawTheme()
{
if(bInitDrawTheme) return;
bInitDrawTheme = TRUE;

hmodUxTheme = LoadLibrary("UxTheme.dll");
if(hmodUxTheme) {
bInitDrawTheme=1;
hmodUxTheme=LoadLibrary("uxtheme");
if(hmodUxTheme){
THEME_FUNC_RETRIEVE(CloseThemeData);
THEME_FUNC_RETRIEVE(OpenThemeData);
THEME_FUNC_RETRIEVE(IsThemeActive);
Expand Down
2 changes: 2 additions & 0 deletions Source/common/newapi.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
#ifndef TCLOCK_NEWAPI_H
#define TCLOCK_NEWAPI_H

Expand All @@ -8,6 +9,7 @@ int IsWow64();
void SetLayeredTaskbar(HWND hwndClock,BOOL refresh);
void TC2DrawBlt(HDC dhdc, int dx, int dy, int dw, int dh, HDC shdc, int sx, int sy, int sw, int sh, BOOL useTrans);

/// DrawTheme
COLORREF GetXPClockColor();
COLORREF GetXPClockColorBG();

Expand Down

0 comments on commit 483b3f8

Please sign in to comment.