diff --git a/Easy Audio Player.vcxproj b/Easy Audio Player.vcxproj index 594ce67..4fd1959 100644 --- a/Easy Audio Player.vcxproj +++ b/Easy Audio Player.vcxproj @@ -139,7 +139,6 @@ - diff --git a/Easy Audio Player.vcxproj.filters b/Easy Audio Player.vcxproj.filters index 6b10e8e..52eca88 100644 --- a/Easy Audio Player.vcxproj.filters +++ b/Easy Audio Player.vcxproj.filters @@ -24,9 +24,6 @@ Pliki nagłówkowe - - Pliki nagłówkowe - Pliki nagłówkowe diff --git a/EzWinAPIBuilders.cpp b/EzWinAPIBuilders.cpp index f79869b..5a9ccab 100644 --- a/EzWinAPIBuilders.cpp +++ b/EzWinAPIBuilders.cpp @@ -19,4 +19,10 @@ WNDCLASSEX EzCreateClass(LPCWSTR name, WNDPROC messageLoop, HINSTANCE instance, } HWND EzCreateWindow(WNDCLASSEX windowClass, HINSTANCE instance, LPCWSTR windowTitle, DWORD windowStyles, int windowWidth, int windowHeight, HWND parent) { return CreateWindowEx(WS_EX_CLIENTEDGE, windowClass.lpszClassName, windowTitle, windowStyles, CW_USEDEFAULT, CW_USEDEFAULT, windowWidth, windowHeight, parent, NULL, instance, NULL); +} +HWND EzCreateButton(LPCWSTR label, int posX, int posY, int sizeW, int sizeH, HWND mainWindow) { + return CreateWindowEx(0, L"BUTTON", label, WS_CHILD | WS_VISIBLE, posX, posY, sizeW, sizeH, mainWindow, NULL, NULL, NULL); +} +HWND EzCreateLabel(LPCWSTR startingContent, int posX, int posY, int sizeW, int sizeH, HWND mainWindow) { + return CreateWindowEx(0, L"STATIC", startingContent, WS_CHILD | WS_VISIBLE, posX, posY, sizeW, sizeH, mainWindow, NULL, NULL, NULL); } \ No newline at end of file diff --git a/EzWinAPIBuilders.h b/EzWinAPIBuilders.h index 41fa88e..2a6fc76 100644 --- a/EzWinAPIBuilders.h +++ b/EzWinAPIBuilders.h @@ -2,8 +2,8 @@ #include #ifndef FUNCTIONS_H_INCLUDED #define FUNCTIONS_H_INCLUDED - WNDCLASSEX EzCreateClass(LPCWSTR name, WNDPROC messageLoop, HINSTANCE instance, LPCWSTR classIcon, LPCWSTR cursor, HBRUSH backgroundBrush); HWND EzCreateWindow(WNDCLASSEX windowClass, HINSTANCE instance, LPCWSTR windowTitle, DWORD windowStyles, int windowWidth, int windowHeight, HWND parent); - +HWND EzCreateButton(LPCWSTR label, int posX, int posY, int sizeW, int sizeH, HWND mainWindow); +HWND EzCreateLabel(LPCWSTR startingContent, int posX, int posY, int sizeW, int sizeH, HWND mainWindow); #endif \ No newline at end of file diff --git a/main.cpp b/main.cpp index e66493c..d6bb4c8 100644 --- a/main.cpp +++ b/main.cpp @@ -2,9 +2,7 @@ MSG msg; -WNDCLASSEX EzCreateClass(LPCWSTR name, WNDPROC messageLoop, HINSTANCE instance, LPCWSTR classIcon, LPCWSTR cursor, HBRUSH backgroundBrush); LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -HWND EzCreateWindow(WNDCLASSEX windowClass, HINSTANCE instance, LPCWSTR windowTitle, DWORD windowStyles, int windowWidth, int windowHeight, HWND parent); int WINAPI WinMain(HINSTANCE currentInst, HINSTANCE previousInst, LPSTR lpCmdLine, int nCmdShow) { WNDCLASSEX windowClass = EzCreateClass(L"Easy Audio Player", WndProc, currentInst, IDI_ERROR, IDC_ARROW, NULL);