// temp.cpp : 定义应用程序的入口点。
//
#include "stdafx.h"
#include "temp.h"
#define MAX_LOADSTRING 50
// 全局变量:
HINSTANCE hInst; // 当前实例
TCHAR szTitle[MAX_LOADSTRING]; // 标题栏文本
TCHAR szWindowClass[MAX_LOADSTRING]; // 主窗口类名
// 此代码模块中包含的函数的前向声明:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR About(HWND, UINT, WPARAM, LPARAM);
int APIENTRY _tWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPTSTR lpCmdLine,int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// TODO: 在此放置代码。
MSG msg;
HACCEL hAccelTable;
// 初始化全局字符串
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hInstance, IDC_TEMP, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance);
// 执行应用程序初始化:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}
hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_TEMP));
// 主消息循环:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return (int) msg.wParam;
}
//
// 函数: MyRegisterClass()
//
// 目的: 注册窗口类。
//
// 注释:
//
// 仅当希望
// 此代码与添加到 Windows 95 中的“RegisterClassEx”
// 函数之前的 Win32 系统兼容时,才需要此函数及其用法。调用此函数十分重要,
// 这样应用程序就可以获得关联的
// “格式正确的”小图标。
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEX wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDM_ABOUT));
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)GetStockObject(DKGRAY_BRUSH);//(HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = NULL;//((LPWSTR)((ULONG_PTR)((WORD)(IDR_MENU1))));//MAKEINTRESOURCE(IDR_MENU1);//MAKEINTRESOURCE(IDC_TEMP);
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
return RegisterClassEx(&wcex);
}
//
// 函数: InitInstance(HINSTANCE, int)
//
// 目的: 保存实例句柄并创建主窗口
//
// 注释:
//
// 在此函数中,我们在全局变量中保存实例句柄并
// 创建和显示主程序窗口。
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;
hInst = hInstance; // 将实例句柄存储在全局变量中
//hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,0, 0, 352, 288, NULL, NULL, hInstance, NULL);
if (!hWnd)
{
return FALSE;
}
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}
//
// 函数: WndProc(HWND, UINT, WPARAM, LPARAM)
//
// 目的: 处理主窗口的消息。
//
// WM_COMMAND - 处理应用程序菜单
// WM_PAINT - 绘制主窗口
// WM_DESTROY - 发送退出消息并返回
//
//
LRESULT WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId; //wmEvent;
PAINTSTRUCT ps;
HDC hdc;
static HWND hwndButton,m_hWndMode,m_hWndMode2;
static HMENU hMenu,hPopMenu1,hPopMenu2;
switch (message)
{
case WM_COMMAND:
if(((HWND)lParam ==hwndButton) && (HIWORD(wParam) ==BN_CLICKED))
{
//SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)(L"休闲模式"));
TCHAR str[100];
int i;
i=SendMessage(m_hWndMode, CB_GETCURSEL , (WPARAM)10, (LPARAM)0);
if (i!=-1)
{
SendMessage(m_hWndMode, CB_GETLBTEXT , (WPARAM)i, (LPARAM)str);
MessageBox(hWnd,str,_T(""),MB_OK);
}
//HWND temp;
//temp = FindWindowEx(hWnd,NULL,L"combobox",NULL);
//RECT rc;
//GetWindowRect(m_hWndMode,&rc);
//MoveWindow(m_hWndMode,rc.left,rc.top,50,50,0);
}
wmId = LOWORD(wParam);
//wmEvent = HIWORD(wParam);
// 分析菜单选择:
switch (wmId)
{
case ID_32771:
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
case 40005://ID_32773:
//DestroyWindow(hWnd);
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_PAINT:
{
hdc = BeginPaint(hWnd, &ps);
// TODO: 在此添加任意绘图代码...
///////////////////////////////////////////////////修改字体
//首先保留原来的字体
HFONT oldfont = (HFONT)SelectObject(hdc,(HFONT)GetStockObject(DEFAULT_GUI_FONT));
TextOut(hdc,0,0,_T("陈佑忠的API程序"),_tcslen(_T("陈佑忠的API程序")));
SelectObject(hdc,oldfont);//恢复原来的字体
///////////////////////////////////////////////////修改画笔
//首先保留原来的画笔
HPEN newpen = CreatePen(PS_SOLID,1,RGB(255,0,0));
HPEN oldpen = (HPEN)SelectObject(hdc,newpen);
Ellipse(hdc, 40, 100, 40+200, 100+50);
SelectObject(hdc, oldpen);//恢复原来的画笔
///////////////////////////////////////////////////
HFONT oldfont2 = (HFONT)SelectObject(hdc,(HFONT)GetStockObject(DEFAULT_GUI_FONT));
SetTextColor(hdc,RGB(255,0,0)); //设置文字颜色和背景模式
SetBkMode(hdc,TRANSPARENT);///透明
TextOut(hdc,40,14,_T("陈佑忠的API程序"),_tcslen(_T("陈佑忠的API程序")));
SetTextColor(hdc,RGB(0,255,0));//改变文字颜色
TextOut(hdc,80,26,_T("陈佑忠的API程序"),_tcslen(_T("陈佑忠的API程序")));
SelectObject(hdc,oldfont2);
///////////////////////////////////////////////////
EndPaint(hWnd, &ps);
}
break;
case WM_MBUTTONDOWN: //鼠标中键消息截获
HDC myhDC,testDC;
myhDC = GetDC(hWnd);
TextOut(myhDC,90,116,_T("鼠标中键被点击"),_tcslen(_T("鼠标中键被点击")));
ReleaseDC(hWnd,myhDC);
testDC = GetDC(m_hWndMode);
TextOut(testDC,0,0,_T("鼠标"),_tcslen(_T("鼠标")));
ReleaseDC(m_hWndMode,testDC);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_CTLCOLOREDIT:
{
if((HWND)lParam ==m_hWndMode)
{
HDC hdc = (HDC)wParam;
SetTextColor(hdc, RGB(255,0,0));
SetBkColor(hdc, RGB(255,255,0));
SetBkMode(hdc, TRANSPARENT);
}
if((HWND)lParam ==m_hWndMode2)
{
HDC hdc = (HDC)wParam;
SetTextColor(hdc, RGB(255,0,0));
SetBkColor(hdc, RGB(255,0,255));
SetBkMode(hdc, TRANSPARENT);
}
return (INT_PTR)CreateSolidBrush(RGB(255,0,0));
}
break;
case WM_CREATE:
{
hMenu =CreateMenu();
hPopMenu1 =CreateMenu();
hPopMenu2 =CreateMenu();
TCHAR a[20]=_T("新建"),b[20]=_T("打开"),c[20]=_T("关于"),d[20]=_T("帮助"),e[20]=_T("文件编辑(&F)");
AppendMenu(hPopMenu1,MF_STRING,40001,a);
AppendMenu(hPopMenu1,MF_DISABLED,40002,b);
AppendMenu(hPopMenu2,MF_STRING,40005,c);
AppendMenu(hPopMenu1,MF_POPUP, (UINT)hPopMenu2, d);
AppendMenu(hMenu,MF_POPUP,(UINT)hPopMenu1,e);
SetMenu(hWnd,hMenu);
m_hWndMode = CreateWindow(_T("combobox"),NULL,CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE |CBS_NOINTEGRALHEIGHT| WS_BORDER ,43,50,88,900,hWnd,NULL,NULL,NULL);
m_hWndMode2 = CreateWindow(_T("combobox"),NULL,CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE |CBS_NOINTEGRALHEIGHT| WS_BORDER ,43,80,88,900,hWnd,NULL,NULL,NULL);
SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"陈佑忠");
SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"曾净");
SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"陈昭奇");
SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"李凤兰");
SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"罗宏");
SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"陈佑春");
hwndButton = CreateWindow(_T("button"),_T("执行"),WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,140,48,100,25,hWnd,NULL,NULL,NULL);
HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
//通过消息改变控件(子窗口)字体
SendMessage(m_hWndMode,WM_SETFONT,(WPARAM)hFont,1);
SendMessage(hwndButton,WM_SETFONT,(WPARAM)hFont,1);
}
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
// “关于”框的消息处理程序。
INT_PTR About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
UNREFERENCED_PARAMETER(lParam);
switch (message)
{
case WM_INITDIALOG:
SendDlgItemMessage(hDlg, IDC_COMBO1, CB_ADDSTRING, (WPARAM)0, (LPARAM)_T("1"));
//SendDlgItemMessage(hDlg, IDC_COMBO1, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"False");
return (INT_PTR)TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL || LOWORD(wParam) == IDC_BUTTON1)
{
//MessageBox(hDlg,L"213",0,0);
EndDialog(hDlg, LOWORD(wParam));
//SendDlgItemMessage(hDlg, IDC_COMBO1, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"Sure");
return (INT_PTR)TRUE;
}
break;
}
return (INT_PTR)FALSE;
}
//
#include "stdafx.h"
#include "temp.h"
#define MAX_LOADSTRING 50
// 全局变量:
HINSTANCE hInst; // 当前实例
TCHAR szTitle[MAX_LOADSTRING]; // 标题栏文本
TCHAR szWindowClass[MAX_LOADSTRING]; // 主窗口类名
// 此代码模块中包含的函数的前向声明:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR About(HWND, UINT, WPARAM, LPARAM);
int APIENTRY _tWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPTSTR lpCmdLine,int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// TODO: 在此放置代码。
MSG msg;
HACCEL hAccelTable;
// 初始化全局字符串
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hInstance, IDC_TEMP, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance);
// 执行应用程序初始化:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}
hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_TEMP));
// 主消息循环:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return (int) msg.wParam;
}
//
// 函数: MyRegisterClass()
//
// 目的: 注册窗口类。
//
// 注释:
//
// 仅当希望
// 此代码与添加到 Windows 95 中的“RegisterClassEx”
// 函数之前的 Win32 系统兼容时,才需要此函数及其用法。调用此函数十分重要,
// 这样应用程序就可以获得关联的
// “格式正确的”小图标。
//
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEX wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDM_ABOUT));
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)GetStockObject(DKGRAY_BRUSH);//(HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = NULL;//((LPWSTR)((ULONG_PTR)((WORD)(IDR_MENU1))));//MAKEINTRESOURCE(IDR_MENU1);//MAKEINTRESOURCE(IDC_TEMP);
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
return RegisterClassEx(&wcex);
}
//
// 函数: InitInstance(HINSTANCE, int)
//
// 目的: 保存实例句柄并创建主窗口
//
// 注释:
//
// 在此函数中,我们在全局变量中保存实例句柄并
// 创建和显示主程序窗口。
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;
hInst = hInstance; // 将实例句柄存储在全局变量中
//hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,0, 0, 352, 288, NULL, NULL, hInstance, NULL);
if (!hWnd)
{
return FALSE;
}
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}
//
// 函数: WndProc(HWND, UINT, WPARAM, LPARAM)
//
// 目的: 处理主窗口的消息。
//
// WM_COMMAND - 处理应用程序菜单
// WM_PAINT - 绘制主窗口
// WM_DESTROY - 发送退出消息并返回
//
//
LRESULT WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId; //wmEvent;
PAINTSTRUCT ps;
HDC hdc;
static HWND hwndButton,m_hWndMode,m_hWndMode2;
static HMENU hMenu,hPopMenu1,hPopMenu2;
switch (message)
{
case WM_COMMAND:
if(((HWND)lParam ==hwndButton) && (HIWORD(wParam) ==BN_CLICKED))
{
//SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)(L"休闲模式"));
TCHAR str[100];
int i;
i=SendMessage(m_hWndMode, CB_GETCURSEL , (WPARAM)10, (LPARAM)0);
if (i!=-1)
{
SendMessage(m_hWndMode, CB_GETLBTEXT , (WPARAM)i, (LPARAM)str);
MessageBox(hWnd,str,_T(""),MB_OK);
}
//HWND temp;
//temp = FindWindowEx(hWnd,NULL,L"combobox",NULL);
//RECT rc;
//GetWindowRect(m_hWndMode,&rc);
//MoveWindow(m_hWndMode,rc.left,rc.top,50,50,0);
}
wmId = LOWORD(wParam);
//wmEvent = HIWORD(wParam);
// 分析菜单选择:
switch (wmId)
{
case ID_32771:
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
case 40005://ID_32773:
//DestroyWindow(hWnd);
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_PAINT:
{
hdc = BeginPaint(hWnd, &ps);
// TODO: 在此添加任意绘图代码...
///////////////////////////////////////////////////修改字体
//首先保留原来的字体
HFONT oldfont = (HFONT)SelectObject(hdc,(HFONT)GetStockObject(DEFAULT_GUI_FONT));
TextOut(hdc,0,0,_T("陈佑忠的API程序"),_tcslen(_T("陈佑忠的API程序")));
SelectObject(hdc,oldfont);//恢复原来的字体
///////////////////////////////////////////////////修改画笔
//首先保留原来的画笔
HPEN newpen = CreatePen(PS_SOLID,1,RGB(255,0,0));
HPEN oldpen = (HPEN)SelectObject(hdc,newpen);
Ellipse(hdc, 40, 100, 40+200, 100+50);
SelectObject(hdc, oldpen);//恢复原来的画笔
///////////////////////////////////////////////////
HFONT oldfont2 = (HFONT)SelectObject(hdc,(HFONT)GetStockObject(DEFAULT_GUI_FONT));
SetTextColor(hdc,RGB(255,0,0)); //设置文字颜色和背景模式
SetBkMode(hdc,TRANSPARENT);///透明
TextOut(hdc,40,14,_T("陈佑忠的API程序"),_tcslen(_T("陈佑忠的API程序")));
SetTextColor(hdc,RGB(0,255,0));//改变文字颜色
TextOut(hdc,80,26,_T("陈佑忠的API程序"),_tcslen(_T("陈佑忠的API程序")));
SelectObject(hdc,oldfont2);
///////////////////////////////////////////////////
EndPaint(hWnd, &ps);
}
break;
case WM_MBUTTONDOWN: //鼠标中键消息截获
HDC myhDC,testDC;
myhDC = GetDC(hWnd);
TextOut(myhDC,90,116,_T("鼠标中键被点击"),_tcslen(_T("鼠标中键被点击")));
ReleaseDC(hWnd,myhDC);
testDC = GetDC(m_hWndMode);
TextOut(testDC,0,0,_T("鼠标"),_tcslen(_T("鼠标")));
ReleaseDC(m_hWndMode,testDC);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_CTLCOLOREDIT:
{
if((HWND)lParam ==m_hWndMode)
{
HDC hdc = (HDC)wParam;
SetTextColor(hdc, RGB(255,0,0));
SetBkColor(hdc, RGB(255,255,0));
SetBkMode(hdc, TRANSPARENT);
}
if((HWND)lParam ==m_hWndMode2)
{
HDC hdc = (HDC)wParam;
SetTextColor(hdc, RGB(255,0,0));
SetBkColor(hdc, RGB(255,0,255));
SetBkMode(hdc, TRANSPARENT);
}
return (INT_PTR)CreateSolidBrush(RGB(255,0,0));
}
break;
case WM_CREATE:
{
hMenu =CreateMenu();
hPopMenu1 =CreateMenu();
hPopMenu2 =CreateMenu();
TCHAR a[20]=_T("新建"),b[20]=_T("打开"),c[20]=_T("关于"),d[20]=_T("帮助"),e[20]=_T("文件编辑(&F)");
AppendMenu(hPopMenu1,MF_STRING,40001,a);
AppendMenu(hPopMenu1,MF_DISABLED,40002,b);
AppendMenu(hPopMenu2,MF_STRING,40005,c);
AppendMenu(hPopMenu1,MF_POPUP, (UINT)hPopMenu2, d);
AppendMenu(hMenu,MF_POPUP,(UINT)hPopMenu1,e);
SetMenu(hWnd,hMenu);
m_hWndMode = CreateWindow(_T("combobox"),NULL,CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE |CBS_NOINTEGRALHEIGHT| WS_BORDER ,43,50,88,900,hWnd,NULL,NULL,NULL);
m_hWndMode2 = CreateWindow(_T("combobox"),NULL,CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE |CBS_NOINTEGRALHEIGHT| WS_BORDER ,43,80,88,900,hWnd,NULL,NULL,NULL);
SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"陈佑忠");
SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"曾净");
SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"陈昭奇");
SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"李凤兰");
SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"罗宏");
SendMessage(m_hWndMode, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"陈佑春");
hwndButton = CreateWindow(_T("button"),_T("执行"),WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,140,48,100,25,hWnd,NULL,NULL,NULL);
HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
//通过消息改变控件(子窗口)字体
SendMessage(m_hWndMode,WM_SETFONT,(WPARAM)hFont,1);
SendMessage(hwndButton,WM_SETFONT,(WPARAM)hFont,1);
}
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
// “关于”框的消息处理程序。
INT_PTR About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
UNREFERENCED_PARAMETER(lParam);
switch (message)
{
case WM_INITDIALOG:
SendDlgItemMessage(hDlg, IDC_COMBO1, CB_ADDSTRING, (WPARAM)0, (LPARAM)_T("1"));
//SendDlgItemMessage(hDlg, IDC_COMBO1, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"False");
return (INT_PTR)TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL || LOWORD(wParam) == IDC_BUTTON1)
{
//MessageBox(hDlg,L"213",0,0);
EndDialog(hDlg, LOWORD(wParam));
//SendDlgItemMessage(hDlg, IDC_COMBO1, CB_ADDSTRING, (WPARAM)0, (LPARAM)L"Sure");
return (INT_PTR)TRUE;
}
break;
}
return (INT_PTR)FALSE;
}