void CLoginWin::Create()
{
CWin::Create(329, 245, BITMAP_LOG_IN + 7);
m_asprInputBox[LIW_ACCOUNT].Create(156, 23, BITMAP_LOG_IN + 8);
m_asprInputBox[LIW_PASSWORD].Create(156, 23, BITMAP_LOG_IN + 8);
for (int i = 0; i < 2; ++i)
{
m_aBtn[i].Create(54, 30, BITMAP_BUTTON + i, 3, 2, 1);
CWin::RegisterButton(&m_aBtn[i]);
}
char Acc[32], Pass[32];
GetPrivateProfileString("AutoLogin", "User", "", Acc, 32, ".\\config.ini");
GetPrivateProfileString("AutoLogin", "Password", "", Pass, 32, ".\\config.ini");
SAFE_DELETE(m_pIDInputBox);
m_pIDInputBox = new CUITextInputBox;
m_pIDInputBox->Init(g_hWnd, 140, 14, MAX_ID_SIZE);
m_pIDInputBox->SetBackColor(0, 0, 0, 255);
m_pIDInputBox->SetTextColor(255, 255, 230, 210);
m_pIDInputBox->SetFont(g_hFixFont);
m_pIDInputBox->SetState(UISTATE_NORMAL);
m_pIDInputBox->SetText(Acc);
SAFE_DELETE(m_pPassInputBox);
m_pPassInputBox = new CUITextInputBox;
m_pPassInputBox->Init(g_hWnd, 140, 14, MAX_PASSWORD_SIZE, TRUE);
m_pPassInputBox->SetBackColor(0, 0, 0, 25);
m_pPassInputBox->SetTextColor(255, 255, 230, 210);
m_pPassInputBox->SetFont(g_hFixFont);
m_pPassInputBox->SetState(UISTATE_NORMAL);
m_pPassInputBox->SetText(Pass);
m_pIDInputBox->SetTabTarget(m_pPassInputBox);
m_pPassInputBox->SetTabTarget(m_pIDInputBox);
this->FirstLoad = 1;
}