First mistake is there's never a reason to include so much code.
...if anyone can figure out why whats wrong please let me know!
Second mistake is asking others to wade through all of this code. It's your assignment, after all.
Third mistake is that you did not read (or did but chose to ignore) this, especially point #7.
Rather than just run the program and hope it spits out the correct answer at the end, consider stepping through it using the ever-helpful debugger. You may not find the exact problem with it, but you can very easily narrow it down to just a small handful of lines rather than a whole program.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
I'm going to write small app ( in C++) for creating music, which would work under Win Xp, and I need some means for playing samples and streaming raw audio data.
I've looked up for some audio apis but I have no idea which one would be the best to perform this task. I've found some info about core audio APIs and I think that they would be right choose for my app. Unfortunately, as I know, they are just available for Vista and probably Win 7. That's why I would be grateful if you could give me some alternatives for this API (It also can be some cross-platform API).
He teaches C++ in the first half of the book and Windows Programming in the second half. He's still uses MFC for most of the book (which is a good thing IMO) but he has adapted and incorporated WinForms and some managed code for those who want it.
I've been very impressed with his teaching style and his choice of topics to cover.
I using Window CE API WriteFile() to write some barcode data to a file. Data is scanned and written to file ok. Problem is everything is on one line. How can I get the data in the file to be
line based. In other words, everytime I write to the file it writes a new line.
I am terribly confused about how to move CWnd objects around. With screen coords, client coords, dialog units, screen units, AaaRGh.
I have dialog app with button controls. From the OnSelect function of the buttons I am calling another popup dialog of my own making. I want to position the popup dialog so it obscure certain areas of the main dialog.
I am trying to use CWnd::MoveWindow() to move my popup dialog in the OnInitDialog() function to a position relative to the top left postion of the main dialog.
Which methods should I be using to get the main dialogs position to calculate coords for the MoveWindow() function in the correct units. A small example would be useful. Has anyone made a small Class to handle all this confussing translation between all the possible units and coordinte references ?