I have searched and deleted on this code, but I am still stumped on where the "unresolved external" it's complaining about is. Here is the code:
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <tchar.h>
#include "resource.h"
#define GETITEM(item) GetDlgItem(hWndDlg, item)
void convert (HWND hWndDlg)
{
wchar_t ConvertTime[9], ETime[8], UKTime[8], HKTime[8], Hour[8], Min[8], AMPM[8];
int intHour;
// Gets the user entered time and converts it to usable format
GetWindowTextW(GETITEM(IDC_CONVERT_TIME), ConvertTime, 9);
_tcscpy(Hour, ConvertTime);
_tcscpy(Min, ConvertTime + 3);
_tcscpy(AMPM, ConvertTime + 6);
intHour = _wtoi(Hour);
if (_tcschr(ConvertTime, 'A') == NULL ||
_tcschr(ConvertTime, 'P') == NULL ||
_tcschr(ConvertTime, 'a') == NULL ||
_tcschr(ConvertTime, 'p') == NULL)
{
// converting to 24hr format
if (_tcschr(AMPM, 'P') != NULL && _tcschr(AMPM, 'p') != NULL)
{
if (intHour != 12)
{
intHour = intHour + 12;
}
}
else if (_tcschr(AMPM, 'A') != NULL && _tcschr(AMPM, 'a') != NULL)
{
if (intHour == 12)
{
intHour = 0;
}
}
}
}
LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg,
WPARAM wParam, LPARAM lParam)
{
switch(Msg)
{
case WM_INITDIALOG:
// Init radio button group.
CheckRadioButton (hWndDlg,
// First and last of list of consecutive
// radio button id's.
IDC_EASTERN_SELECT, IDC_HK_SELECT,
// Id to set; all others are reset.
IDC_EASTERN_SELECT);
return TRUE;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_CONVERT:
convert (hWndDlg);
return TRUE;
case IDCANCEL:
EndDialog(hWndDlg, 0);
return TRUE;
}
break;
}
return FALSE;
}
int APIENTRY
WinMain (HINSTANCE hInst, HINSTANCE unused, LPSTR cmdLine, int cmdShow)
{
DialogBox(hInst, MAKEINTRESOURCE(IDD_CONTROLS_DLG), 0,
(DLGPROC)(DlgProc));
return 0;
}
If anyone can find it and notify me, it would be very appreciated.