Windows GUI interface. C++

Hey guys, i have an assignment due and i have no i idea what to do on it. We have hardly even talked about windows programming. Heres the assignment.

You have seen seven sorting algorithms in Chapters 9-11:

• bubblesort
• heapsort
• insertion sort
• mergesort
• quicksort
• selection sort
• treesort

This program will require you to implement each of these sorting algorithms on an array of up to 20 elements. In each case, the number of element comparisons should also be counted.

Your Windows interface form should contain the following components:

• A text box to input no more than the 20 elements (all should be visual at one time on the screen)
• Check boxes with seven options (one for each sort, properly labeled)
• A button labeled “Compare Sorts”. After this button is pressed, the program should sort the values input using only those sorts specified with those boxes checked, and determine the number of element comparisons only for each of those sorts (for output, see below)
• There should be a label next to each sort stating how many element comparisons were performed for that sort (if checked), in a color different than that used for the name of the sort. (That is, “quicksort” might show up in black, and the number of comparisons in red.)
• A separate label should be used for appropriate error messages. For instance, it should be used if “Compare Sorts” is pressed, but there is no data to sort. Also, if there is data to sort, but no sort has been checked, an error message should also be output using that label.
• Finally, there should be two more buttons: one labeled “Clear” to clear all data and boxes checked, and “Exit” to exit the program.

Basically, i need to know how to do the windows GUI interface in relation to the requirements above. Thank you
Just use Dlg Editor in VS.
Done in 1 minute, or 3 with CreateWindow() from the Win32 wizard code in WM_CREATE of the main window
Last edited on
What dev tools are you using? VS? GCC? what is allowed? Can you use Windows forms? MFC? WTL? ?

If you are using VS, then as PP said just create a new dialog based app where you put in the elements mentioned in your assignment e.g. text box etc. Personally I probably would have either done a quick MFC app or ATL app dialog based app. Then you just drag and drop the controls into the dialog and access them from your program, depending on what method you are employing it is more or less work to access the controls.
cant find Dlg editor in VS 6.. :(
Topic archived. No new replies allowed.