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

Thread: Vertical Menu in a CFormView

  1. #1
    Join Date
    Jun 2004
    Posts
    1,352

    Vertical Menu in a CFormView

    Is there a way to put a Vertical Menu in a CFormView App.
    Rate this post if it helped you.

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

    Re: Vertical Menu in a CFormView

    What is a "Vertical Menu"?
    How should it look like?
    Do you really want to put it in a CFormView window?
    Menus usually belong to a main frame window.
    Victor Nijegorodov

  3. #3
    Join Date
    Jun 2004
    Posts
    1,352

    Re: Vertical Menu in a CFormView

    Quote Originally Posted by VictorN View Post
    What is a "Vertical Menu"?
    How should it look like?
    Do you really want to put it in a CFormView window?
    Menus usually belong to a main frame window.
    I was reading my VC++ BOOKS, I guess it would be a like a Context Menu that is permantly on the Formview.

    Maybe you can create an app w/ no menu and trick Formview to ALWAYS display a CONTEXT menu???
    Rate this post if it helped you.

  4. #4
    Join Date
    Jun 2004
    Posts
    1,352

    Re: Vertical Menu in a CFormView

    I decided to just put CBUTTIONS vertically in a FORMVIEW and remove the menu. You could probobly do the same with a Dialog Application(I don' t do much dialog apps, I don't know if they have a status bar).


    I always wanted to create an app that had menus independent of the settings by Windows. I read that using CDialog was the way to go, I guess my approach is an extention of that.
    Rate this post if it helped you.

  5. #5
    Join Date
    Oct 2009
    Posts
    577

    Smile Re: Vertical Menu in a CFormView

    You could use a listbox and handle the LBN_SELCHANGE/LBN_DBLCLK or a listcontrol and NM_CLICK/LVN_ITEMCHANGED (all these handlers could be added by wizard).

    You also could try to add a Menu to your form. I never did it myself but I can't see a reason why it shouldn't work.

    Of course your button solution is also valid and probably the best solution as long as the number of (menu) items is small and you don't need some kind of submenus. For the latter also a tree control can be a solution which has advantages when the items were not static.

    Regards, Alex

  6. #6
    Join Date
    Jun 2004
    Posts
    1,352

    Re: Vertical Menu in a CFormView

    A list box might work.

    How about a listbox that is owner drawn.

    I could maybe write a CLASS or FUNCTION that would temporarily place buttons alongside the verticle buttons.

    I could also create the menu(add buttions) like CMenu adds Items.

    Do you know of any code examples in which you add menus and sub menus and then display them?
    Last edited by ADSOFT; August 18th, 2010 at 02:28 AM.
    Rate this post if it helped you.

  7. #7
    Join Date
    Jun 2004
    Posts
    1,352

    Re: Vertical Menu in a CFormView

    Quote Originally Posted by itsmeandnobodyelse View Post
    You could use a listbox and handle the LBN_SELCHANGE/LBN_DBLCLK or a listcontrol and NM_CLICK/LVN_ITEMCHANGED (all these handlers could be added by wizard).



    Of course your button solution is also valid and probably the best solution as long as the number of (menu) items is small and you don't need some kind of submenus. .

    Regards, Alex
    I used a Dialog Box with CButtons for SubMenus.

    It's pretty cool, I can make the menus independent of the Windows System settings, ... well most of them.
    Rate this post if it helped you.

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




On-Demand Webinars (sponsored)