當前位置: 首頁>>代碼示例>>C++>>正文


C++ AssertNoneLocked函數代碼示例

本文整理匯總了C++中AssertNoneLocked函數的典型用法代碼示例。如果您正苦於以下問題:C++ AssertNoneLocked函數的具體用法?C++ AssertNoneLocked怎麽用?C++ AssertNoneLocked使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了AssertNoneLocked函數的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: AssertNoneLocked

LRESULT CALLBACK
Window::WndProc(HWND _hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
  enum {
#ifndef _WIN32_WCE
    WM_VERY_FIRST = WM_NCCREATE,
#else
    WM_VERY_FIRST = WM_CREATE,
#endif
  };

  AssertNoneLocked();

  if (message == WM_GETMINMAXINFO)
    /* WM_GETMINMAXINFO is called before WM_CREATE, and we havn't set
       a Window pointer yet - let DefWindowProc() handle it */
    return ::DefWindowProc(_hWnd, message, wParam, lParam);

  Window *window;
  if (message == WM_VERY_FIRST) {
    LPCREATESTRUCT cs = (LPCREATESTRUCT)lParam;

    window = (Window *)cs->lpCreateParams;
    window->Created(_hWnd);
    window->SetUserData(window);
  } else {
    window = GetUnchecked(_hWnd);
  }

  LRESULT result = window->OnMessage(_hWnd, message, wParam, lParam);
  AssertNoneLocked();

  return result;
}
開發者ID:DRIZO,項目名稱:xcsoar,代碼行數:34,代碼來源:Window.cpp

示例2: AssertNoneLocked

void
EventLoop::Dispatch(const Event &event)
{
  AssertNoneLocked();
  ::TranslateMessage(&event.msg);
  ::DispatchMessage(&event.msg);
  AssertNoneLocked();
}
開發者ID:Turbo87,項目名稱:XCSoar-TE,代碼行數:8,代碼來源:Loop.cpp

示例3: AssertNoneLocked

void
LargeTextWindow::SetText(const TCHAR *text)
{
  AssertNoneLocked();

  // Replace \n by \r\r\n to enable usage of line-breaks in edit control
  unsigned size = _tcslen(text);
  TCHAR buffer[size * sizeof(TCHAR) * 3];
  const TCHAR* p2 = text;
  TCHAR* p3 = buffer;
  for (; *p2 != _T('\0'); p2++) {
    if (*p2 == _T('\n')) {
      *p3 = _T('\r');
      p3++;
      *p3 = _T('\r');
      p3++;
      *p3 = _T('\n');
    } else if (*p2 == _T('\r')) {
      continue;
    } else {
      *p3 = *p2;
    }
    p3++;
  }
  *p3 = _T('\0');

  ::SetWindowText(hWnd, buffer);
}
開發者ID:CnZoom,項目名稱:XcSoarPull,代碼行數:28,代碼來源:LargeTextWindow.cpp

示例4: SetFont

  void SetFont(const Font &_font) {
    AssertNoneLocked();
    AssertThread();

    font = &_font;
    Invalidate();
  }
開發者ID:Adrien81,項目名稱:XCSoar,代碼行數:7,代碼來源:Window.hpp

示例5: set_text

  void set_text(const TCHAR *_text) {
    AssertNoneLocked();
    AssertThread();

    text = _text;
    Invalidate();
  }
開發者ID:damianob,項目名稱:xcsoar,代碼行數:7,代碼來源:ButtonWindow.hpp

示例6: AssertNoneLocked

void
ButtonWindow::SetText(const TCHAR *_text)
{
  AssertNoneLocked();
  AssertThread();

  if (GetCustomPainting() || _tcschr(_text, _T('&')) == NULL) {
    ::SetWindowText(hWnd, _text);
    return;
  }

  TCHAR buffer[256]; /* should be large enough for buttons */
  static unsigned const int buffer_size = ARRAY_SIZE(buffer);

  TCHAR const *s=_text;
  TCHAR *d=buffer;

  // Workaround WIN32 special use of '&' (replace every '&' with "&&")
  // Note: Terminates loop two chars before the buffer_size. This might prevent
  // potential char copies but assures that there is always room for
  // two '&'s and the 0-terminator.
  while (*s && d < buffer + buffer_size - 2) {
    if (*s == _T('&'))
      *d++ = *s;
    *d++ = *s++;
  }
  *d=0;

  ::SetWindowText(hWnd, buffer);
}
開發者ID:StefanL74,項目名稱:XCSoar,代碼行數:30,代碼來源:ButtonWindow.cpp

示例7: AssertNoneLocked

void
ProgressWindow::SetMessage(const TCHAR *text)
{
  AssertNoneLocked();
  AssertThread();

  message.set_text(text);
}
開發者ID:CnZoom,項目名稱:XcSoarPull,代碼行數:8,代碼來源:ProgressWindow.cpp

示例8: AssertNoneLocked

void
Window::BringToBottom()
{
  AssertNoneLocked();
  AssertThread();

  parent->BringChildToBottom(*this);
}
開發者ID:Tjeerdm,項目名稱:XCSoarDktjm,代碼行數:8,代碼來源:Window.cpp

示例9: Close

  void Close() {
    AssertNoneLocked();

#ifndef USE_GDI
    OnClose();
#else
    ::SendMessage(hWnd, WM_CLOSE, 0, 0);
#endif
  }
開發者ID:PhilColbert,項目名稱:LK8000,代碼行數:9,代碼來源:TopWindow.hpp

示例10: AssertNoneLocked

void
LargeTextWindow::SetText(const TCHAR *text)
{
    AssertNoneLocked();

    if (text != nullptr)
        value = text;
    else
        value.clear();
    Invalidate();
}
開發者ID:piermariamattioli,項目名稱:XCSoar,代碼行數:11,代碼來源:LargeTextWindow.cpp

示例11: AssertNoneLocked

void
ProgressBar::Step()
{
  AssertNoneLocked();
  AssertThread();

#ifndef USE_GDI
  value += step_size;
  Expose();
#else
  ::SendMessage(hWnd, PBM_STEPIT, (WPARAM)0, (LPARAM)0);
#endif
}
開發者ID:damianob,項目名稱:xcsoar,代碼行數:13,代碼來源:ProgressBar.cpp

示例12: Move

  void Move(PixelScalar left, PixelScalar top) {
    AssertNoneLocked();
    AssertThread();

#ifndef USE_GDI
    position = { left, top };
    Invalidate();
#else
    ::SetWindowPos(hWnd, nullptr, left, top, 0, 0,
                   SWP_NOSIZE | SWP_NOZORDER |
                   SWP_NOACTIVATE | SWP_NOOWNERZORDER);
#endif
  }
開發者ID:Adrien81,項目名稱:XCSoar,代碼行數:13,代碼來源:Window.hpp

示例13: AssertNoneLocked

void
Window::SetCapture()
{
  AssertNoneLocked();
  AssertThread();

  if (parent != nullptr)
    parent->SetChildCapture(this);
  else
    EnableCapture();

  capture = true;
}
開發者ID:LK8000,項目名稱:LK8000,代碼行數:13,代碼來源:Window.cpp


注:本文中的AssertNoneLocked函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。