CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual C++ & C++ Programming > Managed C++ and C++/CLI
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Managed C++ and C++/CLI Discuss Managed C++ and .NET-specific questions related to C++.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old August 18th, 2005, 10:54 AM
    chinniwhites chinniwhites is offline
    Member
     
    Join Date: Jun 2005
    Posts: 42
    chinniwhites is an unknown quantity at this point (<10)
    How to create a pop up windows in a windows form?

    I have a button in my program that when pushed should pop up a small window with menu of different options. What is the best way to do this.

    Thanks in advance
    Reply With Quote
      #2    
    Old August 18th, 2005, 03:37 PM
    g_gili's Avatar
    g_gili g_gili is offline
    Senior Member
     
    Join Date: Mar 2005
    Location: Romania,Cluj-Napoca
    Posts: 1,073
    g_gili is a name known to all (1000+)g_gili is a name known to all (1000+)g_gili is a name known to all (1000+)g_gili is a name known to all (1000+)g_gili is a name known to all (1000+)g_gili is a name known to all (1000+)g_gili is a name known to all (1000+)g_gili is a name known to all (1000+)g_gili is a name known to all (1000+)g_gili is a name known to all (1000+)
    Re: How to create a pop up windows in a windows form?

    Quote:
    Originally Posted by chinniwhites
    I have a button in my program that when pushed should pop up a small window with menu of different options. What is the best way to do this.

    Thanks in advance
    Add another dailog in your resorce view than create a class for it, load the menu or what you wants. Then event handler to your button:
    ex.
    Code:
    void CYourClass::OnButton()
    {
    CYourNewDialog m_showpopup;
    m_showpopup.DoModal();
    }
    __________________
    Please use code tags [code] [/code]

    We would change the world, but God won't give us the sourcecode..
    Undocumented futures are fun and useful....
    ___
    ______
    Gili
    Reply With Quote
      #3    
    Old August 19th, 2005, 10:53 AM
    NoHero's Avatar
    NoHero NoHero is offline
    Moderator
     
    Join Date: Mar 2004
    Location: (Upper-) Austria
    Posts: 2,899
    NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)
    Re: How to create a pop up windows in a windows form?

    Quote:
    Originally Posted by chinniwhites
    I have a button in my program that when pushed should pop up a small window with menu of different options. What is the best way to do this.

    Thanks in advance
    Create a new class inheriting from System::Windows::Form and use ShowDialog() member. This will cause your dialog form to run modal as a pop dialog.
    __________________
    I am not offering technical guidiance via email or IM
    Come on share your photo with us! CG members photo album!
    Use the Code Tags!
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual C++ & C++ Programming > Managed C++ and C++/CLI


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 04:09 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009