A: O fereastra owned este o fereastra top-level care depinde de o alta fereastra numita owner.
Ea are urmatoarele proprietati:
- fiind o fereastra top-level, poate fi afisata oriunde in ecran, indiferent de fereastra owner;
- sta tot timpul in fata owner-ului.
- este ascunsa atunci cand owner-ul este ascuns sau minimizat.
- este distrusa atunci cand owner-ul este distrus;
- O fereastra owned este creata pasand un handle la owner ca parametru hWndParent in functia CreateWindow(Ex);
- stilul WS_CHILD nu trebuie setat, altfel rezulta o fereastra child (copil) si nu o fereastra top-level.
Code: Select all
// create an owned top-level window
HWND hWnd = CreateWindow(szWindowClass, szTitle,
WS_OVERLAPPED, // WS_CHILD style is not set
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
hWndParent, // handle to the OWNER window
NULL, hInstance, NULL);
<< Back to Windows API Index