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

Thread: Dialog

  1. #1
    Join Date
    May 1999
    Location
    Sweden
    Posts
    55

    Dialog

    I´ve created a dialogbased application and made it look kinda like CdrWin With 10 buttons. Also I have created a new dialog that I want to appear when pressing one of the buttons. How do make this happen in the code. How do I initialize it and where? Can someone please help me I´ve tried to figure it out for a long time now and tried a lot of different things but nothing seems to work. Please help me.


  2. #2
    Join Date
    May 1999
    Posts
    28

    Re: Dialog

    To do something like what you're looking for, I created a Dialog-based app and added a single button, called Button1, on the dialog form. I then created a new dialog in the app and a new class for it, called CDialog1. I created a message handler for Button1's ON_CLICK. In the message handler code, I declared a dialog of type CDialog1 (my class) and used the DoModal method to display it. Also make sure you include the .h file of the new dialog class (CDialog1.h in my example) wherever you put the message handler.

    <hr><font color='green' size=+1>Chris R. Wheeler, MCP</font>
    Pensacola Christian College
    Desktop Programmer

  3. #3
    Join Date
    May 1999
    Location
    Sweden
    Posts
    55

    Re: Dialog

    Thanx, it works perfectly. Now I have another problem. On this new dialog I have put two groups with four radiobuttons on each group. How can set the state of each button? For example I want radiobutton1 in group1 to be enabled initially. And then based on the state of the buttons I want to be able to pass that down to a variable. I know I`m supposed to use SetCheck, but it wont work. Do I have to make a Buttonobject for each radiobutton to do this? I thought this was done automatically when drawing it to the dialog.

    Hope you or someone else can help me get this straight.

    Frederik


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