-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more unmanaged code (Added component render base structure)
Fixed #11
- Loading branch information
Anis Errais
committed
Feb 11, 2021
1 parent
9fe26ad
commit 9608c40
Showing
13 changed files
with
211 additions
and
22 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
SimpleClassicThemeTaskbar.UnmanagedCode/BaseComponentRenderer.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "BaseComponentRenderer.h" |
23 changes: 23 additions & 0 deletions
23
SimpleClassicThemeTaskbar.UnmanagedCode/BaseComponentRenderer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#pragma once | ||
|
||
#include "UIComponents.h" | ||
|
||
#include <gdiplus.h> | ||
using namespace Gdiplus; | ||
#pragma comment (lib,"Gdiplus.lib") | ||
|
||
namespace SimpleClassicThemeTaskbar | ||
{ | ||
namespace Unmanaged | ||
{ | ||
class ComponentRenderer | ||
{ | ||
virtual void Initialize() abstract; | ||
virtual void DrawStartButton(StartWindow window) abstract; | ||
virtual void DrawTaskbar(Taskbar taskbar) abstract; | ||
virtual void DrawTaskList(TaskListWindow window) abstract; | ||
virtual void Destroy() abstract; | ||
}; | ||
} | ||
} | ||
|
43 changes: 43 additions & 0 deletions
43
SimpleClassicThemeTaskbar.UnmanagedCode/ClassicComponentRenderer.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#include "ClassicComponentRenderer.h" | ||
|
||
namespace SimpleClassicThemeTaskbar | ||
{ | ||
namespace Unmanaged | ||
{ | ||
void ClassicComponentRenderer::Initialize() | ||
{ | ||
|
||
} | ||
|
||
void ClassicComponentRenderer::DrawStartButton(StartWindow window) | ||
{ | ||
|
||
} | ||
|
||
void ClassicComponentRenderer::DrawTaskbar(Taskbar taskbar) | ||
{ | ||
HDC hdc; | ||
RECT rc; | ||
|
||
hdc = GetDC(taskbar.WindowHandle); | ||
GetClientRect(taskbar.WindowHandle, &rc); | ||
// Paint line | ||
Graphics graphics(hdc); | ||
Pen pen(Color(GetSysColor(COLOR_BTNHIGHLIGHT) + 0xFF000000)); | ||
graphics.DrawLine(&pen, 0, 1, 1280, 1); | ||
|
||
SwapBuffers(hdc); | ||
ReleaseDC(taskbar.WindowHandle, hdc); | ||
} | ||
|
||
void ClassicComponentRenderer::DrawTaskList(TaskListWindow window) | ||
{ | ||
|
||
} | ||
|
||
void ClassicComponentRenderer::Destroy() | ||
{ | ||
|
||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
SimpleClassicThemeTaskbar.UnmanagedCode/ClassicComponentRenderer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
|
||
#include "BaseComponentRenderer.h" | ||
|
||
namespace SimpleClassicThemeTaskbar | ||
{ | ||
namespace Unmanaged | ||
{ | ||
class ClassicComponentRenderer : ComponentRenderer | ||
{ | ||
void Initialize(); | ||
void DrawStartButton(StartWindow window); | ||
void DrawTaskbar(Taskbar taskbar); | ||
void DrawTaskList(TaskListWindow window); | ||
void Destroy(); | ||
}; | ||
} | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
SimpleClassicThemeTaskbar.UnmanagedCode/ComponentRenderer.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
SimpleClassicThemeTaskbar.UnmanagedCode/SimpleClassicThemeTaskbar.UnmanagedCode1.rc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Microsoft Visual C++ generated resource script. | ||
// | ||
|
||
#include "resource1.h" | ||
|
||
#define APSTUDIO_READONLY_SYMBOLS | ||
///////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Generated from the TEXTINCLUDE 2 resource. | ||
// | ||
#include "winres.h" | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
#undef APSTUDIO_READONLY_SYMBOLS | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// English (United States) resources | ||
|
||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) | ||
LANGUAGE 19, 1 | ||
|
||
#ifdef APSTUDIO_INVOKED | ||
///////////////////////////////////////////////////////////////////////////// | ||
// | ||
// TEXTINCLUDE | ||
// | ||
|
||
1 TEXTINCLUDE | ||
BEGIN | ||
"resource1.h\0" | ||
END | ||
|
||
2 TEXTINCLUDE | ||
BEGIN | ||
"#include ""winres.h""\r\n" | ||
"\0" | ||
END | ||
|
||
3 TEXTINCLUDE | ||
BEGIN | ||
"\r\n" | ||
"\0" | ||
END | ||
|
||
#endif // APSTUDIO_INVOKED | ||
|
||
#endif // English (United States) resources | ||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
|
||
#ifndef APSTUDIO_INVOKED | ||
///////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Generated from the TEXTINCLUDE 3 resource. | ||
// | ||
|
||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
#endif // not APSTUDIO_INVOKED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#pragma once | ||
|
||
#include "ApplicationWindow.h" | ||
#include "BaseWindow.h" | ||
#include "ButtonWindow.h" | ||
#include "StartWindow.h" | ||
#include "TaskListWindow.h" | ||
#include "Win32Window.h" | ||
|
||
#include "Taskbar.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//{{NO_DEPENDENCIES}} | ||
// Microsoft Visual C++ generated include file. | ||
// Used by SimpleClassicThemeTaskbar.UnmanagedCode1.rc | ||
|
||
// Next default values for new objects | ||
// | ||
#ifdef APSTUDIO_INVOKED | ||
#ifndef APSTUDIO_READONLY_SYMBOLS | ||
#define _APS_NEXT_RESOURCE_VALUE 101 | ||
#define _APS_NEXT_COMMAND_VALUE 40001 | ||
#define _APS_NEXT_CONTROL_VALUE 1001 | ||
#define _APS_NEXT_SYMED_VALUE 101 | ||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters