Hy everyone,
first a question: I have a C file where the WinMain function resides, and where on the WM_COMMAND case I handle menu options. As an example on IDM_FILE_NEW I launch a dialog box from where I get some input which I convert to numeric variables. The dialog function I've wrote in a separate C file. So that the variables that I read with the dialog function to be available to the rest of the code, in the WndProc I've declared them with the extern attribute and the same in the file where resides the dialog function. I don't find this elegant because the variables will exist as long as the code will run. So my question is if someone has a better idea on how to read some variables through a dialog box and make them available to the rest of the code.
The second problem is that there is anyone who can pass me some sample code on how to use GetVolumeInformation function to read an harddisk serial number.
Thanks in advance
first a question: I have a C file where the WinMain function resides, and where on the WM_COMMAND case I handle menu options. As an example on IDM_FILE_NEW I launch a dialog box from where I get some input which I convert to numeric variables. The dialog function I've wrote in a separate C file. So that the variables that I read with the dialog function to be available to the rest of the code, in the WndProc I've declared them with the extern attribute and the same in the file where resides the dialog function. I don't find this elegant because the variables will exist as long as the code will run. So my question is if someone has a better idea on how to read some variables through a dialog box and make them available to the rest of the code.
The second problem is that there is anyone who can pass me some sample code on how to use GetVolumeInformation function to read an harddisk serial number.
Thanks in advance