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

    Own minimize button

    Yo

    I have really noobs question, but i lost 2 day trying to find any solution. Im trying to do my own minimize button. I just starter learning C++ in Visual Express 2010 and i don't need it for anything importany. Just this is iritating for me, why exit button is so easy, but minimize not! I dont want do minimize to tray. Just normal minimiza to task bar. I found that i can easly do it with MFC, but its look like Express do not support this libary. If i can please, i need example or code how i can build my own minimize button in Express 2010.

    Thx for help

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Own minimize button

    What do you mean by "own" minimize button? What is wrong with a standard minimize button?
    Victor Nijegorodov

  3. #3
    Join Date
    Aug 2012
    Posts
    4

    Re: Own minimize button

    I want to change look of "standard" minimize button, and also position, and size, and image, and... oh... thats it. So i thing i have two ways. Figure out how to change properties of original button, or hide it and create my own.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Own minimize button

    You seem to have owner drawing on the non-client area of the window. This Q&A article http://www.microsoft.com/msj/0197/c/c0197.aspx would be a good start.
    Note that it uses MFC, but you would have to handle WM_NCPAINT and WM_NCACTIVATE messages directly in your window procedure...
    Victor Nijegorodov

  5. #5
    Join Date
    Aug 2012
    Posts
    4

    Re: Own minimize button

    hmm... Ok i try to figure this out. Thx for the tips

  6. #6
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Own minimize button

    Quote Originally Posted by Polak149 View Post
    I dont want do minimize to tray. Just normal minimiza to task bar.
    You can provide your custom minimize handler for the standard button. Why do you need it looking different but doing generally the same? Did you ever think that your code (and button image and visual effects of course) must adapt to any theme user may have applied?
    Best regards,
    Igor

  7. #7
    Join Date
    Aug 2012
    Posts
    4

    Re: Own minimize button

    Yes. And normaly i woudn't change that. But now i'm learning c++ and i was just curious if I can change that button. Just for learning.

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