您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ HWND函数代码示例

51自学网 2021-06-01 21:24:29
  C++
这篇教程C++ HWND函数代码示例写得很实用,希望能帮到您。

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

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


示例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,


示例3: MapHDDWinM_OnCommand

//------------------------------------------------------------------------------#pragma argsusedstatic 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 argsusedstatic 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 argsusedstatic void MapHDDWinM_OnDestroy(HWND hwnd){
开发者ID:mpapierski,项目名称:from-hdd-lg-to-pc,代码行数:33,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例12: uint32

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


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例21: LangSetDlgItemsText

bool CLangPage::OnInit(){  LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));  _langCombo.Attach(GetItem(IDC_LANG_COMBO_LANG));  UString s = NWindows::MyLoadStringW(IDS_LANG_ENGLISH) +      NativeLangString(NWindows::MyLoadStringW(IDS_LANG_NATIVE));  int index = (int)_langCombo.AddString(s);  _langCombo.SetItemData(index, _paths.Size());  _paths.Add(L"-");  _langCombo.SetCurSel(0);  CObjectVector<CLangEx> langs;  LoadLangs(langs);  for (int i = 0; i < langs.Size(); i++)  {    const CLangEx &lang = langs[i];    UString name, nationalName;    if (!lang.Lang.GetMessage(0, name))      name = lang.ShortName;    if (lang.Lang.GetMessage(1, nationalName) && !nationalName.IsEmpty())      name += NativeLangString(nationalName);    index = (int)_langCombo.AddString(name);    _langCombo.SetItemData(index, _paths.Size());    _paths.Add(lang.ShortName);    if (g_LangID.CompareNoCase(lang.ShortName) == 0)      _langCombo.SetCurSel(index);  }  return CPropertyPage::OnInit();}
开发者ID:Dabil,项目名称:puNES,代码行数:32,


示例22: LangSetDlgItemsText

bool CListViewDialog::OnInit() {  #ifdef LANG          LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));  #endif  _listView.Attach(GetItem(IDC_LISTVIEW_LIST));  SetText(Title);  LVCOLUMN columnInfo;  columnInfo.mask = LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM;  columnInfo.fmt = LVCFMT_LEFT;  columnInfo.iSubItem = 0;  columnInfo.cx = 1000;  _listView.InsertColumn(0, &columnInfo);  for(int i = 0; i < Strings.Size(); i++)  {    LVITEMW item;    item.mask = LVIF_TEXT;    item.iItem = i;    item.pszText = (LPWSTR)(LPCWSTR)Strings[i];    item.iSubItem = 0;    _listView.InsertItem(&item);  }  if (Strings.Size() > 0)    _listView.SetItemState(0, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED);  StringsWereChanged = false;  return CModalDialog::OnInit();}
开发者ID:Ando02,项目名称:wubiuefi,代码行数:30,


示例23: clone

void TThread::Msg::send() {  Msg *msg = clone();#ifdef WIN32  /*Non viene utilizzato PostThreadMessage perche' se l'applicazionesi trova in un modal loop (esempio MessageBox) oppure si stafacendo move o resize di una finestra i messaggi non giungono almessage loop.http://support.microsoft.com/default.aspx?scid=KB;EN-US;q183116&*/  /*BOOL rc = PostThreadMessage(getMainThreadId(),      // thread identifierWM_THREAD_NOTIFICATION, // messageWPARAM(msg),            // first message parameter0);                     // second message parameter*/  PostMessage(HWND(getMainShellHandle()), WM_THREAD_NOTIFICATION, WPARAM(msg),              0);#else  XClientMessageEvent clientMsg;  clientMsg.type         = ClientMessage;  clientMsg.window       = TheMainWindow;  clientMsg.format       = 32;  clientMsg.message_type = Msg::MsgId();  clientMsg.data.l[0]    = (long)msg;  // Status status =  XSendEvent(TheDisplay, TheMainWindow, 0, NoEventMask, (XEvent *)&clientMsg);  XFlush(TheDisplay);#endif}
开发者ID:walkerka,项目名称:opentoonz,代码行数:33,


示例24: _tWinMain

// EntryINT APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PTSTR ptzCmdLine, INT iCmdShow){	// Active previous instance	HWND hWnd = FindWindow(STR_AppName, NULL);	if (hWnd)	{		ShowWindow(hWnd, SW_SHOW);		SetForegroundWindow(HWND(UINT_PTR(hWnd) | 0x00000001));		return 0;	}	// Init library	CoInitializeEx(NULL, COINIT_MULTITHREADED);	InitCommonControls();#ifdef WINCE	SHInitExtraControls();#endif	// Set basic information	g_hInst = hInstance;	g_ptzAppName = TStrGet(IDS_AppName);	// Run the main window	CAppWnd aw;	aw.Run(ptzCmdLine, iCmdShow);	// Free library	CoUninitialize();	return 0;}
开发者ID:Yonsm,项目名称:Wample,代码行数:32,


示例25: ErrorsFill

  //  // Fill the given window with all the errors  //  void ErrorsFill(void *hwnd)  {    HWND hlist = HWND(hwnd);    // Add columns to listview    LV_COLUMN column;    column.mask = LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH;    column.cx = LOG_COLUMN_WIDTH_TYPESHORT;    column.pszText = "";    column.iSubItem = 0;    ListView_InsertColumn(hlist, 0, &column);    column.mask = LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH;    column.cx = LOG_COLUMN_WIDTH_LABELNAME;    column.pszText = "Class";    column.iSubItem = 1;    ListView_InsertColumn(hlist, 2, &column);    column.mask = LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH;    column.cx = LOG_COLUMN_WIDTH_MESSAGE;    column.pszText = "Message";    column.iSubItem = 2;    ListView_InsertColumn(hlist, 3, &column);    ListView_SetBkColor(hlist, RGB(0, 0, 0));    ListView_SetTextBkColor(hlist, RGB(0, 0, 0));    ListView_SetTextColor(hlist, RGB(191, 191, 0));    // Change the listviews font    HFONT hfont;    LOGFONT logfont;    Utils::Memset(&logfont, 0x00, sizeof (LOGFONT));    logfont.lfHeight = -11;     logfont.lfWeight = 400;     logfont.lfOutPrecision = 3;     logfont.lfClipPrecision = 2;    logfont.lfQuality = 1;    logfont.lfPitchAndFamily = 42;    strcpy(logfont.lfFaceName, "Lucida Console");     hfont = CreateFontIndirect(&logfont);    SendMessage(hlist, WM_SETFONT, (WPARAM) hfont, 0);    // Add all of the items to the list view control    U32 i = 0;    while (i < numErrors)    {      LV_ITEM lvi;       lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM | LVIF_STATE;      lvi.state = 0;      lvi.stateMask = 0;      lvi.pszText = LPSTR_TEXTCALLBACK;      lvi.iImage = 0;      lvi.iItem = ListView_GetItemCount(hlist);      lvi.iSubItem = 0;      lvi.lParam = (LPARAM) &errorItems[i];      ListView_InsertItem(hlist, &lvi);      i++;    }    numErrors = 0;  }
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:62,


示例26: GetItem

void CMDITabs::OnSelChange(NMHDR* pNMHDR, LRESULT* pResult){  TCITEM item;  item.mask = TCIF_PARAM;  GetItem(GetCurSel(), &item);  ::BringWindowToTop(HWND(item.lParam));  *pResult = 0;}
开发者ID:FlyingJester,项目名称:sphere,代码行数:8,


示例27: Inherited

WIN32WindowBase::WIN32WindowBase(void) :    Inherited(),    _sfHwnd                   (HWND(0)),    _sfHdc                    (HDC(0)),    _sfHglrc                  (HGLRC(0)),    _sfDummy0                 (Int32(0)){}
开发者ID:DaveHarrison,项目名称:OpenSGDevMaster,代码行数:8,


示例28: test1

void test1(){	HWND hWnd = HWND(0x00010412);	HWND hAncestorWnd = GetAncestor(hWnd, GA_ROOTOWNER);	CString strDebug;	strDebug.Format("hWnd = %08X, hAncestorWnd = %08X/n", hWnd, hAncestorWnd);	g_pMainWin->Log(strDebug);}
开发者ID:harrysun2006,项目名称:07_ShellHook,代码行数:8,


示例29: CHECK

//// Destructor of 'RichEdit PrintOut' - Flushes any cached formatting// information//TRichEditPrintout::~TRichEditPrintout(){    // Flush cached format information    //    if (FlushCache) {        CHECK(HWND(RichEdit));        RichEdit.FormatRange();    }}
开发者ID:bowlofstew,项目名称:Meridian59,代码行数:13,



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


C++ HWND_32函数代码示例
C++ HWIF函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。