dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

Piekoriģējam loga izskatu.

 
dev.gamez.lv Forum Index -> Programmēšana
View previous topic :: View next topic  
Author Message
BHC



Joined: 31 Jan 2006
Posts: 81

PostPosted: 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
View user's profile
BHC



Joined: 31 Jan 2006
Posts: 81

PostPosted: 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
View user's profile
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: 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
View user's profile Send e-mail
BHC



Joined: 31 Jan 2006
Posts: 81

PostPosted: 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
View user's profile
Display posts from previous:   
dev.gamez.lv Forum Index -> Programmēšana All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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