Пример #1
0
void RtsForm::ShowStartUI(bool creater)
{
	need_ack_ = !creater;
	if (creater)
	{
		ShowTip(L"正在邀请对方,请稍后");
	} 
	else
	{
		ShowTip(L"邀请你加入白板");
		show_endmsg_ = true;
	}
	Control* accept = FindControl(L"btn_accept");
	accept->SetVisible(!creater);
	Control* reject = FindControl(L"btn_reject");
	reject->SetVisible(!creater);
	Control* cancel = FindControl(L"btn_cancel");
	cancel->SetVisible(creater);

	if (creater)
	{
		nim::Rts::StartChannelCallback cb = nbase::Bind(&RtsForm::OnStartRtsCb, this, session_id_, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4);
		nim::Rts::StartChannel(type_, uid_, nbase::UTF16ToUTF8(L"白板通话邀请test"), "rts custom info", cb);
	}
	auto closure = nbase::Bind(&RtsForm::NoActiveTimer, this);
	nbase::ThreadManager::PostDelayedTask(kThreadUI, closure, nbase::TimeDelta::FromSeconds(40));
}
Пример #2
0
void RtsForm::OnMemberNotifyCallback(const std::string& session_id, int channel_type, const std::string& uid, int code)
{
	if (session_id == session_id_)
	{
		switch (channel_type)
		{
		case nim::kNIMRtsChannelTypeTcp:
			if (code == nim::kNIMRtsMemberStatusJoined)
			{
				ShowTip(L"正在会话");
			}
			else
			{
				ShowTip(L"对方离开");
				DelayClose();
			}
			break;
		case nim::kNIMRtsChannelTypeVchat:
			if (code != nim::kNIMRtsMemberStatusJoined)
			{
				SetAudioStatus(false);
			}
			break;
		default:
			break;
		}
	}
}
BOOL CXTPSyntaxEditTipListBox::PreTranslateMessage(MSG* pMsg)
{
	UINT uMessage = pMsg->message;

	switch (uMessage)
	{
	case WM_MOUSEMOVE:
		ShowTip(pMsg->pt);
		break;

	case WM_LBUTTONDOWN:
		//m_dwIdx = (DWORD)MAKELONG(GetCurSel(), HIWORD(m_dwIdx));
		ShowTip(pMsg->pt);
		break;

	case WM_LBUTTONUP:
		m_dwIdx = (DWORD)MAKELONG(GetCurSel(), HIWORD(m_dwIdx));
		//m_dwIdx = (DWORD)MAKELONG(LOWORD(m_dwIdx), GetCurSel());
		break;

	case WM_KEYDOWN:
	case WM_MOUSEWHEEL:
		m_wndInfoTip.HideTip();
		break;
	}

	return CListBox::PreTranslateMessage(pMsg);
}
Пример #4
0
 void STipCtrl::OnTimer( UINT_PTR idEvent )
 {
     switch(idEvent)
     {
     case TIMERID_DELAY:
         KillTimer(TIMERID_DELAY);       
         ShowTip(TRUE);
         SetTimer(TIMERID_SPAN,m_nShowSpan);
         break;
     case TIMERID_SPAN:
         ShowTip(FALSE);
         KillTimer(TIMERID_SPAN);
         break;
     }
 }
Пример #5
0
void RtsForm::OnSyncAckNotifyCallback(const std::string& session_id, int channel_type, bool accept)
{
	if (session_id == session_id_)
	{
		if (accept)
		{
			ShowTip(L"已在其他端接受");
		} 
		else
		{
			ShowTip(L"已在其他端拒绝");
		}
		DelayClose();
	}
}
Пример #6
0
void RtsForm::OnAckNotifyCallback(const std::string& session_id, int channel_type, bool accept, const std::string& uid)
{
	if (session_id == session_id_)
	{
		if (accept)
		{
			ShowTip(L"正在连接");
			ShowBoardUI();
		} 
		else
		{
			ShowTip(L"对方拒绝");
			DelayClose();
		}
	}
}
Пример #7
0
//callback
void RtsForm::OnAckCallback(nim::NIMResCode res_code, const std::string& session_id, int channel_type, bool accept)
{
	if (session_id == session_id_)
	{
		if (res_code == nim::kNIMResSuccess)
		{
			ShowTip(L"正在连接");
			ShowBoardUI();
		} 
		else
		{
			ShowTip(L"接受失败");
			DelayClose();
		}
	}
}
Пример #8
0
BOOL CHokanMgr::OnSize( WPARAM wParam, LPARAM lParam )
{
	/* 基底クラスメンバ */
	CDialog::OnSize( wParam, lParam );

	int	Controls[] = {
		IDC_LIST_WORDS
	};
	int		nControls = _countof( Controls );
	int		nWidth;
	int		nHeight;
	int		i;
	RECT	rc;
	HWND	hwndCtrl;
	POINT	po;
	RECT	rcDlg;


	::GetClientRect( GetHwnd(), &rcDlg );
	nWidth = rcDlg.right - rcDlg.left;  // width of client area
	nHeight = rcDlg.bottom - rcDlg.top; // height of client area

//	2001/06/18 Start by asa-o: サイズ変更後の位置を保存
	m_poWin.x = rcDlg.left - 4;
	m_poWin.y = rcDlg.top - 3;
	::ClientToScreen(GetHwnd(),&m_poWin);
//	2001/06/18 End

	for ( i = 0; i < nControls; ++i ){
		hwndCtrl = GetItemHwnd( Controls[i] );
		::GetWindowRect( hwndCtrl, &rc );
		po.x = rc.left;
		po.y = rc.top;
		::ScreenToClient( GetHwnd(), &po );
		rc.left = po.x;
		rc.top  = po.y;
		po.x = rc.right;
		po.y = rc.bottom;
		::ScreenToClient( GetHwnd(), &po );
		rc.right = po.x;
		rc.bottom  = po.y;
		if( Controls[i] == IDC_LIST_WORDS ){
			::SetWindowPos(
				hwndCtrl,
				NULL,
				rc.left,
				rc.top,
				nWidth - rc.left * 2,
				nHeight - rc.top * 2/* - 20*/,
				SWP_NOOWNERZORDER | SWP_NOZORDER
			);
		}
	}

//	2001/06/18 asa-o:
	ShowTip();	// 補完ウィンドウで選択中の単語にキーワードヘルプを表示

	return TRUE;

}
Пример #9
0
void RtsForm::OnHangupNotifyCallback(const std::string& session_id, const std::string& uid)
{
	if (session_id == session_id_)
	{
		ShowTip(L"对方挂断");
		DelayClose();
	}
}
Пример #10
0
void RtsForm::NoActiveTimer()
{
	if (!talking_)
	{
		ShowTip(L"等待超时");
		DelayClose();
	}
}
Пример #11
0
void CDuiTipCtrl::UpdateTip(CRect rc, LPCTSTR pszTip,BOOL bText/*=TRUE*/ )
{
    m_rcTarget=rc;
    m_bTextTip=bText;
    m_strTip=pszTip;
	m_strTip.Replace(_T("\\n"),_T("\r"));
    if(IsWindowVisible())
    {
        ShowTip(TRUE);
    }
}
Пример #12
0
//
//  FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM)
//
//  PURPOSE:  Processes messages for the main window.
//
//  WM_COMMAND	- process the application menu
//  WM_PAINT	- Paint the main window
//  WM_DESTROY	- post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	int wmId, wmEvent;
	PAINTSTRUCT ps;
	HDC hdc;

	switch (message)
	{
	case MY_NOTIFY_ICON_MESSAGE_ID: {
										auto what = LOWORD(lParam);
										switch (what) {
										case NIN_SELECT:
											PostQuitMessage(0);
											break;
										case NIN_KEYSELECT:
										case WM_CONTEXTMENU:
											return DefWindowProc(hWnd, message, wParam, lParam);
										}
	}
	case WM_COMMAND:
		wmId    = LOWORD(wParam);
		wmEvent = HIWORD(wParam);
		// Parse the menu selections:
		switch (wmId)
		{
		case IDM_ABOUT:
			DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
			break;
		case IDM_EXIT:
			DestroyWindow(hWnd);
			break;
		default:
			return DefWindowProc(hWnd, message, wParam, lParam);
		}
		break;
	case WM_PAINT:
		hdc = BeginPaint(hWnd, &ps);
		// TODO: Add any drawing code here...
		EndPaint(hWnd, &ps);
		break;
	case WM_DESTROY:
		PostQuitMessage(0);
		break;
	case WM_HOTKEY:
		myState = !myState;
		ShowTip(myState);
		break;
	default:
		return DefWindowProc(hWnd, message, wParam, lParam);
	}
	return 0;
}
Пример #13
0
	virtual void MessageReceived(BMessage* msg)
	{
		switch( msg->what ) {
			case 'anim':
				//printf("--> Animate.\n");
				fCurAlpha += .05;
				if( fCurAlpha >= fDestAlpha ) {
					delete fAnim;
					fAnim = 0;
					delete fBackPic;
					fBackPic = 0;
					delete fForePic;
					fForePic = 0;
					printf("fAnim=%p, fBackPic=%p, fForePic=%p\n",
							fAnim, fBackPic, fForePic);
					if( fTip->Window() ) {
						fTip->RemoveSelf();
					}
					fDrawer.AddChild(fTip);
					return;
				}
				
				//printf("Drawing with alpha=%f, tipWin=%p\n",
				//		fCurAlpha, fTip->Window());
				mix_bitmaps(fMixPic, fBackPic, fForePic,
							(uint8)(255*fCurAlpha+.5));
				fDrawer.DrawBitmap(fMixPic);
				#if 0
				fDrawer.PushState();
				fDrawer.SetDrawingMode(B_OP_COPY);
				fDrawer.DrawBitmap(fBackPic);
				fDrawer.SetDrawingMode(B_OP_ALPHA);
				fDrawer.SetBlendingMode(B_CONSTANT_ALPHA, B_ALPHA_OVERLAY);
				fDrawer.SetHighColor(0, 0, 0, (uchar)(255*fCurAlpha));
				//fDrawer.FillRect(fDrawer.Bounds());
				fDrawer.DrawBitmap(fForePic);
				fDrawer.PopState();
				fDrawer.Sync();
				#endif
				break;
				
			case 'puls':
				//printf("--> Pulse.\n");
				ShowTip();
				break;
				
			default:
				inherited::MessageReceived(msg);
				break;
		}
	}
Пример #14
0
void RtsForm::OnConnectNotifyCallback(const std::string& session_id, int channel_type, int code, const std::string& json)
{
	if (session_id == session_id_)
	{
		if (channel_type == nim::kNIMRtsChannelTypeTcp)
		{
			if (code == nim::kNIMRtsConnectStatusSuccess)
			{
				ShowTip(L"链接成功,等待对方进入");
				talking_ = true;
			}
			else
			{
				ShowTip(L"链接失败");
				DelayClose();
			}
		}
		else if (channel_type == nim::kNIMRtsChannelTypeVchat)
		{
			SetAudioStatus(code == nim::kNIMRtsConnectStatusSuccess);
		}
	}
}
Пример #15
0
void CGraphListCtrl::OnMouseMove(UINT nFlags, CPoint point)
{
	do
	{
		CRect rc;
		GetClientRect(rc);
		if (!rc.PtInRect(point))
		{
			break;
		}

		m_nMouseItem = GetItemByPoint(point);
		if (m_nMouseItem == m_nOldMouseItem)
		{
			break;
		}

		if (m_nOldMouseItem > -1)
		{
			HideTip();
// 			::SetCapture(NULL);
		}

		if (m_nMouseItem < 0)
		{
			m_nOldMouseItem = m_nMouseItem;
			break;
		}

		if(m_bShowCaption && (m_nMouseItem >= 0))
		{
			int nVertScroll = GetScrollPos(SB_VERT), 
				nHorzScroll = GetScrollPos(SB_HORZ);

			CString str;
			CRect rt = GetItemRect(m_nMouseItem);
			rt.OffsetRect(-nHorzScroll, -nVertScroll);
			CRect rtCaption = rt;
			int iWide = m_nCaptionHeight;
			//if( rtCaption.Height()>iWide)rtCaption.top += iWide;		
			rtCaption.top = rtCaption.bottom-iWide;
			CString strName = GetItem(m_nMouseItem)->GetName(); 
			ShowTip(rtCaption, strName, rt);
		}

		m_nOldMouseItem = m_nMouseItem;
	} while (false);

	CWnd::OnMouseMove(nFlags, point);
}
Пример #16
0
void RtsForm::StartResult(nim::NIMResCode code, std::string session_id)
{
	session_id_ = session_id;
	if (code == nim::kNIMResSuccess)
	{
		//ShowTip(L"等待对方接受");
		SendCreateMsg();
	} 
	else
	{
		ShowTip(L"发起失败");
		DelayClose();
	}
}
Пример #17
0
bool CToolTip::HandleMessage(CMessage* pMessage)
{
	bool bHandled = false;

	if (pMessage)
	{
		switch(pMessage->MessageType())
		{
			case CMessage::CTRL_TIMER:
			{
				wGui::TIntMessage* pTimerMessage = dynamic_cast<wGui::TIntMessage*>(pMessage);
				if (pTimerMessage && pMessage->Destination() == this)
				{
					// Timer has expired, so it's time to show the tooltip
					ShowTip(m_LastMousePosition + CPoint(-6, 18));
					bHandled = true;
				}
				break;
			}
		case CMessage::MOUSE_MOVE:
		{
			// We don't want to mess with the underlying control, so don't trap any MOUSE_MOVE messages
			CMouseMessage* pMouseMessage = dynamic_cast<CMouseMessage*>(pMessage);
			if (pMouseMessage)
			{
				m_LastMousePosition = pMouseMessage->Point;
				m_pTimer->StopTimer();
				if (IsVisible())
				{
					HideTip();
				}
				CView* pView = GetView();
				bool bHitFloating = pView && pView->GetFloatingWindow() && pView->GetFloatingWindow()->HitTest(pMouseMessage->Point) &&
					pView->GetFloatingWindow() != m_pParentWindow;
				if (m_pParentWindow->GetWindowRect().SizeRect().HitTest(
					m_pParentWindow->ViewToWindow(m_LastMousePosition)) == CRect::RELPOS_INSIDE && !bHitFloating)
				{
					m_pTimer->StartTimer(1000);
				}
			}
		}
		default :
			bHandled = CWindow::HandleMessage(pMessage);
			break;
		}
	}

	return bHandled;
}
Пример #18
0
void CSettingDlg::OnEarthEditKillFocus()
{
	if (CConfManager::Instance()->EarthCode() == m_pEarthEdit->GetText().GetData())
	{
		return;
	}

	CConfManager::Instance()->EarthCode(m_pEarthEdit->GetText().GetData());
	if (!CConfManager::Instance()->IsWuHangDefaultValue())
	{
		CConfManager::Instance()->NeedHintConfigureWuHang(false);
	}

	//37=保存成功
	ShowTip(CLanguageManager::Instance()->LoadString(37), 1000, m_pEarthEdit);
}
Пример #19
0
	TipWindow()
		: BWindow(BRect(-100, -100, -90, -90),
				  "Tool Tip",
				  B_NO_BORDER_WINDOW_LOOK,
				  B_FLOATING_ALL_WINDOW_FEEL,
				  B_AVOID_FOCUS|B_NO_WORKSPACE_ACTIVATION
				  |B_WILL_ACCEPT_FIRST_CLICK|B_ASYNCHRONOUS_CONTROLS),
		  fDrawer(Bounds(), "drawer", B_FOLLOW_ALL, B_WILL_DRAW),
          fRunner(0), fAnim(0), fTip(0),
          fBackPic(0), fForePic(0), fMixPic(0)
	{
		fDrawer.SetViewColor(B_TRANSPARENT_COLOR);
		AddChild(&fDrawer);
		//Minimize(true);
		Run();
		//Show();
		ShowTip();
	}
Пример #20
0
bool MyDocEdit::Key(dword key, int count)
{
	switch(key & ~(K_CTRL | K_ALT | K_SHIFT)) {
		case K_ENTER:
			RunCommand(inputString);
			inputString.Clear();
			if(GetLineCount() > MAX_CACHE_LINE)
				Remove(0, GetPos(GetLineCount() - MAX_CACHE_LINE));
			ShowTip();
			return true;
		default:
			if(!(key & 0x10000) &&  !(key & 0x110000)) { 
				inputString +=(char)key;
			}
			break;
	}
	
	return DocEdit::Key(key, count);
}
Пример #21
0
//
//   FUNCTION: InitInstance(HINSTANCE, int)
//
//   PURPOSE: Saves instance handle and creates main window
//
//   COMMENTS:
//
//        In this function, we save the instance handle in a global variable and
//        create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
   HWND hWnd;

   hInst = hInstance; // Store instance handle in our global variable

   hWnd = CreateWindowEx(WS_EX_TOOLWINDOW, szWindowClass, szTitle, WS_POPUP,
	   CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);

   if (!hWnd)
   {
      return FALSE;
   }

   RegisterHotKey(hWnd, 1, MOD_ALT | MOD_CONTROL, '3'); // TODO cleanup
   g_hook = SetWindowsHookEx(WH_KEYBOARD_LL, &KeyboardHook, hInst, 0);
   g_hwnd = hWnd;

   ShowWindow(hWnd, SW_HIDE);
   UpdateWindow(hWnd);

   NOTIFYICONDATA nid = {};
   ZeroMemory(&nid, sizeof(NOTIFYICONDATA));
   nid.cbSize = sizeof(NOTIFYICONDATA);
   nid.uID = MY_NOTIFICATION_ICON;
   nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP | NIF_SHOWTIP;
   nid.hWnd = hWnd;
   nid.uVersion = NOTIFYICON_VERSION_4;
   nid.uCallbackMessage = MY_NOTIFY_ICON_MESSAGE_ID;

   g_icons[0] = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SMALL));
   g_icons[1] = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SMALL_ACTIVE));

   nid.hIcon = g_icons[0];
   HRESULT sniHr = Shell_NotifyIcon(NIM_ADD, &nid);
   nid.uFlags = 0;
   sniHr = Shell_NotifyIcon(NIM_SETVERSION, &nid);

   ShowTip(FALSE);

   return TRUE;
}
Пример #22
0
void
DTipWatcherView::Pulse(void)
{
	// Check to see if there has been any activity. If so, just reset.
	BPoint pt;
	uint32 buttons;
	GetMouse(&pt,&buttons);
	ConvertToScreen(&pt);
	
	if (pt != fLastPoint || buttons)
	{
		fDelayCounter = 0;
		fLastPoint = pt;
		HideTip();
		return;
	}
	fLastPoint = pt;
	
	if (!Window()->IsHidden())
		return;
	
	fDelayCounter += Window()->PulseRate();
	if (fDelayCounter < fDelayMax)
		return;
	
	// We got this far, so it's time to show a tip
	BView *view = ViewForPoint(pt);
	if (!view)
		return;
	
	BString text = GetTip(view);
	if (text.CountChars() < 1)
		return;
	
	ShowTip(pt, text.String());
}
Пример #23
0
    void STipCtrl::UpdateTip(const TIPID &id, CRect rc,LPCTSTR pszTip, int nScale)
    {
        if(m_id.dwHi == id.dwHi && m_id.dwLow== id.dwLow) return;

        m_id = id;
        m_rcTarget=rc;
        m_strTip=pszTip;
        if (m_nScale != nScale)
        {
            if (m_font) DeleteObject(m_font);
            LOGFONT lf;
            GetObject(GetStockObject(DEFAULT_GUI_FONT), sizeof(lf), &lf);
            lf.lfHeight = -12 * nScale / 100;
            _tcscpy(lf.lfFaceName, _T("宋体"));
            m_font = CreateFontIndirect(&lf);
            m_nScale = nScale;
        }
        m_strTip.Replace(_T("\\n"),_T("\n"));

        if(IsWindowVisible())
        {
            ShowTip(TRUE);
        }
    }
Пример #24
0
MyDocEdit::MyDocEdit()
{
		ShowTip();
}
Пример #25
0
int ShowTipHook(WPARAM wParam, LPARAM lParam) {
    ShowTip(wParam, lParam);
    return 0;
}
Пример #26
0
/*!	初期化
	pcmemHokanWord == NULLのとき、補完候補がひとつだったら、補完ウィンドウを表示しないで終了します。
	Search()呼び出し元で確定処理を進めてください。

	@date 2002.2.17 YAZAKI CShareDataのインスタンスは、CProcessにひとつあるのみ。
*/
int CHokanMgr::Search(
	POINT*			ppoWin,
	int				nWinHeight,
	int				nColumnWidth,
	const wchar_t*	pszCurWord,
	const TCHAR*	pszHokanFile,
	bool			bHokanLoHiCase,	// 入力補完機能:英大文字小文字を同一視する 2001/06/19 asa-o
	bool			bHokanByFile,	// 編集中データから候補を探す 2003.06.23 Moca
	int				nHokanType,
	bool			bHokanByKeyword,
	CNativeW*		pcmemHokanWord	// 2001/06/19 asa-o
)
{
	CEditView* pcEditView = reinterpret_cast<CEditView*>(m_lParam);

	/* 共有データ構造体のアドレスを返す */
	m_pShareData = &GetDllShareData();

	/*
	||  補完キーワードの検索
	||
	||  ・見つかった候補をすべて返す(改行で区切って返す)
	||  ・指定された候補の最大数を超えると処理を中断する
	||  ・見つかった数を返す
	||
	*/
	m_vKouho.clear();
	CDicMgr::HokanSearch(
		pszCurWord,
		bHokanLoHiCase,								// 引数からに変更	2001/06/19 asa-o
		m_vKouho,
		0, //Max候補数
		pszHokanFile
	);

	// 2003.05.16 Moca 追加 編集中データ内から候補を探す
	if( bHokanByFile ){
		pcEditView->HokanSearchByFile(
			pszCurWord,
			bHokanLoHiCase,
			m_vKouho,
			1024 // 編集中データからなので数を制限しておく
		);
	}
	// 2012.10.13 Moca 強調キーワードから候補を探す
	if( bHokanByKeyword ){
		HokanSearchByKeyword(
			pszCurWord,
			bHokanLoHiCase,
			m_vKouho
		);
	}

	{
		int nOption = (
			  (bHokanLoHiCase ? 0x01 : 0)
			  | (bHokanByFile ? 0x02 : 0)
			);
		
		CPlug::Array plugs;
		CPlug::Array plugType;
		CJackManager::getInstance()->GetUsablePlug( PP_COMPLEMENTGLOBAL, 0, &plugs );
		if( nHokanType != 0 ){
			CJackManager::getInstance()->GetUsablePlug( PP_COMPLEMENT, nHokanType, &plugType );
			if( 0 < plugType.size() ){
				plugs.push_back( plugType[0] );
			}
		}

		for( auto it = plugs.begin(); it != plugs.end(); ++it ){
			//インタフェースオブジェクト準備
			CWSHIfObj::List params;
			std::wstring curWord = pszCurWord;
			CComplementIfObj* objComp = new CComplementIfObj( curWord , this, nOption );
			objComp->AddRef();
			params.push_back( objComp );
			//プラグイン呼び出し
			(*it)->Invoke( pcEditView, params );

			objComp->Release();
		}
	}

	if( 0 == m_vKouho.size() ){
		m_nCurKouhoIdx = -1;
		return 0;
	}

//	2001/06/19 asa-o 候補が1つの場合補完ウィンドウは表示しない(逐次補完の場合は除く)
	if( 1 == m_vKouho.size() ){
		if(pcmemHokanWord != NULL){
			m_nCurKouhoIdx = -1;
			pcmemHokanWord->SetString( m_vKouho[0].c_str() );
			return 1;
		}
	}



//	m_hFont = hFont;
	m_poWin.x = ppoWin->x;
	m_poWin.y = ppoWin->y;
	m_nWinHeight = nWinHeight;
	m_nColumnWidth = nColumnWidth;
//	m_cmemCurWord.SetData( pszCurWord, lstrlen( pszCurWord ) );
	m_cmemCurWord.SetString( pszCurWord );


	m_nCurKouhoIdx = 0;
//	SetCurKouhoStr();



//	::ShowWindow( GetHwnd(), SW_SHOWNA );







	HWND hwndList;
	hwndList = GetItemHwnd( IDC_LIST_WORDS );
	List_ResetContent( hwndList );
	{
		size_t kouhoNum = m_vKouho.size();
		for( size_t i = 0; i < kouhoNum; ++i ){
			::List_AddString( hwndList, m_vKouho[i].c_str() );
		}
	}
	List_SetCurSel( hwndList, 0 );


//@@	::EnableWindow( ::GetParent( ::GetParent( m_hwndParent ) ), FALSE );


	int nX;
	int nY;
	int nCX;
	int nCY;
	RECT	rcDesktop;
	//	May 01, 2004 genta マルチモニタ対応
	::GetMonitorWorkRect( GetHwnd(), &rcDesktop );

	nX = m_poWin.x - m_nColumnWidth;
	nY = m_poWin.y + m_nWinHeight + 4;
	nCX = m_nWidth;
	nCY = m_nHeight;

	/* 下に入るなら */
	if( nY + nCY < rcDesktop.bottom ){
		/* 何もしない */
	}else
	/* 上に入るなら */
	if( rcDesktop.top < m_poWin.y - m_nHeight - 4 ){
		/* 上に出す */
		nY = m_poWin.y - m_nHeight - 4;
	}else
	/* 上に出すか下に出すか(広いほうに出す) */
	if(	rcDesktop.bottom - nY > m_poWin.y ){
		/* 下に出す */
//		m_nHeight = rcDesktop.bottom - nY;
		nCY = rcDesktop.bottom - nY;
	}else{
		/* 上に出す */
		nY = rcDesktop.top;
		nCY = m_poWin.y - 4 - rcDesktop.top;
	}

//	2001/06/19 Start by asa-o: 表示位置補正

	// 右に入る
	if(nX + nCX < rcDesktop.right ){
		// そのまま
	}else
	// 左に入る
	if(rcDesktop.left < nX - nCX + 8){
		// 左に表示
		nX -= nCX - 8;
	}else{
		// サイズを調整して右に表示
		nCX = t_max((int)(rcDesktop.right - nX) , 100);	// 最低サイズを100くらいに
	}

//	2001/06/19 End

//	2001/06/18 Start by asa-o: 補正後の位置・サイズを保存
	m_poWin.x = nX;
	m_poWin.y = nY;
	m_nHeight = nCY;
	m_nWidth = nCX;
//	2001/06/18 End

	/* はみ出すなら小さくする */
//	if( rcDesktop.bottom < nY + nCY ){
//		/* 下にはみ出す */
//		if( m_poWin.y - 4 - nCY < 0 ){
//			/* 上にはみ出す */
//			/* →高さだけ調節 */
//			nCY = rcDesktop.bottom - nY - 4;
//		}else{
//
//		}
//
//	}
	::MoveWindow( GetHwnd(), nX, nY, nCX, nCY, TRUE );
	::ShowWindow( GetHwnd(), SW_SHOWNA );


//	2001/06/18 asa-o:
	ShowTip();	// 補完ウィンドウで選択中の単語にキーワードヘルプを表示

//	2003.06.25 Moca 他のメソッドで使っていないので、とりあえず削除しておく
	int kouhoNum = m_vKouho.size();
	m_vKouho.clear();
	return kouhoNum;
}
Пример #27
0
 void STipCtrl::ClearTip()
 {
     m_id.dwHi = m_id.dwLow =0;
     ShowTip(FALSE);
 }
Пример #28
0
BOOL CHokanMgr::OnLbnSelChange( HWND hwndCtl, int wID )
{
//	2001/06/18 asa-o:
	ShowTip();	// 補完ウィンドウで選択中の単語にキーワードヘルプを表示
	return TRUE;
}