CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    May 1999
    Posts
    5

    Non rectangular application windows.

    I have seen a bunch of new apps with highly customized interfaces. Completely customized app windows, etc. How do they do that? @home has a utility that looks like that and I saw Media player that was outstanding looking. Where do I start?


    Stupendous!

  2. #2
    Guest

    Re: Non rectangular application windows.

    see setwindowrgn.

    regards,
    M


  3. #3
    Join Date
    May 1999
    Location
    Latvia
    Posts
    30

    Re: Non rectangular application windows.

    Hi,
    SetWindowRgn
    It is very slow or you have to include already made rgn file. Isn't it ?

    Andris


  4. #4
    Join Date
    May 1999
    Location
    Houston
    Posts
    21

    Re: Non rectangular application windows.

    You do not have to use predefined rgn files to use SetWindowRgn. SetWindowRgn expects a regios. You can use API's like reateEllipticalRgn, CreatePolygonRgn, CreateRectRgn, and CreateRoundRgn functions to create regions.

    In addition, you can use BeginPath(...), EndPath(...), and PathToRegion(...) also. Start with BeginPath(...) for a HDC. use API's that draw on a HDC like LineTo(..) or Ellipse(..., etc. Then use EndPath(...). This will create a path for a DC. Next, convert the PATH to a region by using PathToRegion(...). This will give you a handle to a region. You can then use this in SetWindowRgn.

    I have used this very extensivley in my products and it works very well without having to rely on RGN files.

    Hope this helps.

    Vali


  5. #5
    Join Date
    May 1999
    Location
    Latvia
    Posts
    30

    Re: Non rectangular application windows.

    Yes, but in most cases I don't know the bitmap i'll use. I mean I'll load it dynamicly, like WinAMP skins, only transparent. Is there a fast way to get RGN from bitmap ?
    Anyway, thanks.


  6. #6
    Join Date
    May 1999
    Location
    Oregon, USA
    Posts
    302

    Re: Non rectangular application windows.


  7. #7
    Join Date
    Jun 1999
    Location
    Saint leger sur Roanne - FRANCE
    Posts
    4

    Re: Non rectangular application windows.

    Should take a look at this Web Page :

    http://www.aysec.com/

    search : AYS-NoBo for PC

    Its a complete sample with source code.

    Hoping that help

    Fred


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured