Time of Update: 2018-12-06
#include <atlrx.h> // 檢查email CAtlString strNewEmail = _T("you email address"); if ( !strNewEmail.IsEmpty() ) { CAtlRegExp<> rxEmail; rxEmail.Parse(L"^\\a+@\\a+\\.\\a+$"); CAtlREMatchContext<>
Time of Update: 2018-12-06
想要運行同步模式的Pro/Toolkit程式,需要用到註冊檔案。它記錄了Pro/Toolkit程式的一些必要資訊從而讓ProE程式能找到並載入該Toolkit程式。ProE啟動時,會通過以下方式搜尋註冊檔案以載入Toolkit程式。A、在config檔案中,通過PROTKDAT、PRODEVDAT、TOOLKIT_REGISTRY_FILE指定的絕對路徑。B、目前的目錄下的protk.dat檔案或prodev.dat檔案。C、<Pro/ENGINEER>/<MACHINE&
Time of Update: 2018-12-06
VC編程中經常需要彈出選擇檔案夾對話方塊供使用者選擇目標檔案夾基本實現的源碼如下 1 void CTestDlg::OnBtnTest() 2 { 3 // TODO: Add your control notification handler code here 4 TCHAR pszPath[MAX_PATH]; 5 BROWSEINFO bi; 6 bi.hwndOwner = this->GetSafeHwnd();
Time of Update: 2018-12-06
下載:開發Pro/Toolkit應用程式.docx
Time of Update: 2018-12-06
下載:Pro/Toolkit資料結構.docx
Time of Update: 2018-12-06
在Windows編程,常涉及到操作FTP的需求。以下為個人總結的一些範例程式碼: 1 // 2 //********************************************************* 3 //Ftp basic operation 4 //********************************************************* 5 // 6 // 7 //1. connect to ftp 8 // 9 BOOL
Time of Update: 2018-12-06
ProToolkit中的面用ProSurface來表達,在ProToolkit的協助文檔中,指明了ProSurface下有三種類型的面:ProSurface--Surface, datum surface, or datum plane但這三種面有什麼區別呢:1、Surface 指的是實體面,比如你通過展開建立一個立方體,這個立方體的6個面就是Surface。遍曆ProSolid下的所有Surface可以通過函數ProSolidSurfaceVisit實現。 2、datum
Time of Update: 2018-12-06
一、 現有一對話方塊如下單擊按鈕會彈出Hello訊息框,如所示:現要在點擊按鈕時類比的單擊響應事件,實現代碼如下:void CTestDlg::OnBnClickedBtnTest(){ // TODO: Add your control notification handler code here WPARAM wParam; wParam = BN_CLICKED; wParam <<= 16; // 左移16位 wParam |= IDC_BT
Time of Update: 2018-12-06
下載:ex01_wildfire3_Src ex01_wildfire4_Src代碼如下: 1 #include <ProToolkit.h> 2 #include <ProCore.h> 3 #include <windows.h> 4 5 int main() 6 { 7 ProEngineerStart("F:\\PTC\\Wildfire3\\bin\\proe1.bat", ""); 8
Time of Update: 2018-12-06
參考文章:http://www.cnblogs.com/zhangpengshou/archive/2009/07/11/1520819.html基本上是按照這篇文章所寫的方法來做的,只有稍許改動。在VC6.0下實現的步驟如下:一、建立基於對話方塊的MFC程式二、匯入一表徵圖ICON,ID設為IDI_TRAY三、為建立的對話方塊類新增成員變數 NOTIFYICONDATA m_nid;四、自訂訊息,後面會用到。#define WM_SHOWTASK
Time of Update: 2018-12-06
一、建立MFC Dll工程並配置環境參考文章VS2005+ProE3.0參考:ProE二次開發之VS2005+ProE Wildfire 3.0開發環境配置VS2005+ProE4.0參考:ProE二次開發之VS2005+ProE Wildfire 4.0開發環境配置 二、在工程中添加如下代碼//-----------------------------------------------------------------------------//**********************
Time of Update: 2018-12-06
下載:ex02_wildfire3_Src ex02_wildfire4_Src代碼如下: 1 #include <ProToolkit.h> 2 #include <ProWindows.h> 3 #include <windows.h> 4 5 extern "C" int user_initialize() 6 { 7 int a; 8 ProWindowCurrentGet(&a); 9
Time of Update: 2018-12-06
最近在研究怎樣利用VC壓縮與解壓縮檔案上網Google和Baidu發現這類相關的文章不是很多,於是整理一下搜羅了一晚上的成果:利用InfoZip壓縮與解壓縮檔案具體怎麼用請參考文章http://www.vckbase.com/document/viewdoc/?id=315我在這裡只列出我編寫一個測試執行個體的內容一、下載dll與cpp檔案具體下載的地址為:http://www.bianceng.cn/Programming/vc/201011/20300.htm二、將上述檔案拷貝到工程目錄三、
Time of Update: 2018-12-06
1 void AfxMessageBoxFormatted(LPCTSTR pFormatString, ...)2 {3 va_list vl;4 va_start(vl, pFormatString);5 CString strFormat;6 strFormat.FormatV(pFormatString, vl);7 AfxMessageBox(strFormat);8 }1 void MessageBoxFormatted(HWND hWnd,
Time of Update: 2018-12-06
函數:ShowCurrModelName注意:ShowCurrModelName_Access函數保證只有在ProE有開啟Part檔或Asm檔時命令才有效源碼下載:http://download.csdn.net/detail/wangyao1052/4917016//-----------------------------------------------------------------------------//************************************
Time of Update: 2018-12-06
預設情況下Enter鍵訊息會響應OnOK,Esc鍵訊息會響應OnCancel可以參看dlgcore.cpp中CDialog中的訊息映射 1 BEGIN_MESSAGE_MAP(CDialog, CWnd) 2 ON_COMMAND(IDOK, &CDialog::OnOK) 3 ON_COMMAND(IDCANCEL, &CDialog::OnCancel) 4 END_MESSAGE_MAP() 5 6 void CDialog::OnOK() 7 { 8 if
Time of Update: 2018-12-06
範常式序下載:http://download.csdn.net/detail/wangyao1052/4918041Dll1.hView Code #ifndef _DLL1_H_#define _DLL1_H_#ifndef DLL1_API#define DLL1_API __declspec(dllimport)#endif// 匯出函數DLL1_API int add(int a, int b);// 匯出類class DLL1_API A{public: int add(int
Time of Update: 2018-12-06
非模態對話方塊相對於模態對話方塊,它的建立和銷毀過程和模態對話方塊有一點區別,先看一下MSDN的原文:When you implement a modeless dialog box, always override the OnCancel member function and call DestroyWindow from within it. Don’t call the base class CDialog::OnCancel, because it calls EndDialog,
Time of Update: 2018-12-06
一、下載Markup.cpp 和 Markup.h:http://www.firstobject.com/dn_markup.htm 解壓縮二、將此兩個檔案放置於工程目錄下三、在需要用到CMarkup的地方 #include "Markup.h" 當然VC中還需要配置一下環境在VC6.0下:a.在Markup.cpp的頂端加上 #include"stdafx.h" 或者b.關閉Markup.cpp的先行編譯頭設定,具體方法如下: Project->Setting
Time of Update: 2018-12-06
完全參考<<Windows程式設計 第五版>>Win32 Hello World程式源碼如下: 1 #include <windows.h> 2 3 LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); 4 5 int WINAPI WinMain(HINSTANCE hInstance, 6 HINSTANCE hPrevInstance, 7