• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ HWND函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中HWND函数的典型用法代码示例。如果您正苦于以下问题:C++ HWND函数的具体用法?C++ HWND怎么用?C++ HWND使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了HWND函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: OnShell

LRESULT CMainDlg::OnShell(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	CString strDebug, strTitle;
	CWnd* pwnd;
	if(::IsWindow(HWND(lParam)))
	{
		pwnd = CWnd::FromHandle(HWND(lParam));
		pwnd->GetWindowText(strTitle);
	}
	switch (wParam)
	{
	case HSHELL_WINDOWCREATED:
		strDebug.Format("Window[%08X] - %s created!\n", lParam, strTitle);
		break;
	case HSHELL_WINDOWDESTROYED:
		strDebug.Format("Window[%08X] - %s destroyed!\n", lParam, strTitle);
		break;
	case HSHELL_WINDOWACTIVATED:
		strDebug.Format("Window[%08X] - %s activated!\n", lParam, strTitle);
		break;
	default:
		strDebug.Format("%08X, %08X\n", wParam, lParam);
		break;
	}
	Log(strDebug);
	return 0;
}
开发者ID:harrysun2006,项目名称:07_ShellHook,代码行数:27,代码来源:MainDlg.cpp


示例2: switch

HRESULT TblurPage::msgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
 switch (uMsg)
  {
   case WM_HSCROLL:
    if (HWND(lParam)==GetDlgItem(m_hwnd,IDC_TBR_BLUR_STRENGTH) || HWND(lParam)==GetDlgItem(m_hwnd,IDC_TBR_BLUR_TEMPSMOOTH))
     {
      cfgSet(IDFF_blurStrength,SendDlgItemMessage(m_hwnd,IDC_TBR_BLUR_STRENGTH  ,TBM_GETPOS,0,0));
      cfgSet(IDFF_tempSmooth  ,SendDlgItemMessage(m_hwnd,IDC_TBR_BLUR_TEMPSMOOTH,TBM_GETPOS,0,0));
      blur2dlg();
      return TRUE;
     }
    break;
   case WM_COMMAND:
    switch (LOWORD(wParam))  
     {
      case IDC_CHB_BLUR:
       setInter(getCheck(IDC_CHB_BLUR));
       parent->drawInter();
       return TRUE;
     }
    break;
  }
 return FALSE;
}
开发者ID:BackupTheBerlios,项目名称:ffdshow-svn,代码行数:25,代码来源:Cblur.cpp


示例3: MapHDDWinM_OnCommand

//------------------------------------------------------------------------------

#pragma argsused
static void MapHDDWinM_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT CodeNotify)
{
   switch(id)
   {
#if defined TEST_FAT1_VOST                                 //Проверка и восстановление FAT1 на потерянные кластеры
      case IDC_VOST: Vost_FAT1();                          //Чистка FAT1 от потерянных кластеров
                     break;
#endif
      case IDOK:  DestroyWindow(hwnd);
                  break;
   }
}

//------------------------------------------------------------------------------

#pragma argsused
static LRESULT CALLBACK WndProc_MapHDD_W1(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
   switch(Msg)
   {
      HANDLE_MSG(hwnd, WM_PAINT, MapHDDWin1_OnPaint);
      default: return DefWindowProc(hwnd, Msg, wParam, lParam);
  }
}

//------------------------------------------------------------------------------

#pragma argsused
static void MapHDDWinM_OnDestroy(HWND hwnd)
{
开发者ID:mpapierski,项目名称:from-hdd-lg-to-pc,代码行数:33,代码来源:hdd_lg_map_hdd.cpp


示例4: ATLASSERT

BOOL CTrayIconHooker::Init(CTrayNotifyIcon* pTrayIcon, CWindow* pNotifyWnd)
#endif
{
    //Validate our parameters
    ATLASSERT(pTrayIcon); //must have a valid tray notify instance
#ifdef _AFX
    ATLASSERT(pNotifyWnd && ::IsWindow(pNotifyWnd->GetSafeHwnd()));
#else
    ATLASSERT(pNotifyWnd && pNotifyWnd->IsWindow());
#endif

    //Hive away the input parameter
    m_pTrayIcon = pTrayIcon;

    //Hook the top level frame of the notify window in preference
    //to the notify window itself. This will ensure that we get
    //the taskbar created message
#ifdef _AFX
    CWnd* pTopLevelWnd = pNotifyWnd->GetTopLevelFrame();
    if (pTopLevelWnd)
        return SubclassWindow(pTopLevelWnd->operator HWND());
    else
        return SubclassWindow(pNotifyWnd->GetSafeHwnd());
#else
    CWindow TopLevelWnd = pNotifyWnd->GetTopLevelWindow();
    if (TopLevelWnd.IsWindow())
        return SubclassWindow(TopLevelWnd.operator HWND());
    else
        return SubclassWindow(pNotifyWnd->m_hWnd);
#endif
}
开发者ID:uvbs,项目名称:SupportCenter,代码行数:31,代码来源:TrayNotifyIcon.cpp


示例5: switch

HRESULT ToffsetPage::msgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
 switch (uMsg)
  {
   case WM_HSCROLL:
    if (HWND(lParam)==GetDlgItem(m_hwnd,IDC_TBR_OFFSETY_X) || HWND(lParam)==GetDlgItem(m_hwnd,IDC_TBR_OFFSETY_Y) || HWND(lParam)==GetDlgItem(m_hwnd,IDC_TBR_OFFSETUV_X) || HWND(lParam)==GetDlgItem(m_hwnd,IDC_TBR_OFFSETUV_Y))
     {
      cfgSet(IDFF_offsetY_X,SendDlgItemMessage(m_hwnd,IDC_TBR_OFFSETY_X ,TBM_GETPOS,0,0));
      cfgSet(IDFF_offsetY_Y,SendDlgItemMessage(m_hwnd,IDC_TBR_OFFSETY_Y ,TBM_GETPOS,0,0));
      cfgSet(IDFF_offsetU_X,SendDlgItemMessage(m_hwnd,IDC_TBR_OFFSETUV_X,TBM_GETPOS,0,0));
      cfgSet(IDFF_offsetU_Y,SendDlgItemMessage(m_hwnd,IDC_TBR_OFFSETUV_Y,TBM_GETPOS,0,0));
      cfgSet(IDFF_offsetV_X,SendDlgItemMessage(m_hwnd,IDC_TBR_OFFSETUV_X,TBM_GETPOS,0,0));
      cfgSet(IDFF_offsetV_Y,SendDlgItemMessage(m_hwnd,IDC_TBR_OFFSETUV_Y,TBM_GETPOS,0,0));
      offset2dlg();
      return TRUE;
     }
    break;
   case WM_COMMAND:
    switch (LOWORD(wParam))  
     {
      case IDC_CHB_OFFSET:
       cfgSet(IDFF_isOffset,getCheck(IDC_CHB_OFFSET));
       parent->drawInter();
       return TRUE;
     }
    break;
  }
 return FALSE;
}
开发者ID:BackupTheBerlios,项目名称:ffdshow-svn,代码行数:29,代码来源:Coffset.cpp


示例6: WndProc

static LRESULT CALLBACK WndProc(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
   switch(Msg)
   {  case WM_CTLCOLORSTATIC:
        if(HWND(lParam) == hNumSel || HWND(lParam) == hSizeSel)
        {  SetTextColor((HDC)wParam, RGB(0, 0, 200));
           SetBkColor((HDC)wParam, FonLTGRAY);
           return (BOOL)FonBrush;
        }
        if(HWND(lParam) == hPrShift)
        {  SetTextColor((HDC)wParam, RGB(255, 255, 255));
  //       SetBkColor((HDC)wParam, FonLTGRAY);
           SetBkColor((HDC)wParam, RGB(180,0,0));
           return (BOOL)FonBrush;
        }
        if(HWND(lParam) == hSizeHDD)
        {  SetTextColor((HDC)wParam, RGB(0, 80, 0));
           SetBkColor((HDC)wParam, FonLTGRAY);
           return (BOOL)FonBrush;
        }
        return TRUE;
     HANDLE_MSG(hwnd, WM_CREATE,  M_Win_OnCreate);
     HANDLE_MSG(hwnd, WM_CLOSE,   M_Win_OnClose);
     HANDLE_MSG(hwnd, WM_DESTROY, M_Win_OnDestroy);
//   HANDLE_MSG(hwnd, WM_PAINT,   Decod_OnPaint);
     HANDLE_MSG(hwnd, WM_COMMAND, M_Win_OnCommand);
     HANDLE_MSG(hwnd, WM_NOTIFY,  M_Win_OnNotify);
     HANDLE_MSG(hwnd, WM_SIZE,    M_Win_Size);               //Изменение размеров окна
     HANDLE_MSG(hwnd, WM_WINDOWPOSCHANGING, NoPosChanged);   //Изменение положения окна
     default: return DefWindowProc(hwnd, Msg, wParam, lParam);
  }
}
开发者ID:mpapierski,项目名称:from-hdd-lg-to-pc,代码行数:32,代码来源:from_hdd_lg_to_pc.cpp


示例7: switch

HRESULT TpictPropPage::msgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
 switch (uMsg)
  {
   case WM_HSCROLL:
    if (HWND(lParam)==GetDlgItem(m_hwnd,IDC_TBR_LUMGAIN) || HWND(lParam)==GetDlgItem(m_hwnd,IDC_TBR_LUMOFFSET) || HWND(lParam)==GetDlgItem(m_hwnd,IDC_TBR_GAMMA))
     {
      cfgSet(IDFF_lumGain,writeLumGain(SendDlgItemMessage(m_hwnd,IDC_TBR_LUMGAIN,TBM_GETPOS,0,0)));
      cfgSet(IDFF_lumOffset,writeLumOffset(SendDlgItemMessage(m_hwnd,IDC_TBR_LUMOFFSET,TBM_GETPOS,0,0))-256);
      cfgSet(IDFF_gammaCorrection,writeGamma(SendDlgItemMessage(m_hwnd,IDC_TBR_GAMMA,TBM_GETPOS,0,0)));
      return TRUE;
     }
    else if (HWND(lParam)==GetDlgItem(m_hwnd,IDC_TBR_HUE) || HWND(lParam)==GetDlgItem(m_hwnd,IDC_TBR_SATURATION))
     {
      cfgSet(IDFF_hue,writeHue(SendDlgItemMessage(m_hwnd,IDC_TBR_HUE,TBM_GETPOS,0,0)));
      cfgSet(IDFF_saturation,writeSaturation(SendDlgItemMessage(m_hwnd,IDC_TBR_SATURATION,TBM_GETPOS,0,0)));
      return TRUE;
     }   
    break; 
   case WM_COMMAND:
    switch (LOWORD(wParam))  
     {
      case IDC_CHB_PICTPROP:
       setInter(getCheck(IDC_CHB_PICTPROP));
       parent->drawInter();
       return TRUE;
     }
    break;
  }   
 return FALSE;
}
开发者ID:BackupTheBerlios,项目名称:ffdshow-svn,代码行数:31,代码来源:CpictProp.cpp


示例8: LangSetWindowText

bool CPasswordDialog::OnInit() 
{
  #ifdef LANG        
  LangSetWindowText(HWND(*this), 0x02000B00);
  LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));
  #endif
  _passwordControl.Attach(GetItem(IDC_EDIT_PASSWORD));
  _passwordControl.SetText(Password);
  _passwordControl.SetPasswordChar(TEXT('*'));
  return CModalDialog::OnInit();
}
开发者ID:Ando02,项目名称:wubiuefi,代码行数:11,代码来源:PasswordDialog.cpp


示例9: LangSetWindowText

bool CPasswordDialog::OnInit()
{
  #ifdef LANG
  LangSetWindowText(HWND(*this), 0x02000B00);
  LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));
  #endif
  _passwordControl.Attach(GetItem(IDC_EDIT_PASSWORD));
  CheckButton(IDC_CHECK_PASSWORD_SHOW, ShowPassword);
  SetTextSpec();
  return CModalDialog::OnInit();
}
开发者ID:walrus8u,项目名称:extract,代码行数:11,代码来源:PasswordDialog.cpp


示例10: LangSetDlgItemsText

bool CListViewDialog::OnInit()
{
  #ifdef LANG
  LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));
  #endif
  _listView.Attach(GetItem(IDC_LISTVIEW_LIST));

  if (ReadSingleClick())
    _listView.SetExtendedListViewStyle(LVS_EX_ONECLICKACTIVATE | LVS_EX_TRACKSELECT);

  SetText(Title);

  LVCOLUMN columnInfo;
  columnInfo.mask = LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM;
  columnInfo.fmt = LVCFMT_LEFT;
  columnInfo.iSubItem = 0;
  columnInfo.cx = 200;

  _listView.InsertColumn(0, &columnInfo);

  for (int i = 0; i < Strings.Size(); i++)
    _listView.InsertItem(i, Strings[i]);

  if (Strings.Size() > 0)
    _listView.SetItemState_FocusedSelected(0);

  _listView.SetColumnWidthAuto(0);
  StringsWereChanged = false;

  NormalizeSize();
  return CModalDialog::OnInit();
}
开发者ID:Esika,项目名称:sevenzipjbinding,代码行数:32,代码来源:ListViewDialog.cpp


示例11: ASSERT

LRESULT CALLBACK Interpreter::CbtFilterHook(int code, WPARAM wParam, LPARAM lParam)
{
	// Looking for HCBT_CREATEWND, just pass others on...
	if (code == HCBT_CREATEWND)
	{
		//ASSERT(lParam != NULL);
		//LPCREATESTRUCT lpcs = ((LPCBT_CREATEWND)lParam)->lpcs;
		//ASSERT(lpcs != NULL);

		OTE* underConstruction = m_oteUnderConstruction;

		if (!underConstruction->isNil())
		{
			// Nil this out as soon as possible
			m_oteUnderConstruction = Pointers.Nil;
			underConstruction->countDown();

			ASSERT(wParam != NULL); // should be non-NULL HWND

			// set m_bDlgCreate to TRUE if it is a dialog box
			//  (this controls what kind of subclassing is done later)
			//pThreadState->m_bDlgCreate = (lpcs->lpszClass == WC_DIALOG);

			// Pass to Smalltalk for subclassing (catch unwind failures so not thrown out)
			subclassWindow(underConstruction, HWND(wParam));
		}
	}

	return ::CallNextHookEx(hHookOldCbtFilter, code, wParam, lParam);
}
开发者ID:krodelin,项目名称:DolphinVM,代码行数:30,代码来源:wingui.cpp


示例12: uint32

//
/// Returns the callback. If the window exists, the handle of the window is returned.
//
uint32
TMci::GetCallback() const
{
  if (Window)
    return uint32(HWND(*Window));
  return 0;
}
开发者ID:Darkman-M59,项目名称:Meridian59_115,代码行数:10,代码来源:mci.cpp


示例13: HWND

LRESULT CUIDialog::OnWindowsEnumNotify( WPARAM wparam, LPARAM )
{
	HWND hWnd = HWND( wparam );
	// 判断是本窗口的子窗口.
	if ( GetSafeHwnd() == ::GetParent( hWnd ) )
	{
		// 判断是不是menu_worker
		CString strClassName;
		::GetClassName( hWnd, strClassName.GetBuffer( 100 ), 100 );
		strClassName.ReleaseBuffer();
		if ( strClassName == _T("menu_worker") )
		{
			// 添加到menu记录中.
			this->m_tMenuWorkerWndList.push_back( hWnd );

			if ( this->HasCmd( FS_ShowMenuBar ) )
			{
				// 显示出来会盖住菜单,所以这里暂时不显示.
	//			::ShowWindow( hWnd, SW_SHOW );
				
			}
			else if( this->HasCmd( FS_HideMenuBar ) )
			{
				::ShowWindow( hWnd, SW_HIDE );
			}
		}
	}
	return TRUE;
}
开发者ID:dalinhuang,项目名称:ffmpeg-port,代码行数:29,代码来源:uidialog.cpp


示例14: Dlg_Warning

static BOOL CALLBACK Dlg_Warning(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam)
{
   switch(Message)
   {
      case WM_INITDIALOG:
             CenterDlg(hDlg, -80);                           //Центрирование окна диалога в главном окне
             SetWindowText(hDlg, (Lan+36)->msg);             //Вывели новый заголовок
             OutNameDlg(hDlg, IDC_STATICTEXT1, LPSTR(lParam));     //Усечение имени файла
             SetDlgItemText(hDlg, IDC_STATICTEXT2, (Lan+65)->msg);
             SetDlgItemText(hDlg, IDC_REWRITE, (Lan+66)->msg);
             SetDlgItemText(hDlg, IDC_NEW, (Lan+67)->msg);
             SetDlgItemText(hDlg, IDCANCEL, (Lan+68)->msg);
             return TRUE;
      case WM_CTLCOLORSTATIC:
             if(GetDlgCtrlID(HWND(lParam)) == IDC_STATICTEXT2)
             {  SetTextColor((HDC)wParam, RGB(255, 0, 0));
                SetBkColor((HDC)wParam, FonLTGRAY);
                return (BOOL)FonBrush;
             }
             return TRUE;
      case WM_COMMAND:
           switch(LOWORD(wParam))
           {  case IDC_REWRITE:
              case IDC_NEW:
              case IDCANCEL:    EndDialog(hDlg, LOWORD(wParam));  //Вернули один из трех кодов
                                return TRUE;
           }
           break;
   }
   return FALSE;
}
开发者ID:mpapierski,项目名称:from-hdd-lg-to-pc,代码行数:31,代码来源:hdd_lg_func_io_1.cpp


示例15: MenuBar

			MenuBar(Component* component) : Menu(new MenuAdapter(::CreateMenu())), _component(component)
			{
				if (component != App::getInstance())
					throw UserInterfaceException("Only the App component can currently have a MenuBar.");

				::SetMenu(HWND(component->getAdapter()->getHandle()), HMENU(getAdapter()->getHandle()));
			}
开发者ID:mitchdowd,项目名称:native,代码行数:7,代码来源:app.cpp


示例16: Q_UNUSED

/*!
  * Enables Blur behind on a Widget.
  *
  * \a enable tells if the blur should be enabled or not
  */
bool QtDWM::enableBlurBehindWindow(QWidget *widget, bool enable)
{
	Q_UNUSED(enable);
	Q_ASSERT(widget);
	bool result = false;
#ifdef Q_OS_WIN
	if (resolveLibs()) {
		DWM_BLURBEHIND bb = {0, 0, 0, 0};
		HRESULT hr = S_OK;
		bb.fEnable = enable;
		bb.dwFlags = DWM_BB_ENABLE;
		bb.hRgnBlur = NULL;
		widget->setAttribute(Qt::WA_TranslucentBackground, enable);
		widget->setAttribute(Qt::WA_NoSystemBackground, enable);
		hr = pDwmEnableBlurBehindWindow(HWND(widget->winId()), &bb);
		if (SUCCEEDED(hr)) {
			result = true;
				windowNotifier()->addWidget(widget, new BlurBehindManager(widget, &bb));
		}
	}
#else
	Q_UNUSED(widget);
	Q_UNUSED(enable);
#endif
	return result;
}
开发者ID:CyberSys,项目名称:qutim,代码行数:31,代码来源:qtdwm.cpp


示例17: Q_ASSERT

/*!
  * ExtendFrameIntoClientArea.
  *
  * This controls the rendering of the frame inside the window.
  * Note that passing margins of -1 (the default value) will completely
  * remove the frame from the window.
  *
  * \note you should not call enableBlurBehindWindow before calling
  *	   this functions
  *
  * \a enable tells if the blur should be enabled or not
  */
bool QtDWM::extendFrameIntoClientArea(QWidget *widget, int left, int top, int right, int bottom)
{
	Q_ASSERT(widget);
	bool result = false;
#ifdef Q_OS_WIN
	if (resolveLibs()) {
		QLibrary dwmLib(QString::fromUtf8("dwmapi"));
		HRESULT hr = S_OK;
		MARGINS m = {left, top, right, bottom};
		hr = pDwmExtendFrameIntoClientArea(HWND(widget->winId()), &m);
		if (SUCCEEDED(hr)) {
			result = true;
				windowNotifier()->addWidget(widget, new ExtendedFrameManager(widget, &m));
		}
		widget->setAttribute(Qt::WA_TranslucentBackground, result);
	}
#else
	Q_UNUSED(widget);
	Q_UNUSED(left);
	Q_UNUSED(top);
	Q_UNUSED(right);
	Q_UNUSED(bottom);
#endif
	return result;
}
开发者ID:CyberSys,项目名称:qutim,代码行数:37,代码来源:qtdwm.cpp


示例18: isVisible

void CFramelessWindow::setResizeable(bool resizeable)
{
    bool visible = isVisible();
    m_bResizeable = resizeable;
    if (m_bResizeable){
        setWindowFlags(windowFlags() | Qt::WindowMaximizeButtonHint);
//        setWindowFlag(Qt::WindowMaximizeButtonHint);

        //此行代码可以带回Aero效果,同时也带回了标题栏和边框,在nativeEvent()会再次去掉标题栏
        //
        //this line will get titlebar/thick frame/Aero back, which is exactly what we want
        //we will get rid of titlebar and thick frame again in nativeEvent() later
        HWND hwnd = (HWND)this->winId();
        DWORD style = ::GetWindowLong(hwnd, GWL_STYLE);
        ::SetWindowLong(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME | WS_CAPTION);
    }else{
        setWindowFlags(windowFlags() & ~Qt::WindowMaximizeButtonHint);
//        setWindowFlag(Qt::WindowMaximizeButtonHint,false);

        HWND hwnd = (HWND)this->winId();
        DWORD style = ::GetWindowLong(hwnd, GWL_STYLE);
        ::SetWindowLong(hwnd, GWL_STYLE, style & ~WS_MAXIMIZEBOX & ~WS_CAPTION);
    }

    //保留一个像素的边框宽度,否则系统不会绘制边框阴影
    //
    //we better left 1 piexl width of border untouch, so OS can draw nice shadow around it
    const MARGINS shadow = { 1, 1, 1, 1 };
    DwmExtendFrameIntoClientArea(HWND(winId()), &shadow);

    setVisible(visible);
}
开发者ID:bao-boyle,项目名称:Qt-Nice-Frameless-Window,代码行数:32,代码来源:framelesswindow.cpp


示例19: HWND

BOOL CTDLFilterDlg::OnToolTipNotify(UINT /*id*/, NMHDR* pNMHDR, LRESULT* /*pResult*/)
{
    // Get the tooltip structure.
    TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR;

    // Actually the idFrom holds Control's handle.
    UINT CtrlHandle = pNMHDR->idFrom;

    // Check once again that the idFrom holds handle itself.
    if (pTTT->uFlags & TTF_IDISHWND)
    {
		static CString sTooltip;
		sTooltip.Empty();

        // Get the control's ID.
        UINT nID = ::GetDlgCtrlID( HWND( CtrlHandle ));

        switch( nID )
        {
        case IDC_CATEGORYFILTERCOMBO:
			sTooltip = m_cbCategoryFilter.GetTooltip();
            break;

        case IDC_ALLOCTOFILTERCOMBO:
			sTooltip = m_cbAllocToFilter.GetTooltip();
            break;

        case IDC_STATUSFILTERCOMBO:
			sTooltip = m_cbStatusFilter.GetTooltip();
            break;

        case IDC_ALLOCBYFILTERCOMBO:
			sTooltip = m_cbAllocByFilter.GetTooltip();
            break;

        case IDC_VERSIONFILTERCOMBO:
			sTooltip = m_cbVersionFilter.GetTooltip();
            break;

        case IDC_TAGFILTERCOMBO:
			sTooltip = m_cbTagFilter.GetTooltip();
            break;

        case IDC_OPTIONFILTERCOMBO:
			sTooltip = m_cbOptions.GetTooltip();
            break;
        }

		if (!sTooltip.IsEmpty())
		{
			// Set the tooltip text.
			::SendMessage(pNMHDR->hwndFrom, TTM_SETMAXTIPWIDTH, 0, 300);
			pTTT->lpszText = (LPTSTR)(LPCTSTR)sTooltip;
	        return TRUE;
		}
    }

    // Not handled.
    return FALSE;
}
开发者ID:jithuin,项目名称:infogeezer,代码行数:60,代码来源:TDLFilterDlg.cpp


示例20: HWND

    bool CCoherentHUDViewListener::RaycastGeometry( const Vec3& origin, const Vec3& dir, float& outDist, int& outViewX, int& outViewY )
    {
        if ( !m_pView )
        {
            return false;
        }

        // Get the mouse position and check if it's over a solid pixel,
        // ignoring the input ray.
        POINT cursorPos;
        ::GetCursorPos( &cursorPos );
        ::ScreenToClient( HWND( gEnv->pRenderer->GetHWND() ), &cursorPos );

        // When using shared textures you should issue the query at the beginning
        // of the frame and fetch as late as possible for optimal performance.
        // Since the current state of the plugin supports only shared memory transport,
        // issuing a query and immediately fetching causes no performance penalty.
        m_pView->IssueMouseOnUIQuery(
            cursorPos.x / ( float )m_pView->GetWidth(),
            cursorPos.y / ( float )m_pView->GetHeight()
        );
        m_pView->FetchMouseOnUIQuery();

        if ( m_pView->IsMouseOnView() )
        {
            outDist = 0;
            outViewX = cursorPos.x;
            outViewY = cursorPos.y;

            return true;
        }

        return false;
    }
开发者ID:iherwig,项目名称:Plugin_CoherentUI,代码行数:34,代码来源:CoherentHUDViewListener.cpp



注:本文中的HWND函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ HWND_32函数代码示例发布时间:2022-05-30
下一篇:
C++ HWIF函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap