|
dev.gamez.lv Latvian Game Developers Community
|
View previous topic :: View next topic |
Author |
Message |
BHC
Joined: 31 Jan 2006 Posts: 81
|
Posted: Sun Mar 05, 2006 7:11 pm Post subject: Piekoriģējam loga izskatu. |
|
Izveidojam logu ar:
Code: |
HWND CreateWindow(
LPCTSTR lpClassName,
LPCTSTR lpWindowName,
DWORD dwStyle,
int x,
int y,
int nWidth,
int nHeight,
HWND hWndParent,
HMENU hMenu,
HINSTANCE hInstance,
LPVOID lpParam
);
|
vai CreateWindowEx - nav svarīgi.
Tātad jautājums: kā nomainīt dwStyle, kad logs jau izveidots.
Piemēram, pārslēdzoties no fullscreena -> loga režīmā mums ir apkārt būtu vēlams rāmis, lai izskatītos cilvēcīgi. :)
dwStyle sākotnējo vērtību
WS_POPUP vajag nomainīt uz
WS_CLIPCHILDREN | WS_POPUP | WS_BORDER | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX.
Tam nevajadzētu būt sarežģīti.
Ai, kā pierasts pie SDL. :) _________________ Screenshot coming when hell freezes over. |
|
Back to top |
|
|
BHC
Joined: 31 Jan 2006 Posts: 81
|
Posted: Sun Mar 05, 2006 7:39 pm Post subject: |
|
Ir:
Code: |
SetWindowLong( mHWND,
GWL_STYLE,
WS_CLIPCHILDREN
| WS_VISIBLE
| WS_POPUP
| WS_BORDER
| WS_CAPTION
| WS_SYSMENU
| WS_MINIMIZEBOX );
SetWindowPos( mHWND,
HWND_TOP,
0,
0,
0,
0,
SWP_FRAMECHANGED
| SWP_NOSIZE
| SWP_NOMOVE );
|
Svarīgi, ka jāizsauc setwindowpos ar flagu SWP_FRAMECHANGED, lai stila maiņa tiktu izpildīta. _________________ Screenshot coming when hell freezes over. |
|
Back to top |
|
|
bubu Indago Uzvarētājs
Joined: 23 Mar 2004 Posts: 3223 Location: Riga
|
Posted: Sun Mar 05, 2006 9:14 pm Post subject: |
|
Es pareizi tevi sapratu, ka tu pats uz savu jautājumu atbildēji? |
|
Back to top |
|
|
BHC
Joined: 31 Jan 2006 Posts: 81
|
Posted: Sun Mar 05, 2006 9:33 pm Post subject: |
|
bubu wrote: | Es pareizi tevi sapratu, ka tu pats uz savu jautājumu atbildēji? |
Jā, tā bieži sanāk. ( pārāk bieži ) :)
Un labi, ka tā. _________________ Screenshot coming when hell freezes over. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|