CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Icons

  1. #1
    Join Date
    Feb 2000
    Location
    garden grove, california
    Posts
    64

    Icons

    On mouse click on a picture box with a icon in that picture box, how would i open the common dialog box and let the user save what icon he clicked on(in the picture box)


  2. #2
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: Icons

    Just an idea. it may work!!

    1. Icon Display:
    You shoud use PaintPicture property to paint the icon image on to the picture box in a predefined rectangular areas. If you do this differently, then you might have to keep track of which icon (image file) is in which area.

    2. Icon Selection:
    When user clicks on a icon, you have to write some kind of hit-test method, from which you can find (using info from 1 above), which image file it is. If you know the positions of that area, you could even draw a small rectangle to indicate highlight.

    If you use std RECTt, then you can use PtinRect API.

    3. Then on Mouse up / Click, bring up the Common Dialog box with SaveAS option, and give a different/same name for the file.

    well each of these steps itself is worth a post. so...

    RK

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