1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0023456: Update MFC samples for OCCT 6.5.4

Update About dialog
Update reading files in OCAF sample
This commit is contained in:
bugmaster 2012-10-05 14:25:15 +04:00
parent 8f15a0d540
commit 41335b9667
3 changed files with 90 additions and 86 deletions

View File

@ -59,13 +59,14 @@ namespace IE
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(AboutDialog)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutDialog));
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.myVersion = new System.Windows.Forms.Label(); this.myVersion = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// pictureBox1 // pictureBox1
@ -74,7 +75,7 @@ namespace IE
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(59, 64); this.pictureBox1.Location = new System.Drawing.Point(59, 64);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(194, 100); this.pictureBox1.Size = new System.Drawing.Size(196, 102);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox1.TabIndex = 0; this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false; this.pictureBox1.TabStop = false;
@ -90,7 +91,7 @@ namespace IE
// //
// label1 // label1
// //
this.label1.Location = new System.Drawing.Point(16, 16); this.label1.Location = new System.Drawing.Point(16, 9);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(288, 24); this.label1.Size = new System.Drawing.Size(288, 24);
this.label1.TabIndex = 2; this.label1.TabIndex = 2;
@ -112,7 +113,7 @@ namespace IE
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(280, 23); this.label3.Size = new System.Drawing.Size(280, 23);
this.label3.TabIndex = 4; this.label3.TabIndex = 4;
this.label3.Text = "Copyright (C) 2004, Open CASCADE SA"; this.label3.Text = "Copyright (C) 2004-2012, Open CASCADE S.A.S";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// label4 // label4
@ -121,7 +122,7 @@ namespace IE
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(296, 24); this.label4.Size = new System.Drawing.Size(296, 24);
this.label4.TabIndex = 5; this.label4.TabIndex = 5;
this.label4.Text = "http://opencascade.com marketing.contact@opencascade.com"; this.label4.Text = "http://www.opencascade.com";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// AboutDialog // AboutDialog
@ -141,7 +142,9 @@ namespace IE
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "AboutDialog"; this.Name = "AboutDialog";
this.Text = "About Import/Export Sample"; this.Text = "About Import/Export Sample";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout();
} }
#endregion #endregion

View File

@ -148,9 +148,10 @@ void COcafApp::OnFileOpen()
if (aDlg.DoModal() != IDOK) if (aDlg.DoModal() != IDOK)
return; return;
int strLength = aDlg.GetFileName().GetLength()+1;
int strLength = aDlg.GetPathName().GetLength()+1;
LPTSTR lpszFileName = new TCHAR[strLength]; LPTSTR lpszFileName = new TCHAR[strLength];
strcpy_s(lpszFileName, strLength, aDlg.GetFileName()); strcpy_s(lpszFileName, strLength, aDlg.GetPathName() );
OpenDocumentFile(lpszFileName); OpenDocumentFile(lpszFileName);
} }

View File

@ -80,7 +80,7 @@ FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN BEGIN
CTEXT "Sample SampleName, Open CASCADE Technology OCC_Version", CTEXT "Sample SampleName, Open CASCADE Technology OCC_Version",
IDC_ABOUTBOX_TITLE,3,8,195,8 IDC_ABOUTBOX_TITLE,3,8,195,8
CTEXT "Copyright (C) 2001-2011, Open CASCADE S.A.S", CTEXT "Copyright (C) 2001-2012, Open CASCADE S.A.S",
IDC_STATIC,18,99,165,8,SS_CENTERIMAGE IDC_STATIC,18,99,165,8,SS_CENTERIMAGE
DEFPUSHBUTTON "OK",IDOK,56,135,88,14,WS_GROUP DEFPUSHBUTTON "OK",IDOK,56,135,88,14,WS_GROUP
CTEXT "http://www.opencascade.com",IDC_STATIC,51,115,98,8, CTEXT "http://www.opencascade.com",IDC_STATIC,51,115,98,8,