C programming Advice On

Soldato
Joined
9 Dec 2006
Posts
9,289
Location
@ManCave
i've started to learn C programming from Primer Plus C book.

Currently on page 67 which is using User Functions & using different variants of int/float etc

Now i have an idea of first application that i want to create, this will be used for work

Its a Basic Backup program to backup Results daily from a network Drive To the C: Drive.

Here is an idea of what i want to do: I just wanted to know which things i need to learn in order to complete this application?

Both location boxes will be browse boxes
Pick a Time will be the time to backup that folder/file every day
Projects will allow you to save 4 different project & back them up to different locations
projectvp.jpg


So what do i need to learn to be able to achieve this, i guess i need to read the system time & use a counter of sorts to check if thats time every 15 mins?

Thanks in a advance
:D
 
I would suggest you make it as a console application to begin with, and do the GUI last. Essentially this means you make all your functions and get everything working nicely with predefined test input data, then you can just add on the GUI last.

To backup the files, it's a simple call to the CopyFile(srcLocation, destLocation) from windows.h. So you could make a wrapper function for this such as

Code:
bool backupFile(char *src, char *dest)
{
...
result = CopyFile(...)
...
return successOrFail;
}

The bulk of the code will be using the Win32 API, you will need to be familiar with all the various controls like edit boxes, radio buttons etc.

There is a great tutorial on WIN32 API use here: http://www.winprog.org/tutorial/simple_window.html. The API contains everything you need to do to interact with the user, e.g browsing for files. MSDN has great documentation on all the API functions you will need.

You can use timers to achieve the repeating functionality yes. Again the win32 api provides good timers for you: http://www.suite101.com/content/using-the-win32-timer-api-a23678

Good project to learn with though, should teach you a lot (hope it's not a homework project ;))
 
Last edited:
I would suggest you make it as a console application to begin with, and do the GUI last. Essentially this means you make all your functions and get everything working nicely with predefined test input data, then you can just add on the GUI last.

To backup the files, it's a simple call to the CopyFile(srcLocation, destLocation) from windows.h. So you could make a wrapper function for this such as

Code:
bool backupFile(char *src, char *dest)
{
...
result = CopyFile(...)
...
return successOrFail;
}

The bulk of the code will be using the Win32 API, you will need to be familiar with all the various controls like edit boxes, radio buttons etc.

There is a great tutorial on WIN32 API use here: http://www.winprog.org/tutorial/simple_window.html. The API contains everything you need to do to interact with the user, e.g browsing for files. MSDN has great documentation on all the API functions you will need.

You can use timers to achieve the repeating functionality yes. Again the win32 api provides good timers for you: http://www.suite101.com/content/using-the-win32-timer-api-a23678

Good project to learn with though, should teach you a lot (hope it's not a homework project ;))

learning for myself but its part of my development at work to, going to support our department by creating programs to automate long winded tasks :)

Thankyou, Looks advance at the moment once i get to grips with more of the basics i think i will give a crack at it :)
 
Back
Top Bottom