Thread: Making a wizard w/ Win32 API?

  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    13

    Making a wizard w/ Win32 API?

    Hi guys! I am attempting to make a setup wizard for one of my programs. I have been struggling with this for the past week. I have finnally gotten it to switch pages using "SetWindowText()" to change the text of a STATIC control based upon the current page number. I can not, however, get it to go past the second page! This thing has been more of a headache than it's worth! Does anyone know where I can find a good tutorial on creating straight API wizards? MFC is totally useless to me as I do not have M$ VC++.

    Many thanks in advance,
    Joe

  2. #2
    Registered User sean345's Avatar
    Join Date
    Mar 2002
    Posts
    346
    Check out the Property program with source code at http://www.john.findlay1.btinternet....rl/comctrl.htm

    It uses property sheets to create a wizard.

    - Sean
    If cities were built like software is built, the first woodpecker to come along would level civilization.
    Black Frog Studios

  3. #3
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    [Post removed due to lack of knowlege of Property sheet coolness]

    gg
    Last edited by Codeplug; 12-08-2003 at 10:46 PM.

  4. #4
    Registered User
    Join Date
    Dec 2003
    Posts
    13
    Thank you, Sean. I'll definately look into that!

  5. #5
    Registered User
    Join Date
    Dec 2003
    Posts
    13
    Well, I extracted the necessary parts and then looked up PropertySheets on MSDN but it seems that they were only intended to be used under Windows 95!

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    You could create a series of dialogs all the same size (to fit on the main wizard dialog).

    then just show the one you need and hide all the rest.

    Use SetWindowPos() and respond to WM_MOVExxx msg's (ie WM_MOVING and WM_MOVE)
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  7. #7
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Originally posted by JoeCoder
    Well, I extracted the necessary parts and then looked up PropertySheets on MSDN but it seems that they were only intended to be used under Windows 95!
    Don't think so.

    Creating Wizards

    gg

  8. #8
    Registered User
    Join Date
    Dec 2003
    Posts
    13
    Thank you Codeplug; I just did a little digging and found that tutorial myself. My gratitude, anyhow!

  9. #9
    Registered User
    Join Date
    Dec 2003
    Posts
    13
    Well, Dev C++ 5 seems to have a problem with that code. Here are the errors:
    Code:
    [Linker error] undefined reference to `CreatePropertySheetPageA@4'
    [Linker error] undefined reference to `PropertySheetA@4'

    EDIT: Fixed the problem by linking with libcomctl32.a.
    Last edited by JoeCoder; 12-10-2003 at 03:57 PM.

  10. #10
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    You need to link with comctl32.lib

    gg

    [EDIT] - just saw you EDIT...

  11. #11
    Registered User
    Join Date
    Dec 2003
    Posts
    13
    Allright; I didn't manage to get the Wiz97 example working but I did manage to get a boiled-down version of what Sean posted working like a charm. Thank you guys for all of your help!

    P.S. - I am using XP so I can't understand why Wiz97 wouldn't work....oh well damn M$!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WIN32 API and Linux... *shudder
    By parad0x13 in forum C++ Programming
    Replies: 4
    Last Post: 07-24-2008, 07:27 PM
  2. WIN32 API Controls used with Resource
    By parad0x13 in forum C++ Programming
    Replies: 0
    Last Post: 07-19-2008, 02:05 PM
  3. Win32 API & XML question
    By Born_2B_Alone in forum Windows Programming
    Replies: 8
    Last Post: 09-23-2004, 04:32 PM
  4. Serial Communications with win32 api
    By Blackthorne in forum C Programming
    Replies: 1
    Last Post: 01-26-2003, 12:45 PM
  5. Allegro and the Win32 API
    By -leech- in forum Game Programming
    Replies: 1
    Last Post: 02-12-2002, 09:08 PM