how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbnail)
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14

Thread: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbnail)

  1. #1
    Join Date
    Aug 2005
    Posts
    9

    Question how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbnail)

    hi
    i can write a mfc program to make a Thumbnail view with image but can not this when change image with CDialogBox.

    Thumbnail view with image(chart) like this:
    for (int i=0;i<10;i++)
    {
    CChartContainer *cc = new CChartContainer();
    if(cc->m_frmWin->Create(_T(""),
    WS_CHILD|WS_VISIBLE|SS_BITMAP, rc,
    this,idDyn))
    {
    }
    }

    how can i write mfc program to make a Thumbnail view of CDialogBoxs?
    do i can use CListCtrl for show multiple DialogBoxs?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,529

    Re: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbn

    1. What do you mean by "change image with CDialogBox"?
    What is CChartContainer?
    Victor Nijegorodov

  3. #3
    Join Date
    Aug 2005
    Posts
    9

    Re: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbn

    ClistCtrl can view image in cells but i will show DialogBox in every cell.
    some sample codes are for insert one control (ComboBox , EditControl , ...) in one cell of ClistCtrl but they can not solve my problem.
    thankful for your attention.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,529

    Re: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbn

    Quote Originally Posted by hessamini View Post
    ClistCtrl can view image in cells but i will show DialogBox in every cell.
    some sample codes are for insert one control (ComboBox , EditControl , ...) in one cell of ClistCtrl but they can not solve my problem.
    But you didn't explain your problem yet!
    Victor Nijegorodov

  5. #5
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,204

    Re: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbn

    A dialog isn't an image. What you're asking isn't doable in any reasonable way that I know of. The best thing would be just to create an image that represents the dialog and use that.

  6. #6
    Join Date
    Aug 2005
    Posts
    9

    Re: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbn

    i will write a program as if show multiple dialog box together.
    i don't have a very good idea for this purpose .
    my experience in mfc is about 8 year but can not wrote this program.

    i think i can use CListCtrl for view a lot of dialog box in there .
    i think CListCtrl can contain a lot of dialog box and arrange them or scroll them and any other work that it has capability.
    is that right???????????????????????
    i'm sorry for bad English.

  7. #7
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,529

    Re: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbn

    Did you consider to use MDI application with multiple CFormView derived classes (CFormView is an analog of CDilaog) instead?
    Victor Nijegorodov

  8. #8
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,204

    Re: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbn

    Quote Originally Posted by hessamini View Post
    i will write a program as if show multiple dialog box together.
    i don't have a very good idea for this purpose .
    my experience in mfc is about 8 year but can not wrote this program.

    i think i can use CListCtrl for view a lot of dialog box in there .
    i think CListCtrl can contain a lot of dialog box and arrange them or scroll them and any other work that it has capability.
    is that right???????????????????????
    i'm sorry for bad English.

    Did you read my reply that said it doesn't work that way?

  9. #9
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,440

    Re: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbn

    Doesn't really help for MFC and C++, but you can do this using WPF.

  10. #10
    Join Date
    Aug 2005
    Posts
    9

    Re: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbn

    Quote Originally Posted by VictorN View Post
    Did you consider to use MDI application with multiple CFormView derived classes (CFormView is an analog of CDilaog) instead?
    i will write a project as if show multiple dialog box together. my need is this and i can not change it. i can clear my purpose for you : i will design a dashboard for many servers. this dashboard can view information and average and statistic of users activity. this dashboard must be like a big application of a big company . so i can not design optional by myself. if my way for design this project is wrong you suggest another one please. thankful for attention.

  11. #11
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,529

    Re: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbn

    Quote Originally Posted by hessamini View Post
    ii will design a dashboard for many servers. this dashboard can view information and average and statistic of users activity. this dashboard must be like a big application of a big company . so i can not design optional by myself.
    So what is wrong for you in MDI application?

    Quote Originally Posted by hessamini View Post
    i if my way for design this project is wrong you suggest another one please.
    I already did! Use MDI application with multiple CFormView derived classes. Then you'll be able to tile all these views as well as make them overlapped or maximize only one of them...
    Victor Nijegorodov

  12. #12
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,204

    Re: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbn

    You may want to look into embedded dialogs. Create a CDialog based app and nest other dialogs inside it. Here's an article about how they work.

    http://www.codeproject.com/Articles/...dialogs-in-MFC

  13. #13
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,058

    Re: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbn

    As already said before in this thread, a common Windows listview control (SysListView32, kept by CListCtrl or CListView MFC classes) is NOT designed to keep dialogs.
    Although at last everything is possible, e.g. placing child dialogs over listview items, that may be a real overkill.

    I would like to suggest the following solutions:
    1. Show only one dialog at a time and select the current one from a combo or a listbox.
    2. Use a property sheet (see CPropertySheet and CPropertyPage MFC classes).
    3. Place a few child dialogs in a (form)view and change the current ones from a scrollbar control.
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

  14. #14
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,061

    Re: how to use CListCtrl for show multiple DialogBoxs like items in icon view?(Thumbn

    You may want to look into using a grid as a means of input rather than trying to stuff dialogs into a listcontrol and trying to tie it all together.

    There's no standard grid in Windows however, so you will need to find some external source for one (there's many, even free ones).
    MFC does have a property-grid, but that's not quite the same, though it may be servicable to you depending on what you're really looking for.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center