I haven't covered handles yet so I'm not really sure what the first error is telling me
Well the handle in this case is a handle for your window/dialog. Your main windows proceedure looks like this:
Code:
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
or something similar. The Dialog proceedure kinda look the same except the HWND would be a handle to your dialog and a dialog proceedure returns a BOOL type. I was passing SetFocus() a HWND called hwnd. That is just a name I use for it so you probably have yours named differently and that is why you are getting an error. I was just using it as an example. Maybe I should have said it like this:
Code:
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
HWND EditboxYouWant;
if(dataNotValid)
{
EditboxYouWant = GetDlgItem(hwnd,IDC_EDIT_NUM_MONTHS);
SetFocus(EditboxYouWant);
}
Hope this helps you