设为首页 加入收藏

TOP

子视窗控制项(五十)
2010-12-30 21:12:42 来源: 作者: 【 】 浏览:32677
Tags:视窗 控制
项以及如何取得字串,现在是到了写一个应用程式的时候了。如程式9-5中所示,ENVIRON程式在显示区域中使用清单方块来显示目前作业系统环境变数(例如PATH和WINDIR)。当您选择一个环境变数时,其内容将显示在显示区域的顶部。

 程式9-5 ENVIRON
ENVIRON.C
/*-------------------------------------------------------------------------
ENVIRON.C -- Environment List Box
(c) Charles Petzold, 1998
---------------------------------------------------------------------------*/

#include <windows.h>
#define ID_LIST 1
#define ID_TEXT 2

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT ("Environ") ;
HWND hwnd ;
MSG msg ;
WNDCLASS wndclass ;

wndclass.style = CS_HREDRAW | CS_VREDRAW ;
wndclass.lpfnWndProc = WndProc ;
wndclass.cbClsExtra = 0 ;
wndclass.cbWndExtra = 0 ;
wndclass.hInstance = hInstance ;
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
wndclass.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1) ;
wndclass.lpszMenuName = NULL ;
wndclass.lpszClas
首页 上一页 47 48 49 50 51 52 53 下一页 尾页 50/61/61
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇功能表及其他资源 下一篇计时器

评论

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