Teen Programmers Unite  
 

 

Return to forum top

Need help with windows

Posted by soldier [send private reply] at May 23, 2001, 07:13:42 AM

I need to create a custom looking window...(E.g. like WinAmp)
does anybody know anything on how to do it? ... If so please help...
I would really appreciate that...


P.S. a tip, a link to a FAQ, a link to an article .... anything...

Posted by taubz [send private reply] at May 23, 2001, 05:26:37 PM

Here's an idea: make a window without a titlebar (without WS_BORDER?, or WS_CHILD and not WS_POPUP), and then just paint a BMP onto the Window.

- taubz

Posted by hWnd [send private reply] at May 24, 2001, 12:34:09 PM

heres a better idea, if u know how to, then just create ownerdrawn buttons and paint the bitmaps onto them. its harder but looks cleaner. if u need an example lemme know.

Posted by hWnd [send private reply] at May 24, 2001, 12:34:37 PM

heres a better idea, if u know how to just create ownerdrawn buttons and paint the bitmaps onto them. its harder but looks cleaner. if u need an example lemme know.

Posted by Linux_Penguin [send private reply] at May 24, 2001, 04:53:40 PM

Did anybody else catch that?

Posted by taubz [send private reply] at May 24, 2001, 08:55:00 PM

Yeah....

hWnd, would you not also need to paint an image on the main window too - in which case your idea isn't any better than mine, but only equally as good?

- taubz

Posted by lordaerom [send private reply] at May 24, 2001, 09:28:36 PM

Other than that this would allow windows to trap mouse events for you, wouldn't it? With yours, you'd have to do it yourself, and figure out what they clicked. Other than that, though, I can't see much dfference.

Posted by taubz [send private reply] at May 25, 2001, 02:55:04 PM

True, but if you don't want a regular title bar and if you don't want a white/gray background, you'd have to do that also. Unless, can the window itself be owner-drawn? I don't know how that would work, though.

- taubz

Posted by nt543 [send private reply] at June 17, 2001, 10:00:36 PM

Use a utility such as Spy++ that comes with MS VC++ to view the messages that Windows sends to your program when you move resize, cover, minimize, maximize and do other things to your window. Trap these messages (especially WM_NCPAINT) and draw your own stuff instead of letting Windows draw it (be sure to call DefWindowProc before you draw, or else it will cover up what you drew)

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.