Results 1 to 5 of 5

Thread: Another rookie question ;o)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242

    Wink

    Hello!

    I started with VC++ and I'd need some help (greatly appreciated).
    I use resources (dialogs) and I'd like to know how can I load another dialog through code 'cause I just can't figure it out. I've already looked in MSDN Library, but I found nothing useful.
    Are there any MFC (and dealing with resources) tutorials? I've found some MFC tutorials, but none of them were including resources and dealing with them. Any suggestions?
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    If you're using MFC, right-click on the dialogue in the dialogue editor, and choose ClassWizard. It should ask you if you want to make a new class for it.
    For non-MFC, use the CreateDialog function:
    Code:
    HWND hMyDlg;
    if(hMyDlg = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_MYDIALOG), NULL, DlgProc)) {
        ShowWindow(hMyDlg, SW_SHOW);
    }
    Where DlgProc is your Dialogue Box Procedure (see the Platform SDK).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    Thanks.

    But what I really want is that:
    I have created dialog (in resources) and I want to show another dialog when user presses button on my main dialog. How can I do that, 'cause I've tried something but it didn't work out anything.
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I'll send you an example project in a bit. You're on VC6, aren't you?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Ilirska Bistrica, Slovenia
    Posts
    242
    Could you do this for me and send me an example?
    I have VS6 (SP3).
    My e-mail: [email protected]

    Thanks.
    Zvonko Bostjancic
    Ilirska Bistrica, Slovenia
    [email protected]
    Using VS6 Professional with SP3
    Programming mostly in VB and I've started to learn VC++ & MFC

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