// SearchClient.cpp: implementation of the SearchClient class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "LYFZIPManage.h" #include "SearchClient.h" #include "ChoosePhotoSkin2.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// SearchClient::SearchClient() { m_mode=0; m_exitcode=0; g_pMainWnd->GetSkin(); } SearchClient::~SearchClient() { } void SearchClient::OnFSCommand(LPCTSTR command, LPCTSTR args) { } void SearchClient::Init() { #ifdef MNLS_VERSION if(m_mode==0) ((MyBmpButton2*)m_picarray.ElementAt (1))->ShowWindow (SW_HIDE); else ((MyBmpButton2*)m_picarray.ElementAt (1))->EnableWindow (0); #else Graphics graph(m_pBk); Image *img=NULL; if(m_mode==0) ::LoadImageFromBuf (&img, g_mainpath+"\\skin\\标题-选片.jpg"); else ::LoadImageFromBuf (&img, g_mainpath+"\\skin\\标题-看设计.jpg"); graph.DrawImage(img, 0,0); delete img; ((MyBmpButton2*)m_picarray.ElementAt (1))->ShowWindow (SW_HIDE); #endif m_combobox.Create(WS_VSCROLL|WS_CHILD|CBS_DROPDOWN,m_rcarray.ElementAt (2),this,100); m_combobox.ShowWindow(SW_SHOW); CRect rc=m_rcarray.ElementAt (2); rc.bottom +=260; m_combobox.MoveWindow (rc); tpFont.CreatePointFont (180, _T("黑体")); m_combobox.SetFont(&tpFont); m_acCombo.Init(&m_combobox); g_sendhead.bsql=0; g_sendhead.code[0]=30; g_sendhead.tabcount=1; g_pMainWnd->ProcessChatMessageRequest2(21);if(g_bSendOK==0)return; DataToArray(&m_List1array); m_acCombo.m_pArray=&m_List1array; m_combobox.SetFocus (); } void SearchClient::Destory() { } void SearchClient::BtnClick(WPARAM wParam, LPARAM lParam) { int id=lParam; id-=99; switch(id) { case 1: Begin(); break; case 2: break; } } BOOL SearchClient::PreTransMsg(MSG* pMsg) { if(pMsg->message==WM_KEYDOWN) { switch (pMsg->wParam) { case VK_ESCAPE: CDialog::OnCancel (); return 1; case VK_F2: if(m_mode) m_exitcode=2; CDialog::OnOK (); return 1; case VK_F3: if(m_mode==0) m_exitcode=3; CDialog::OnOK (); return 1; case VK_RETURN: Begin(); return 1; } } else if(pMsg->message==WM_LBUTTONDOWN) { g_bNeedDrawParent=1; } return CDialog::PreTranslateMessage(pMsg); } void SearchClient::Begin() { if(m_mode==0) if(IsHasRightsnew(15)==0)return; int pos=m_combobox.GetCurSel (); if(pos==-1)return; int pos2=m_acCombo.m_posarray .ElementAt (pos); ChoosePhotoSkin2 dlg; dlg.m_mode2 =m_mode; dlg.SetLiaPath ("3.lia"); dlg.m_id=m_List1array.ElementAt (pos2).ElementAt (0); dlg.m_path=g_path2+"\\"; dlg.m_path+=dlg.m_id; dlg.m_path +="\\"; dlg.DoModal (); }