api函數(shù)編寫的winmain和d3d初始化
標(biāo)簽: winmain api d3d 函數(shù)
上傳時(shí)間: 2016-01-19
上傳用戶:凌云御清風(fēng)
winmain.cpp 一個(gè)很小的程序 隨便寫的一個(gè)程序源代碼
上傳時(shí)間: 2014-09-06
上傳用戶:水中浮云
Rational Visual Test 6.0 Bible評價(jià)很高的一個(gè)工具,通過工具winmain,還可以測試UNIX 的 GUI程序
標(biāo)簽: Rational Visual Bible Test
上傳時(shí)間: 2013-12-18
上傳用戶:libinxny
這個(gè)程序主要是在WinCE環(huán)境下開發(fā)訪問SQLCE數(shù)據(jù)庫程序的例子程序,其中有對相關(guān)功能進(jìn)行了組件封裝,采用套間線程模型。其中ALTCOMM項(xiàng)目是封裝的組件,winmain項(xiàng)目是調(diào)用程序。
標(biāo)簽: WinCE SQLCE 程序 環(huán)境
上傳時(shí)間: 2014-11-01
上傳用戶:zhoujunzhen
講述MFC AppWizard的原理與MFC程序框架的剖析。AppWizard是一個(gè)源代碼生成工具,是計(jì)算機(jī)輔助程序設(shè)計(jì)工具,winmain在MFC程序中是如何從源程序中被隱藏的,theApp全局變量是如何被分配的,MFC框架中的幾個(gè)類的作用與相互關(guān)系,MFC框架窗口是如何產(chǎn)生和銷毀的,對窗口類的PreCreateWidow和OnCreate兩個(gè)函數(shù)的著重分析,Windows窗口與C++中的CWnd類的關(guān)系。
標(biāo)簽: AppWizard MFC 程序 源代碼
上傳時(shí)間: 2014-01-12
上傳用戶:kelimu
講述MFC AppWizard的原理與MFC程序框架的剖析。AppWizard是一個(gè)源代碼生成工具,是計(jì)算機(jī)輔助程序設(shè)計(jì)工具,winmain在MFC程序中是如何從源程序中被隱藏的,theApp全局變量是如何被分配的,MFC框架中的幾個(gè)類的作用與相互關(guān)系,MFC框架窗口是如何產(chǎn)生和銷毀的,對窗口類的PreCreateWidow和OnCreate兩個(gè)函數(shù)的著重分析,Windows窗口與C++中的CWnd類的關(guān)系。適合初學(xué)者。
標(biāo)簽: AppWizard MFC 程序 源代碼
上傳時(shí)間: 2016-11-21
上傳用戶:ddddddos
以傳統(tǒng)的C/SDK 撰寫Windows 程序,最大的好處是可以清楚看見整個(gè)程序的來龍去脈 和消息動(dòng)向,然而這些重要的動(dòng)線在MFC 應(yīng)用程序中卻隱晦不明,因?yàn)樗鼈儽籄pplication Framework 包起來了。這一章主要目的除了解釋MFC 應(yīng)用程序的長像,也要從MFC 源代 碼中檢驗(yàn)出一個(gè)Windows 程序原本該有的程序進(jìn)入點(diǎn)(winmain)、視窗類別注冊 (RegisterClass)、窗口產(chǎn)生(CreateWindow)、消息循環(huán)(Message Loop)、窗口函數(shù) (WindowProcedure)等等動(dòng)作,抽絲剝繭徹底了解一個(gè)MFC 程序的誕生與結(jié)束,以及生 命過程。
上傳時(shí)間: 2017-03-22
上傳用戶:athjac
MFC經(jīng)典教材的源代碼 講述MFC AppWizard的原理與MFC程序框架的剖析。AppWizard是一個(gè)源代碼生成工具,是計(jì)算機(jī)輔助程序設(shè)計(jì)工具,winmain在MFC程序中是如何從源程序中被隱藏的,theApp全局變量是如何被分配的,MFC框架中的幾個(gè)類的作用與相互關(guān)系,MFC框架窗口是如何產(chǎn)生和銷毀的,對窗口類的PreCreateWidow和OnCreate兩個(gè)函數(shù)的著重分析,Windows窗口與C++中的CWnd類的關(guān)系。
標(biāo)簽: AppWizard MFC 源代碼 教材
上傳時(shí)間: 2017-08-08
上傳用戶:時(shí)代電子小智
// 學(xué)生管理.cpp : Defines the entry point for the application. // #include "stdafx.h" #include "resource.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance TCHAR szTitle[MAX_LOADSTRING]; // The title bar text TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text // Foward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); struct person { char name[10]; int ID; int cj_yw; int cj_sx; struct person* next; struct person* pro; }per; int APIENTRY winmain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // TODO: Place code here. MSG msg; HACCEL hAccelTable; // Initialize global strings LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadString(hInstance, IDC_MY, szWindowClass, MAX_LOADSTRING); MyRegisterClass(hInstance); // Perform application initialization: if (!InitInstance (hInstance, nCmdShow)) { return FALSE; } hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_MY); // Main message loop: while (GetMessage(&msg, NULL, 0, 0)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return msg.wParam; } // // FUNCTION: MyRegisterClass() // // PURPOSE: Registers the window class. // // COMMENTS: // // This function and its usage is only necessary if you want this code // to be compatible with Win32 systems prior to the 'RegisterClassEx' // function that was added to Windows 95. It is important to call this function // so that the application will get 'well formed' small icons associated // with it. // ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = (WNDPROC)WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_MY); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = (LPCSTR)IDC_MY; wcex.lpszClassName = szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL); return RegisterClassEx(&wcex); } // // FUNCTION: InitInstance(HANDLE, int) // // PURPOSE: Saves instance handle and creates main window // // COMMENTS: // // In this function, we save the instance handle in a global variable and // create and display the main program window. // BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { HWND hWnd; hInst = hInstance; // Store instance handle in our global variable hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL); if (!hWnd) { return FALSE; } ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); return TRUE; } // // FUNCTION: WndProc(HWND, unsigned, WORD, LONG) // // PURPOSE: Processes messages for the main window. // // WM_COMMAND - process the application menu // WM_PAINT - Paint the main window // WM_DESTROY - post a quit message and return // // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; TCHAR szHello[MAX_LOADSTRING]; LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING); switch (message) { case WM_COMMAND: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) { case IDM_ABOUT: DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About); break; case IDM_EXIT: DestroyWindow(hWnd); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } break; case WM_PAINT: hdc = BeginPaint(hWnd, &ps); // TODO: Add any drawing code here... RECT rt; GetClientRect(hWnd, &rt); DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER); EndPaint(hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; } // Mesage handler for about box. LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { EndDialog(hDlg, LOWORD(wParam)); return TRUE; } break; } return FALSE; }
上傳時(shí)間: 2016-12-29
上傳用戶:767483511
// 學(xué)生管理.cpp : Defines the entry point for the application. // #include "stdafx.h" #include "resource.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance TCHAR szTitle[MAX_LOADSTRING]; // The title bar text TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text // Foward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); struct person { char name[10]; int ID; int cj_yw; int cj_sx; struct person* next; struct person* pro; }per; int APIENTRY winmain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // TODO: Place code here. MSG msg; HACCEL hAccelTable; // Initialize global strings LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadString(hInstance, IDC_MY, szWindowClass, MAX_LOADSTRING); MyRegisterClass(hInstance); // Perform application initialization: if (!InitInstance (hInstance, nCmdShow)) { return FALSE; } hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_MY); // Main message loop: while (GetMessage(&msg, NULL, 0, 0)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return msg.wParam; } // // FUNCTION: MyRegisterClass() // // PURPOSE: Registers the window class. // // COMMENTS: // // This function and its usage is only necessary if you want this code // to be compatible with Win32 systems prior to the 'RegisterClassEx' // function that was added to Windows 95. It is important to call this function // so that the application will get 'well formed' small icons associated // with it. // ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = (WNDPROC)WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_MY); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = (LPCSTR)IDC_MY; wcex.lpszClassName = szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL); return RegisterClassEx(&wcex); } // // FUNCTION: InitInstance(HANDLE, int) // // PURPOSE: Saves instance handle and creates main window // // COMMENTS: // // In this function, we save the instance handle in a global variable and // create and display the main program window. // BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { HWND hWnd; hInst = hInstance; // Store instance handle in our global variable hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL); if (!hWnd) { return FALSE; } ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); return TRUE; } // // FUNCTION: WndProc(HWND, unsigned, WORD, LONG) // // PURPOSE: Processes messages for the main window. // // WM_COMMAND - process the application menu // WM_PAINT - Paint the main window // WM_DESTROY - post a quit message and return // // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; TCHAR szHello[MAX_LOADSTRING]; LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING); switch (message) { case WM_COMMAND: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) { case IDM_ABOUT: DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About); break; case IDM_EXIT: DestroyWindow(hWnd); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } break; case WM_PAINT: hdc = BeginPaint(hWnd, &ps); // TODO: Add any drawing code here... RECT rt; GetClientRect(hWnd, &rt); DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER); EndPaint(hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; } // Mesage handler for about box. LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { EndDialog(hDlg, LOWORD(wParam)); return TRUE; } break; } return FALSE; }
標(biāo)簽: 學(xué)生 計(jì)算器
上傳時(shí)間: 2016-12-29
上傳用戶:767483511
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1