🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Borneq Mon, 07 Aug 2017 11:47
Okienko w WinApi bez przycisku zamykania
#309376
Author: Borneq
Date: Mon, 07 Aug 2017 11:47
45 lines
1775 bytes
#include <Windows.h>

WNDCLASSEXW cl;

int main()
{
	HINSTANCE hmod = GetModuleHandleW(NULL);
	cl.cbSize = sizeof(cl);
	cl.style = CS_HREDRAW | CS_VREDRAW;
	cl.lpfnWndProc = DefWindowProc;
	cl.cbClsExtra = 0;
	cl.cbWndExtra = 0;
	cl.hInstance = hmod;
	cl.hIcon = NULL;
	cl.hCursor = LoadCursorW(NULL, IDC_ARROW);
	cl.hbrBackground = GetSysColorBrush(COLOR_BTNFACE + 3);
	cl.lpszMenuName = NULL;
	cl.lpszClassName = L"myclass";
	cl.hIconSm = NULL;
	RegisterClassExW(&cl);
	HWND hwnd = CreateWindowExW(
		WS_EX_CLIENTEDGE,
		L"myclass",
		L"Hello",
		WS_CAPTION,
		200,
		200,
		300,
		400,
		NULL,
		NULL,
		NULL,
		NULL
		);
	ShowWindow(hwnd, SW_SHOW);
	MSG msg;
	while (GetMessageW(&msg, NULL, 0, 0) != 0) {
		TranslateMessage(&msg);
		DispatchMessageW(&msg);
	}
}

Brak przycisków na pasku tytułowym.
Zamiast WS_EX_CLIENTEDGE próbowałem 0 i WS_EX_DLGMODALFRAME - to samo.
Chyba to proste ale nie mam pomysłu.
Re: Okienko w WinApi bez przycisku zamykania
#309377
Author: Borneq
Date: Mon, 07 Aug 2017 13:02
7 lines
1155 bytes
W dniu 07.08.2017 o 13:47, Borneq pisze:
> Brak przycisków na pasku tytułowym.
> Zamiast WS_EX_CLIENTEDGE próbowałem 0 i WS_EX_DLGMODALFRAME - to samo.
> Chyba to proste ale nie mam pomysłu.

Znalazłem: 
https://github.com/RustNow/Rust-Win32-SampleApp/blob/lab1/src/main.rs
Re: Okienko w WinApi bez przycisku zamykania
#309378
Author: M.M.
Date: Mon, 07 Aug 2017 13:42
11 lines
1609 bytes
On Monday, August 7, 2017 at 3:02:16 PM UTC+2, Borneq wrote:
> W dniu 07.08.2017 o 13:47, Borneq pisze:
> > Brak przycisków na pasku tytułowym.
> > Zamiast WS_EX_CLIENTEDGE próbowałem 0 i WS_EX_DLGMODALFRAME - to samo.
> > Chyba to proste ale nie mam pomysłu.
> 
> Znalazłem: 
> https://github.com/RustNow/Rust-Win32-SampleApp/blob/lab1/src/main.rs

Trzeba było dodać WM_SYSMENU?
Pozdrawiam
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads