求指点,VC对话框程序
											如何请问要是用VC创建一个对话框程序,然后要求在主窗口上显示英文单词,然后点击“显示”按钮,会显示相应中文。这要怎么实现呢?英文单词表我有access和txt两种版本的,怎么加入到程序中呢?或者是有什么其他更好的实现方法呢?										
					
	 2011-05-17 20:54
	    2011-05-17 20:54
   2011-05-17 20:55
	    2011-05-17 20:55
   2011-05-17 20:55
	    2011-05-17 20:55
  
 2011-05-17 20:58
	    2011-05-17 20:58
   2011-05-17 21:03
	    2011-05-17 21:03
   2011-05-17 21:57
	    2011-05-17 21:57
   程序代码:
程序代码:#include <windows.h>
#include "resource.h" /*添加资源文件头*/
typedef HINSTANCE _h; 
/*对话框过程处理*/
BOOL CALLBACK DlgProc(HWND, UINT, WPARAM, LPARAM); 
/*主程序入口*/
int WINAPI WinMain(_h hInst, _h, LPSTR, int)
{
    /*创建对话框*/
    return DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_DIALOG1), NULL, DlgProc, NULL);
} 
/*对话框过程处理回调函数*/ 
BOOL CALLBACK DlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    char string[256];
    switch(uMsg)
    {
        case WM_INITDIALOG: /*对话框初始化,你的初始化代码可以放这里*/
            return TRUE;
        case WM_COMMAND: /*控件消息处理*/
            switch(LOWORD(wParam))
            {
                case IDOK:
                    GetDlgItemText(hwnd, IDC_EDIT1, string, 255);
                    MessageBox(hwnd, string, "Hello", MB_OK);
                    SetDlgItemText(hwnd, IDC_EDIT1, "Sample");
                    SetDlgItemText(hwnd, IDC_STATIC1, "Sample");
                    break;
                case IDCANCEL:
                    EndDialog(hwnd, 0);
                    break;
            }
            return TRUE;
        case WM_CLOSE: /*对话框关闭时处理*/
            EndDialog(hwnd, 0);
            break;
    }
    return FALSE;
}case IDOK那里的代码就换成你读单词表,得到转换结果,然后用SetDlgItemText(hwnd, IDC_STATIC, "Sample");显示结果,读取控件内容用GetDlgItemText();
 2011-05-18 10:47
	    2011-05-18 10:47
   Sample.rar
				(15.13 KB)
Sample.rar
				(15.13 KB)
				
				
			
 2011-05-18 10:50
	    2011-05-18 10:50
   2011-05-18 12:18
	    2011-05-18 12:18
  
 2011-05-18 12:41
	    2011-05-18 12:41