关于vc的对话框的小问题. 我在VC 的过程中,忽然有个这样的问题:就是对话框中的最小化,最大化,关闭的几个资源,是VC自己生成的,可是我想知道它在什么地方可以看到它存在的体现.谢谢. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 .rc,资源文件里体现,你可以用记事本打开它看看IDD_xxxxx_DIALOG 后面的STYLE来体现。 是系统菜单吗?系统里的东西,只能用api控制,自己的工程中是找不到的看看下面这一小段代码同样包含你说的:#include <windows.h>static TCHAR szAppName[] = TEXT ("TEST");static TCHAR szWndName[] = TEXT ("TEST");LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow){ 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) GetStockObject (WHITE_BRUSH) ; wndclass.lpszMenuName = NULL ; wndclass.lpszClassName = szAppName ; if (!RegisterClass (&wndclass)) { MessageBox (NULL, TEXT ("This program requires Windows NT!"), szAppName, MB_ICONERROR) ; return 0 ; } hwnd = CreateWindow (szAppName, szWndName, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL) ; ShowWindow (hwnd, iCmdShow) ; UpdateWindow (hwnd) ; while (GetMessage (&msg, NULL, 0, 0)) { TranslateMessage (&msg) ; DispatchMessage (&msg) ; } return msg.wParam ;}LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){ switch(message) { case WM_DESTROY: PostMessage(hwnd, WM_QUIT, 0, 0); break; default: break; } return DefWindowProc(hwnd, message, wParam, lParam);} 只要选择相关的Style 就有这些功能了不用想那么多,这是HWND 的基本功能 大家可能只有一个人明白了楼主的意思,那就是 Zhymax(蓝点) 这个问题比较恶心,请大家帮忙 求救,请问各位高手哪里有关于vc与access的制作小型数据库管理系统的技术文章?(在线等) DOS下我会,WINDOW下如何做? 一个关于系统钩子的问题 帮帮忙! 如何进行[二进制]除法,取整,取余。 高手们讲讲OnNotify()吧 怎样获得绘图的区域大小?? 0xc0000005 access violation问题 急!!!!! 用RichEditCtrl读取大文本???????? 帮我看看我的代码,给我讲下他咋运行地被,自己写的程序自己搞不懂咋运行成功地。。。。郁闷。。。 关于~奇怪的问题(运行结果)
IDD_xxxxx_DIALOG 后面的STYLE来体现。
static TCHAR szAppName[] = TEXT ("TEST");
static TCHAR szWndName[] = TEXT ("TEST");LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
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) GetStockObject (WHITE_BRUSH) ;
wndclass.lpszMenuName = NULL ;
wndclass.lpszClassName = szAppName ;
if (!RegisterClass (&wndclass)) {
MessageBox (NULL, TEXT ("This program requires Windows NT!"),
szAppName, MB_ICONERROR) ;
return 0 ;
}
hwnd = CreateWindow (szAppName, szWndName,
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
NULL, NULL, hInstance, NULL) ;
ShowWindow (hwnd, iCmdShow) ;
UpdateWindow (hwnd) ;
while (GetMessage (&msg, NULL, 0, 0)) {
TranslateMessage (&msg) ;
DispatchMessage (&msg) ;
}
return msg.wParam ;
}LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message) {
case WM_DESTROY:
PostMessage(hwnd, WM_QUIT, 0, 0);
break;
default:
break;
}
return DefWindowProc(hwnd, message, wParam, lParam);
}
不用想那么多,这是HWND 的基本功能