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

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

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

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

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

示例1: Remove

void wxToolTip::SetWindow(wxWindow *win){    Remove();    m_window = win;    // add the window itself    if ( m_window )    {        DoAddHWND(m_window->GetHWND());    }#if !defined(__WXUNIVERSAL__)    // and all of its subcontrols (e.g. radio buttons in a radiobox) as well    wxControl *control = wxDynamicCast(m_window, wxControl);    if ( control )    {        const wxArrayLong& subcontrols = control->GetSubcontrols();        size_t count = subcontrols.GetCount();        for ( size_t n = 0; n < count; n++ )        {            int id = subcontrols[n];            HWND hwnd = GetDlgItem(GetHwndOf(m_window), id);            if ( !hwnd )            {                // maybe it's a child of parent of the control, in fact?                // (radiobuttons are subcontrols, i.e. children of the radiobox                // for wxWidgets but are its siblings at Windows level)                hwnd = GetDlgItem(GetHwndOf(m_window->GetParent()), id);            }            // must have it by now!            wxASSERT_MSG( hwnd, wxT("no hwnd for subcontrol?") );            AddOtherWindow((WXHWND)hwnd);        }    }#endif // !defined(__WXUNIVERSAL__)}
开发者ID:EEmmanuel7,项目名称:wxWidgets,代码行数:38,


示例2: GetHwndOf

bool wxRadioBox::Reparent(wxWindowBase *newParent){    if ( !wxStaticBox::Reparent(newParent) )    {        return false;    }    HWND hwndParent = GetHwndOf(GetParent());    for ( size_t item = 0; item < m_radioButtons->GetCount(); item++ )    {        ::SetParent((*m_radioButtons)[item], hwndParent);    }    return true;}
开发者ID:Asmodean-,项目名称:Ishiiruka,代码行数:14,


示例3: LaunchTortoiseAct

void ConflictListDialog::OnMenuDiff(wxCommandEvent&){   int nItems = myFiles->GetItemCount();   for (int i = 0; i < nItems; ++i)   {      if (myFiles->IsSelected(i))      {         std::string file = ((ConflictListDialog::ItemData*) myFiles->GetItemData(i))->m_Filename;         LaunchTortoiseAct(false, CvsDiffVerb, file, "", GetHwndOf(this));          return;      }   }}
开发者ID:pampersrocker,项目名称:G-CVSNT,代码行数:14,


示例4: ImageList_Destroy

// Create a drag image for the given tree control itembool wxDragImage::Create(const wxTreeCtrl& treeCtrl, wxTreeItemId& id){    if ( m_hImageList )        ImageList_Destroy(GetHimageList());    m_hImageList = (WXHIMAGELIST)        TreeView_CreateDragImage(GetHwndOf(&treeCtrl), (HTREEITEM) id.m_pItem);    if ( !m_hImageList )    {        // fall back on just the item text if there is no image        return Create(treeCtrl.GetItemText(id));    }    return true;}
开发者ID:NullNoname,项目名称:dolphin,代码行数:15,


示例5: EndMeasuring

void wxTextMeasure::EndMeasuring(){    if ( m_hfontOld )    {        ::SelectObject(m_hdc, m_hfontOld);        m_hfontOld = NULL;    }    if ( m_win )        ::ReleaseDC(GetHwndOf(m_win), m_hdc);    //else: our HDC belongs to m_dc, don't touch it    m_hdc = NULL;}
开发者ID:0ryuO,项目名称:dolphin-avsync,代码行数:14,


示例6: Free

void wxStaticBitmap::SetImageNoCopy( wxGDIImage* image){    Free();    m_isIcon = image->IsKindOf( CLASSINFO(wxIcon) );    // the image has already been copied    m_image = image;    int x, y;    int w, h;    GetPosition(&x, &y);    GetSize(&w, &h);#ifdef __WIN32__    HANDLE handle = (HANDLE)m_image->GetHandle();    LONG style = ::GetWindowLong( (HWND)GetHWND(), GWL_STYLE ) ;    ::SetWindowLong( (HWND)GetHWND(), GWL_STYLE, ( style & ~( SS_BITMAP|SS_ICON ) ) |                     ( m_isIcon ? SS_ICON : SS_BITMAP ) );    HGDIOBJ oldHandle = (HGDIOBJ)::SendMessage(GetHwnd(), STM_SETIMAGE,                  m_isIcon ? IMAGE_ICON : IMAGE_BITMAP, (LPARAM)handle);    // detect if this is still the handle we passed before or    // if the static-control made a copy of the bitmap!    if (m_currentHandle != 0 && oldHandle != (HGDIOBJ) m_currentHandle)    {        // the static control made a copy and we are responsible for deleting it        DeleteObject((HGDIOBJ) oldHandle);    }    m_currentHandle = (WXHANDLE)handle;#endif // Win32    if ( ImageIsOk() )    {        int width = image->GetWidth(),            height = image->GetHeight();        if ( width && height )        {            w = width;            h = height;            ::MoveWindow(GetHwnd(), x, y, width, height, FALSE);        }    }    RECT rect;    rect.left   = x;    rect.top    = y;    rect.right  = x + w;    rect.bottom = y + h;    ::InvalidateRect(GetHwndOf(GetParent()), &rect, TRUE);}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:50,


示例7: CanPaste

bool wxTextCtrl::CanPaste() const{    if ( !IsEditable() )        return false;    // Standard edit control: check for straight text on clipboard    if ( !::OpenClipboard(GetHwndOf(wxTheApp->GetTopWindow())) )        return false;    bool isTextAvailable = ::IsClipboardFormatAvailable(CF_TEXT) != 0;    ::CloseClipboard();    return isTextAvailable;}
开发者ID:ACanadianKernel,项目名称:pcsx2,代码行数:14,


示例8: memset

int wxColourDialog::ShowModal(){    CHOOSECOLOR chooseColorStruct;    COLORREF custColours[16];    memset(&chooseColorStruct, 0, sizeof(CHOOSECOLOR));    int i;    for (i = 0; i < 16; i++)    {        if (m_colourData.m_custColours[i].Ok())            custColours[i] = wxColourToRGB(m_colourData.m_custColours[i]);        else            custColours[i] = RGB(255,255,255);    }    chooseColorStruct.lStructSize = sizeof(CHOOSECOLOR);    if ( m_parent )        chooseColorStruct.hwndOwner = GetHwndOf(m_parent);    chooseColorStruct.rgbResult = wxColourToRGB(m_colourData.m_dataColour);    chooseColorStruct.lpCustColors = custColours;    chooseColorStruct.Flags = CC_RGBINIT | CC_ENABLEHOOK;    chooseColorStruct.lCustData = (LPARAM)this;    chooseColorStruct.lpfnHook = wxColourDialogHookProc;    if (m_colourData.GetChooseFull())        chooseColorStruct.Flags |= CC_FULLOPEN;    // Do the modal dialog    bool success = ::ChooseColor(&(chooseColorStruct)) != 0;    // Try to highlight the correct window (the parent)    if (GetParent())    {      HWND hWndParent = (HWND) GetParent()->GetHWND();      if (hWndParent)        ::BringWindowToTop(hWndParent);    }    // Restore values    for (i = 0; i < 16; i++)    {      wxRGBToColour(m_colourData.m_custColours[i], custColours[i]);    }    wxRGBToColour(m_colourData.m_dataColour, chooseColorStruct.rgbResult);    return success ? wxID_OK : wxID_CANCEL;}
开发者ID:252525fb,项目名称:rpcs3,代码行数:50,


示例9: ti

void wxToolTip::SetTip( const wxString &tip ){    m_text = tip;    if ( m_window )    {#if 0    // update it immediately    wxToolInfo ti(GetHwndOf(m_window));    ti.lpszText = (wxChar *)m_text.c_str();    (void)SendTooltipMessage(GetToolTipCtrl(), TTM_UPDATETIPTEXT, 0, &ti);#endif    }}
开发者ID:Bluehorn,项目名称:wxPython,代码行数:15,


示例10: MSWShouldPreProcessMessage

bool wxChoice::MSWShouldPreProcessMessage(WXMSG *pMsg){    MSG *msg = (MSG *) pMsg;    // if the dropdown list is visible, don't preprocess certain keys    if ( msg->message == WM_KEYDOWN        && (msg->wParam == VK_ESCAPE || msg->wParam == VK_RETURN) )    {        if (::SendMessage(GetHwndOf(this), CB_GETDROPPEDSTATE, 0, 0))        {            return false;        }    }    return wxControl::MSWShouldPreProcessMessage(pMsg);}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:16,


示例11: notifyData

bool wxTaskBarIcon::RemoveIcon(){    if (!m_iconAdded)        return false;    m_iconAdded = false;    NotifyIconData notifyData(GetHwndOf(m_win));    bool ok = Shell_NotifyIcon(NIM_DELETE, &notifyData) != 0;    if ( !ok )    {        wxLogLastError(wxT("Shell_NotifyIcon(NIM_DELETE)"));    }    return ok;}
开发者ID:EEmmanuel7,项目名称:wxWidgets,代码行数:17,


示例12: GetPosition

WXLRESULTwxStatusBar95::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam){#ifndef __WXWINCE__    if ( nMsg == WM_WINDOWPOSCHANGING )    {        WINDOWPOS *lpPos = (WINDOWPOS *)lParam;        int x, y, w, h;        GetPosition(&x, &y);        GetSize(&w, &h);        // we need real window coords and not wx client coords        AdjustForParentClientOrigin(x, y);        lpPos->x  = x;        lpPos->y  = y;        lpPos->cx = w;        lpPos->cy = h;        return 0;    }    if ( nMsg == WM_NCLBUTTONDOWN )    {        // if hit-test is on gripper then send message to TLW to begin        // resizing. It is possible to send this message to any window.        if ( wParam == HTBOTTOMRIGHT )        {            wxWindow *win;            for ( win = GetParent(); win; win = win->GetParent() )            {                if ( win->IsTopLevel() )                {                    SendMessage(GetHwndOf(win), WM_NCLBUTTONDOWN,                                wParam, lParam);                    return 0;                }            }        }    }#endif    return wxStatusBarBase::MSWWindowProc(nMsg, wParam, lParam);}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:46,


示例13: GetHwndOf

int CocoaDialogApp::OnExit() {#ifdef __WXMSW__	if (m_parentWnd) {		// Activate the parent frame		HWND hwnd = GetHwndOf(m_parentWnd);		::SetForegroundWindow(hwnd);		::SetFocus(hwnd);		m_parentWnd->DissociateHandle();		delete m_parentWnd;	}#endif //__WXMSW__	wxLogDebug(wxT("wxCD exit done"));	return wxApp::OnExit();}
开发者ID:bluemoon,项目名称:wxcocoadialog,代码行数:17,


示例14: GetRect

bool wxSpinCtrl::Reparent(wxWindowBase *newParent){    // Reparenting both the updown control and its buddy does not seem to work:    // they continue to be connected somehow, but visually there is no feedback    // on the buddy edit control. To avoid this problem, we reparent the buddy    // window normally, but we recreate the updown control and reassign its    // buddy.    // Get the position before changing the parent as it would be offset after    // changing it.    const wxRect rect = GetRect();    if ( !wxWindowBase::Reparent(newParent) )        return false;    newParent->GetChildren().DeleteObject(this);    // destroy the old spin button after detaching it from this wxWindow object    // (notice that m_hWnd will be reset by UnsubclassWin() so save it first)    const HWND hwndOld = GetHwnd();    UnsubclassWin();    if ( !::DestroyWindow(hwndOld) )    {        wxLogLastError(wxT("DestroyWindow"));    }    // create and initialize the new one    if ( !wxSpinButton::Create(GetParent(), GetId(),                               rect.GetPosition(), rect.GetSize(),                               GetWindowStyle(), GetName()) )        return false;    // reapply our values to wxSpinButton    wxSpinButton::SetValue(GetValue());    SetRange(m_min, m_max);    // also set the size again with wxSIZE_ALLOW_MINUS_ONE flag: this is    // necessary if our original position used -1 for either x or y    SetSize(rect, wxSIZE_ALLOW_MINUS_ONE);    // associate it with the buddy control again    ::SetParent(GetBuddyHwnd(), GetHwndOf(GetParent()));    (void)::SendMessage(GetHwnd(), UDM_SETBUDDY, (WPARAM)GetBuddyHwnd(), 0);    return true;}
开发者ID:krossell,项目名称:wxWidgets,代码行数:46,


示例15: wxCHECK_MSG

boolwxTaskBarIcon::ShowBalloon(const wxString& title,                           const wxString& text,                           unsigned msec,                           int flags){    wxCHECK_MSG( m_iconAdded, false,                    wxT("can't be used before the icon is created") );    const HWND hwnd = GetHwndOf(m_win);    // we need to enable version 5.0 behaviour to receive notifications about    // the balloon disappearance    NotifyIconData notifyData(hwnd);    notifyData.uFlags = 0;    notifyData.uVersion = 3 /* NOTIFYICON_VERSION for Windows 2000/XP */;    if ( !Shell_NotifyIcon(NIM_SETVERSION, &notifyData) )    {        wxLogLastError(wxT("Shell_NotifyIcon(NIM_SETVERSION)"));    }    // do show the balloon now    notifyData = NotifyIconData(hwnd);    notifyData.uFlags |= NIF_INFO;    notifyData.uTimeout = msec;    wxStrlcpy(notifyData.szInfo, text.t_str(), WXSIZEOF(notifyData.szInfo));    wxStrlcpy(notifyData.szInfoTitle, title.t_str(),                WXSIZEOF(notifyData.szInfoTitle));    if ( flags & wxICON_INFORMATION )        notifyData.dwInfoFlags |= NIIF_INFO;    else if ( flags & wxICON_WARNING )        notifyData.dwInfoFlags |= NIIF_WARNING;    else if ( flags & wxICON_ERROR )        notifyData.dwInfoFlags |= NIIF_ERROR;    bool ok = Shell_NotifyIcon(NIM_MODIFY, &notifyData) != 0;    if ( !ok )    {        wxLogLastError(wxT("Shell_NotifyIcon(NIM_MODIFY)"));    }    return ok;}
开发者ID:EEmmanuel7,项目名称:wxWidgets,代码行数:45,


示例16: GetHwndOf

bool wxRadioBox::Reparent(wxWindowBase *newParent){    if ( !wxStaticBox::Reparent(newParent) )    {        return false;    }    HWND hwndParent = GetHwndOf(GetParent());    for ( size_t item = 0; item < m_radioButtons->GetCount(); item++ )    {        ::SetParent((*m_radioButtons)[item], hwndParent);    }#ifdef __WXWINCE__    // put static box under the buttons in the Z-order    SetWindowPos(GetHwnd(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);#endif    return true;}
开发者ID:CyberIntelMafia,项目名称:clamav-devel,代码行数:18,


示例17: GetWindowRect

void wxMDIChildFrame::DoGetPosition(int *x, int *y) const{  RECT rect;  GetWindowRect(GetHwnd(), &rect);  POINT point;  point.x = rect.left;  point.y = rect.top;  // Since we now have the absolute screen coords,  // if there's a parent we must subtract its top left corner  wxMDIParentFrame * const mdiParent = GetMDIParent();  ::ScreenToClient(GetHwndOf(mdiParent->GetClientWindow()), &point);  if (x)      *x = point.x;  if (y)      *y = point.y;}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:18,


示例18: SendDestroyEvent

wxTopLevelWindowMSW::~wxTopLevelWindowMSW(){    delete m_menuSystem;    SendDestroyEvent();    // after destroying an owned window, Windows activates the next top level    // window in Z order but it may be different from our owner (to reproduce    // this simply Alt-TAB to another application and back before closing the    // owned frame) whereas we always want to yield activation to our parent    if ( HasFlag(wxFRAME_FLOAT_ON_PARENT) )    {        wxWindow *parent = GetParent();        if ( parent )        {            ::BringWindowToTop(GetHwndOf(parent));        }    }}
开发者ID:draekko,项目名称:wxWidgets,代码行数:19,


示例19: ti

void wxToolTip::SetTip(const wxString& tip){    m_text = tip;    if ( m_window )    {        // update the tip text shown by the control        wxToolInfo ti(GetHwndOf(m_window), m_id, m_rect);        // for some reason, changing the tooltip text directly results in        // repaint of the controls under it, see #10520 -- but this doesn't        // happen if we reset it first        ti.lpszText = const_cast<wxChar *>(wxT(""));        (void)SendTooltipMessage(GetToolTipCtrl(), TTM_UPDATETIPTEXT, &ti);        ti.lpszText = const_cast<wxChar *>(m_text.wx_str());        (void)SendTooltipMessage(GetToolTipCtrl(), TTM_UPDATETIPTEXT, &ti);    }}
开发者ID:erwincoumans,项目名称:wxWidgets,代码行数:19,


示例20: wxCHECK_MSG

boolwxNativeWindow::Create(wxWindow* parent,                       wxWindowID winid,                       wxNativeWindowHandle hwnd){    wxCHECK_MSG( hwnd, false, wxS("Invalid null HWND") );    wxCHECK_MSG( parent, false, wxS("Must have a valid parent") );    wxASSERT_MSG( ::GetParent(hwnd) == GetHwndOf(parent),                  wxS("The native window has incorrect parent") );    const wxRect r = wxRectFromRECT(wxGetWindowRect(hwnd));    // Skip wxWindow::Create() which would try to create a new HWND, we don't    // want this as we already have one.    if ( !CreateBase(parent, winid,                     r.GetPosition(), r.GetSize(),                     0, wxDefaultValidator, wxS("nativewindow")) )        return false;    parent->AddChild(this);    SubclassWin(hwnd);    if ( winid == wxID_ANY )    {        // We allocated a new ID to the control, use it at Windows level as        // well because we assume that our and MSW IDs are the same in many        // places and it seems prudent to avoid breaking this assumption.        SetId(GetId());    }    else // We used a fixed ID.    {        // For the same reason as above, check that it's the same as the one        // used by the native HWND.        wxASSERT_MSG( ::GetWindowLong(hwnd, GWL_ID) == winid,                      wxS("Mismatch between wx and native IDs") );    }    InheritAttributes();    return true;}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:42,


示例21: wxToolTipWndProc

LRESULT APIENTRY wxToolTipWndProc(HWND hwndTT,                                  UINT msg,                                  WPARAM wParam,                                  LPARAM lParam){    if ( msg == TTM_WINDOWFROMPOINT )    {        LPPOINT ppt = (LPPOINT)lParam;        // the window on which event occurred        HWND hwnd = ::WindowFromPoint(*ppt);        OutputDebugString("TTM_WINDOWFROMPOINT: ");        OutputDebugString(wxString::Format("0x%08x => ", hwnd));        // return a HWND corresponding to a wxWindow because only wxWidgets are        // associated with tooltips using TTM_ADDTOOL        wxWindow *win = wxGetWindowFromHWND((WXHWND)hwnd);        if ( win )        {            hwnd = GetHwndOf(win);            OutputDebugString(wxString::Format("0x%08x/r/n", hwnd));#if 0            // modify the point too!            RECT rect;            GetWindowRect(hwnd, &rect);            ppt->x = (rect.right - rect.left) / 2;            ppt->y = (rect.bottom - rect.top) / 2;#endif // 0            return (LRESULT)hwnd;        }        else        {            OutputDebugString("no window/r/n");        }    }    return ::CallWindowProc(CASTWNDPROC gs_wndprocToolTip, hwndTT, msg, wParam, lParam);}
开发者ID:erwincoumans,项目名称:wxWidgets,代码行数:42,


示例22: wxTaskBarIconWindow

// Operationsbool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip){    // NB: we have to create the window lazily because of backward compatibility,    //     old applications may create a wxTaskBarIcon instance before wxApp    //     is initialized (as samples/taskbar used to do)    if (!m_win)    {        m_win = new wxTaskBarIconWindow(this);    }    m_icon = icon;    m_strTooltip = tooltip;    NotifyIconData notifyData(GetHwndOf(m_win));    if (icon.IsOk())    {        notifyData.uFlags |= NIF_ICON;        notifyData.hIcon = GetHiconOf(icon);    }    // set NIF_TIP even for an empty tooltip: otherwise it would be impossible    // to remove an existing tooltip using this function    notifyData.uFlags |= NIF_TIP;    if ( !tooltip.empty() )    {        wxStrlcpy(notifyData.szTip, tooltip.t_str(), WXSIZEOF(notifyData.szTip));    }    bool ok = Shell_NotifyIcon(m_iconAdded ? NIM_MODIFY                                            : NIM_ADD, &notifyData) != 0;    if ( !ok )    {        wxLogLastError(wxT("Shell_NotifyIcon(NIM_MODIFY/ADD)"));    }    if ( !m_iconAdded && ok )        m_iconAdded = true;    return ok;}
开发者ID:EEmmanuel7,项目名称:wxWidgets,代码行数:43,


示例23: theme

bool wxNotebook::DoDrawBackground(WXHDC hDC, wxWindow *child){    wxUxThemeHandle theme(child ? child : this, L"TAB");    if ( !theme )        return false;    // get the notebook client rect (we're not interested in drawing tabs    // themselves)    wxRect r = GetPageSize();    if ( r.IsEmpty() )        return false;    RECT rc;    wxCopyRectToRECT(r, rc);    // map rect to the coords of the window we're drawing in    if ( child )        ::MapWindowPoints(GetHwnd(), GetHwndOf(child), (POINT *)&rc, 2);    // we have the content area (page size), but we need to draw all of the    // background for it to be aligned correctly    wxUxThemeEngine::Get()->GetThemeBackgroundExtent                            (                                theme,                                (HDC) hDC,                                9 /* TABP_PANE */,                                0,                                &rc,                                &rc                            );    wxUxThemeEngine::Get()->DrawThemeBackground                            (                                theme,                                (HDC) hDC,                                9 /* TABP_PANE */,                                0,                                &rc,                                NULL                            );    return true;}
开发者ID:chromylei,项目名称:third_party,代码行数:42,


示例24: WXUNUSED

void HtmlDialog::OnClose(wxCloseEvent& WXUNUSED(event)) {	// Clean up	if (!m_tempPath.empty() && wxFileExists(m_tempPath)) {		wxRemoveFile(m_tempPath);	}		// If we have a parent, we want to pass focus to it before closing	// (otherwise the system may activate a random window)	wxWindow* parent = GetParent();	if (parent) {#ifdef __WXMSW__		// Activate the parent frame		HWND hwnd = GetHwndOf(parent);		::SetForegroundWindow(hwnd);		::SetFocus(hwnd);#endif //__WXMSW__	}		Destroy(); // Dlg is top window, so this ends the app.}
开发者ID:tea,项目名称:wxcocoadialog,代码行数:20,


示例25: GetHwnd

// Set the client size (i.e. leave the calculation of borders etc.// to wxWidgets)void wxMDIChildFrame::DoSetClientSize(int width, int height){  HWND hWnd = GetHwnd();  RECT rect;  ::GetClientRect(hWnd, &rect);  RECT rect2;  GetWindowRect(hWnd, &rect2);  // Find the difference between the entire window (title bar and all)  // and the client area; add this to the new client size to move the  // window  int actual_width = rect2.right - rect2.left - rect.right + width;  int actual_height = rect2.bottom - rect2.top - rect.bottom + height;#if wxUSE_STATUSBAR  if (GetStatusBar() && GetStatusBar()->IsShown())  {    int sx, sy;    GetStatusBar()->GetSize(&sx, &sy);    actual_height += sy;  }#endif // wxUSE_STATUSBAR  POINT point;  point.x = rect2.left;  point.y = rect2.top;  // If there's an MDI parent, must subtract the parent's top left corner  // since MoveWindow moves relative to the parent  wxMDIParentFrame * const mdiParent = GetMDIParent();  ::ScreenToClient(GetHwndOf(mdiParent->GetClientWindow()), &point);  MoveWindow(hWnd, point.x, point.y, actual_width, actual_height, (BOOL)true);  wxSize size(width, height);  wxSizeEvent event(size, m_windowId);  event.SetEventObject( this );  HandleWindowEvent(event);}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:43,


示例26: GetSize

bool wxSpinCtrl::Reparent(wxWindowBase *newParent){    // Reparenting both the updown control and its buddy does not seem to work:    // they continue to be connected somehow, but visually there is no feedback    // on the buddy edit control. To avoid this problem, we reparent the buddy    // window normally, but we recreate the updown control and reassign its    // buddy.    if ( !wxWindowBase::Reparent(newParent) )        return false;    newParent->GetChildren().DeleteObject(this);    // preserve the old values    const wxSize size = GetSize();    int value = GetValue();    const wxRect btnRect = wxRectFromRECT(wxGetWindowRect(GetHwnd()));    // destroy the old spin button    UnsubclassWin();    if ( !::DestroyWindow(GetHwnd()) )    {        wxLogLastError(wxT("DestroyWindow"));    }    // create and initialize the new one    if ( !wxSpinButton::Create(GetParent(), GetId(),                               btnRect.GetPosition(), btnRect.GetSize(),                               GetWindowStyle(), GetName()) )        return false;    SetValue(value);    SetRange(m_min, m_max);    SetInitialSize(size);    // associate it with the buddy control again    ::SetParent(GetBuddyHwnd(), GetHwndOf(GetParent()));    (void)::SendMessage(GetHwnd(), UDM_SETBUDDY, (WPARAM)GetBuddyHwnd(), 0);    return true;}
开发者ID:erwincoumans,项目名称:wxWidgets,代码行数:41,


示例27: notifyData

bool gcTaskBarIcon::RemoveIcon(){#ifdef WIN32	if (!m_iconAdded)		return false;	m_iconAdded = false;	NotifyIconData notifyData(GetHwndOf(m_win));	bool ok = wxShellNotifyIcon(NIM_DELETE, &notifyData) != 0;	if ( !ok )	{		wxLogLastError(wxT("wxShellNotifyIcon(NIM_DELETE)"));	}	return ok;#else	return false;#endif}
开发者ID:Mailaender,项目名称:Desurium,代码行数:21,


示例28: WakeUpIdle

void wxApp::WakeUpIdle(){    //    // Send the top window a dummy message so idle handler processing will    // start up again.  Doing it this way ensures that the idle handler    // wakes up in the right thread (see also wxWakeUpMainThread() which does    // the same for the main app thread only)    //    wxWindow*                       pTopWindow = wxTheApp->GetTopWindow();    if (pTopWindow)    {        if ( !::WinPostMsg(GetHwndOf(pTopWindow), WM_NULL, (MPARAM)0, (MPARAM)0))        {            //            // Should never happen            //            wxLogLastError(wxT("PostMessage(WM_NULL)"));        }    }} // end of wxWakeUpIdle
开发者ID:hgwells,项目名称:tive,代码行数:21,



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


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