设为首页 加入收藏

TOP

子视窗控制项(三十一)
2010-12-30 21:12:42 来源: 作者: 【 】 浏览:32712
Tags:视窗 控制
wLong (hwnd, GWL_HINSTANCE) ;

// Create the white-rectangle window against which the
// scroll bars will be positioned. The child window ID is 9.

hwndRect = CreateWindow (TEXT ("static"), NULL,
WS_CHILD | WS_VISIBLE | SS_WHITERECT,
0, 0, 0, 0,
hwnd, (HMENU) 9, hInstance, NULL) ;

for (i = 0 ; i < 3 ; i++)
{
// The three scroll bars have IDs 0, 1, and 2, with
// scroll bar ranges from 0 through 255.

hwndScroll[i] = CreateWindow (TEXT ("scrollbar"), NULL,
WS_CHILD | WS_VISIBLE |
WS_TABSTOP | SBS_VERT,
0, 0, 0, 0,
hwnd, (HMENU) i, hInstance, NULL) ;

SetScrollRange (hwndScroll[i], SB_CTL, 0, 255, FALSE) ;
SetScrollPos (hwndScroll[i], SB_CTL, 0, FALSE) ;

// The three color-name labels have IDs 3, 4, and 5,
// and text strings "Red", "Green", and "Blue".

hwndLabel [i] = CreateWindow (TEXT ("static"), zColorLabel[i],
WS_CHILD | WS_VISIBLE | SS_CENTER,
0, 0, 0, 0,
hwnd, (HMENU) (i + 3),
hInstance, NULL) ;

// The three color-value text fields have IDs 6, 7,
// and 8, and initial text strings of "0".

hwndValue [i] = CreateWindow (TEXT ("static"), TEXT ("0"),
WS_CHILD | WS_VISIBLE | SS_CENTER,
0, 0, 0, 0,
hwnd, (HMENU) (i + 6),
hInstance, NULL) ;

OldScroll[i] =
首页 上一页 28 29 30 31 32 33 34 下一页 尾页 31/61/61
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇功能表及其他资源 下一篇计时器

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: