First windows app that does something. What do you guys think?

Hey guy, This is my first windows app I have been working on it for a little while... its also my ISP for my grade 12 computer science class.

I learned a lot from making this program and am wondering if there is anything I could have done better or more efficient. It would be greatly appreciated if you had any pointers.

Here's the Pastebin link. http://pastebin.com/YiS86znZ

I wouldn't have gotten this done in the time I had without you guys Thanks for everything.. you're all amazing!

also here is a link to the .exe and a practice test. http://www.mediafire.com/?a0y0czmmuz69m1d

one of the questions in the practice test is messed up... It wont display the double. && .. Ill have to fix that sometime :P

EDIT: Lol I forgot to mention what the program does.. :P
its a multiple choice testing program. and you can make your own tests for it.

Last edited on
To display and ampersand character use 2 "&&" characters or disable interpreting them by using SS_NOPREFIX window style.
Is there any particular reason for this two step method of setting a
child control ID ??
For Example:
1
2
3
4
5
6
7
8
9
hCheckBox3 = CreateWindowEx (WS_EX_TRANSPARENT, TEXT("button"),0,
                             WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
                             0, 140, 16, 16,
                             hwnd, 0,
                             hInst, NULL);
if(hCheckBox3)
{
    ::SetWindowLong(hCheckBox3,GWL_ID,IDC_CHECKBOX3); // *** set the control ID  ***
}


when you could do it in one step like this:
1
2
3
4
5
6
hCheckBox3 = CreateWindowEx (WS_EX_TRANSPARENT, TEXT("button"),0,
                             WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
                             0, 140, 16, 16,
                             hwnd,
                             (HMENU) IDC_CHECKBOX3, //Set the control ID here
                             hInst, NULL);
I tried just putting in IDC_CHECKBOX3 but it didn't work.. I see now that you have to use (HMENU).

what is the (HMENU)?
Iv never used anything like it before.
its in brackets but its not apart of an object..
@modoran

do you mean DT_NOPREFIX?
No, modoran means SS_NOPREFIX: http://msdn.microsoft.com/en-us/library/ms997560.aspx

(HMENU) is a C-style type cast. The C++ equivalent cast would be reinterpret_cast<HMENU>().
Topic archived. No new replies allowed.