13. 10. 2025 15:35:29
page 1 of 1
03. 10. 2025 01:25:23
Lecture rooms for the first TIN test
29. 09. 2025 15:16:22
#include <windows.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#define not !
// Global variable
HINSTANCE hInst;
UINT MessageCount = 0;
UINT Count = 0;
int posX = 0;
int posY = 0;
/* length 3 */
COLORREF colors[] = {
RGB(255,0,0),
RGB(0, 255, 0),
RGB(255, 255, 0)
};
COLORREF color = RGB(255, 0, 0);
int color_count;
int speed = 5;
// Function prototypes.
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int);
LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM);
void paintObject(HWND hWnd, HDC hDC, PAINTSTRUCT ps, int posX, int posY, POINT cursorPosition);
void paintObject2(HWND hWnd, HDC hDC, PAINTSTRUCT ps, int posX, int posY, POINT cursorPosition);
void paintPosition(HWND hWnd, HDC hDC, PAINTSTRUCT ps);
// Application entry point. This is the same as main() in standart C.
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
MSG msg;
BOOL bRet;
WNDCLASS wcx; // register class
HWND hWnd;
hInst = hInstance; // Save the application-instance handle.
// Fill in the window class structure with parameters that describe the main window.
wcx.style = CS_HREDRAW | CS_VREDRAW; // redraw if size changes
wcx.lpfnWndProc = (WNDPROC)MainWndProc; // points to window procedure
wcx.cbClsExtra = 0; // no extra class memory
wcx.cbWndExtra = 0; // no extra window memory
wcx.hInstance = hInstance; // handle to instance
wcx.hIcon = LoadIcon(NULL, IDI_APPLICATION); // predefined app. icon
wcx.hCursor = LoadCursor(NULL, IDC_ARROW); // predefined arrow
wcx.hbrBackground = GetStockObject(WHITE_BRUSH); // white background brush
wcx.lpszMenuName = (LPCSTR)"MainMenu"; // name of menu resource
wcx.lpszClassName = (LPCSTR)"MainWClass"; // name of window class
// Register the window class.
if (!RegisterClass(&wcx)) return FALSE;
// create window of registered class
hWnd = CreateWindow(
"MainWClass"
05. 12. 2024 03:42:25
a rough overview based on my study of wikipedia
page 1 of 1
isa-notes note that CAB stands for CA/Browser forum