本文整理汇总了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;未经允许,请勿转载。 |
请发表评论