switch (message)
{
case WM_INITDIALOG:
// Load and display the background bitmap.
hbm = LoadBitmap(g_hinst, MAKEINTRESOURCE(IDB_WINDOWSCE));
SendMessage(
GetDlgItem(hDlg, IDC_STATIC_PICT),
STM_SETIMAGE,
(WPARAM)IMAGE_BITMAP,
(LPARAM) hbm);
// Misc other info for the dialog.
LoadGlobalStrings();
#ifndef USE_LASS_AUTH
hwndPass = GetDlgItem(hDlg, IDC_PASS);
#endif
// Set the font size of the various parts of the dialog.
memset(&lFont, 0, sizeof(LOGFONT));
hDlgFont = (HFONT)SendMessage(hDlg, WM_GETFONT, 0, 0L);
if ( !hDlgFont )
{
hDlgFont = (HFONT)GetStockObject(SYSTEM_FONT);
}
GetObject(hDlgFont, sizeof(LOGFONT), &lFont);
if (hDlgFont && lFont.lfHeight)
{
lFont.lfWeight = FW_BOLD;
// Set focus to the dialog itself, so WM_CHAR's are received.
// If we're not using LASS and we requireAuth we'll switch the
// focus to the password field.
SetFocus(hDlg);
if( isAuthRequired() )
{
EnableMenuItem(GetSystemMenu(hDlg, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_GRAYED); // disable close button
#ifndef USE_LASS_AUTH
ShowWindow(hwndPass, SW_SHOW);
ShowWindow(GetDlgItem(hDlg, IDC_STATIC_PASS), SW_SHOW);
SendMessage(hwndPass, EM_LIMITTEXT, PASSWORD_LENGTH, 0L);
SetFocus(hwndPass);
//add soft keypad, begin<<
RECT rcDefault;
SystemParametersInfo(SPI_GETWORKAREA, 0, &rcDefault, FALSE);
rcDefault.left =
rcDefault.top =
rcDefault.top =
rcDefault.top = rcDefault.bottom - 80;
SipSetDefaultRect(&rcDefault);
ipShowIM(SIPF_ON);
//add soft keypad, end>>
#endif
}
i = 0;
if ( g_pOwnerNotes->NotesPowerUp )
{
i += SetAndShow(hDlg, IDC_NOTES, g_pOwnerNotes->Notes);
}
if ( !i)
{
ShowWindow(GetDlgItem(hDlg, IDC_NOTES),SW_HIDE);
}
i = 0;
if ( g_pOwnerProfile->IDPowerUp )
{
i += SetAndShow(hDlg, IDC_NAME, g_pOwnerProfile->szName);
i += SetAndShow(hDlg, IDC_COMPANY, g_pOwnerProfile->szCompany);
i += SetAndShow(hDlg, IDC_ADDRESS, g_pOwnerProfile->szAdd);