Thread: Click button on dialog box to open window.

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    68

    Cool Click button on dialog box to open window.

    I have a button on dialog box and I want to write program to open window and show word "Hi" when I click that button. So I write these below function

    Code:
     
    void CBallotVerifyFormView::OnDisplayimageButton() 
    {
    CWnd* pWnd = new CWnd;
    pWnd->Create(_T("STATIC"), "Hi", WS_CHILD | WS_VISIBLE,
    CRect(0, 0, 20, 20), this, 1234);
    }
    when I click that button there is word "Hi" display on my dialog box. But I want to show word "Hi" on new dialog box or new window (not same dialog box with my button) when I click button.
    Do you know how to do that?

  2. #2
    MessageBox() function, look it up

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C or C++
    By AcerN30 in forum Game Programming
    Replies: 41
    Last Post: 05-30-2008, 06:57 PM
  2. Dialog Box error
    By JJFMJR in forum Windows Programming
    Replies: 4
    Last Post: 09-04-2007, 07:51 AM
  3. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  4. How to program a "back" button with MFC
    By 99atlantic in forum Windows Programming
    Replies: 3
    Last Post: 04-26-2005, 08:34 PM
  5. Adding colour & bmps to a Win 32 Window??
    By carey_sizer in forum Windows Programming
    Replies: 4
    Last Post: 09-04-2004, 05:55 PM