CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    [RESOLVED] MFC Application UI develop idea

    I'm on a process to build a new application which will have left menu and corresponding screens for each button. You can say a Vertical tab like interface. For a more clear picture I have prepared a simple layout using resource editor which has been attached.

    Now what would be the good approach to do it? Currently I'm following simple way to do this ie: One main dialog which owns all left menu buttons and show/hide child dialogs for each button within right area.

    Do note that I will apply background images on dialog and buttons so that my application gets a nice GUI.
    Attached Images Attached Images   
    ◄◄ hypheni ►►

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

    Re: MFC Application UI develop idea

    Are you going to reinvent the wheel?
    https://www.google.ch/search?q=der+p...r:source%3F%7D
    Victor Nijegorodov

  3. #3
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: MFC Application UI develop idea

    Never used this class. Time to learn something new.
    ◄◄ hypheni ►►

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

    Re: MFC Application UI develop idea

    Good luck!
    Victor Nijegorodov

  5. #5
    Join Date
    Jan 2012
    Location
    India
    Posts
    193

    Re: MFC Application UI develop idea

    VictorN Sir .. if we select Form Programming ( c# ) for above application or Visual Express .. Will it be simpler than property page ?

    For left side buttons , can we work without Dialog ?

    Just a querry .. !!

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

    Re: MFC Application UI develop idea

    Quote Originally Posted by new_2012 View Post
    VictorN Sir .. if we select Form Programming ( c# ) for above application or Visual Express .. Will it be simpler than property page ?
    I don't know. I never used c# for UI programming. Nor used I any other Form Programming language.
    Victor Nijegorodov

  7. #7
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: MFC Application UI develop idea

    Actually the UI can be achieved by many ways ie: Painting method, Creating child dialog and as said by VictorN by Property page method. What ever you want. I don't know C# but you can do it easily with any framework.

    I think I will go for Painting method / Child dialog method as I don't find much interest on property sheet. All I can do by handling events and making custom buttons and controls.
    ◄◄ hypheni ►►

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

    Re: MFC Application UI develop idea

    I'd do it with buttons and nested dialogs.

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

    Re: MFC Application UI develop idea

    Quote Originally Posted by hypheni View Post
    I think I will go for Painting method / Child dialog method as I don't find much interest on property sheet. All I can do by handling events and making custom buttons and controls.
    Sure, you can do it this way, but it's the hard way to get it done unless you really need something custom.

  10. #10
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: MFC Application UI develop idea

    Yes. I do need all custom buttons and all. I need to place images on buttons and dialogs. And for me it will be faster.

    Currently what I have done is, created one parent dialog which has all the left menu item buttons. On clicking any of them opens a corresponding dialog as child dialog (CreateDialog ie: Modeless). Now once this dialog is opened inside parent dialog, if I drag the parent dialog this child dialog is not moving along with. Also the focus is set to child dialog (I know this should be default behavior). What could be done in this context.

    I have other option to make separate class / function for each menu and draw to one dialog according to menu item selected.
    ◄◄ hypheni ►►

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

    Re: MFC Application UI develop idea

    Quote Originally Posted by hypheni View Post
    Yes. I do need all custom buttons and all. I need to place images on buttons and dialogs. And for me it will be faster.

    Currently what I have done is, created one parent dialog which has all the left menu item buttons. On clicking any of them opens a corresponding dialog as child dialog (CreateDialog ie: Modeless). Now once this dialog is opened inside parent dialog, if I drag the parent dialog this child dialog is not moving along with. Also the focus is set to child dialog (I know this should be default behavior). What could be done in this context.

    I have other option to make separate class / function for each menu and draw to one dialog according to menu item selected.
    Again, nested dialogs.

  12. #12
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: MFC Application UI develop idea

    Yes nested dialog. But current my child dialog wont have any title bar. So user wont understand by view that its a child dialog. But what my problem is: Im not able to move the child window along with parent.

    Should I post MouseMove message to child when its received by the parent dialog.
    ◄◄ hypheni ►►

  13. #13
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: MFC Application UI develop idea

    Quote Originally Posted by hypheni View Post
    Yes nested dialog. But current my child dialog wont have any title bar. So user wont understand by view that its a child dialog. But what my problem is: Im not able to move the child window along with parent.

    Should I post MouseMove message to child when its received by the parent dialog.
    We got it, but we're trying to explain it to you. Use a nested dialog and set the child style for the child dialog. When you get the styles for the child correct, it will be embedded without a title and move along with the parent dialog (and of course you need to pass the parent cwnd to the child when you create it). No need to handle the MouseMove message or any other because it's taken care of for you. If you can't figure out the correct styles for the child dialog, find a property sheet/page (CPropertySheet/CPropertyPage) example on the net and look at the styles for the dialog on each page. Those same style settings will work in your case.

  14. #14
    Join Date
    Jan 2012
    Location
    India
    Posts
    193

    Re: MFC Application UI develop idea

    Thank you all .. as I learnt a lot from your post .

    Will you please guide me , how to use any of the Dialog Control on main window ? I have used all the controls in Dialog only.
    But how to use them on Main Program Window ?

    I needed a button control on my screen .. I draw a bitmap . Checked mouse click and take necessary action. How to do this with
    actual Button Control on Screen ?

    I will learn to place Images on controls .. It is bit difficult in VC++ but simple with Form Programming

  15. #15
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: MFC Application UI develop idea

    Quote Originally Posted by new_2012 View Post
    Thank you all .. as I learnt a lot from your post .

    Will you please guide me , how to use any of the Dialog Control on main window ? I have used all the controls in Dialog only.
    But how to use them on Main Program Window ?

    I needed a button control on my screen .. I draw a bitmap . Checked mouse click and take necessary action. How to do this with
    actual Button Control on Screen ?

    I will learn to place Images on controls .. It is bit difficult in VC++ but simple with Form Programming
    Read some tutorials on Internet for getting the whole VC++ dialog based programming. What you need to do is Create a dialog from resource editor and draw a button from the toolbox there. Then you will have add a button handler and process further.

    For ref: http://www.functionx.com/visualc/controls/dialogbox.htm

    Simply googling can reveal you a lot of stuff about this.
    ◄◄ hypheni ►►

Page 1 of 2 12 LastLast

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