Skip to content

Commit

Permalink
Cut, Paste, Delete
Browse files Browse the repository at this point in the history
  • Loading branch information
FlatGlobus committed Jul 26, 2016
1 parent 13ef3fc commit 9575be1
Show file tree
Hide file tree
Showing 12 changed files with 88 additions and 42 deletions.
3 changes: 1 addition & 2 deletions CToolBoxWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,7 @@ LRESULT CToolBoxWnd::OnShowForm(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/
if(idx!=-1)
{
activeForm=(Component *)m_formList.GetItemDataPtr(idx);
::ShowWindow((HWND)activeForm->GetHandle(),SW_SHOW);
::ShowWindow((HWND)activeForm->GetHandle(),SW_SHOWNA);
::ShowWindow((HWND)activeForm->GetHandle(), SW_SHOWNORMAL);
SendEvent(evSetActiveForm,activeForm);
}
return 0;
Expand Down
23 changes: 12 additions & 11 deletions MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/
m_showgrid.EnablePressedState(true);

m_static49.Create(m_panel1,CRect(29,9,35,23),_T("x"),WS_CHILD|WS_VISIBLE|SS_LEFT,0,IDC_CMAINFRAME_STATIC49);
m_static49.SetFont((HFONT)m_formFont);
m_static49Font.CreateFont(-12,0,0,0,FW_BOLD,false,false,false,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH|FF_DONTCARE,_T("MS Sans Serif"));
m_static49.SetFont((HFONT)m_static49Font);

m_xedit.Create(m_panel1,CRect(42,6,81,26),_T("8"),WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,IDC_XEDIT);
m_xedit.SetFont((HFONT)m_formFont);
Expand All @@ -392,7 +393,8 @@ LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/
m_updownctrl51.SetPos(6);

m_static52.Create(m_panel1,CRect(87,9,93,23),_T("y"),WS_CHILD|WS_VISIBLE|SS_LEFT,0,IDC_CMAINFRAME_STATIC52);
m_static52.SetFont((HFONT)m_formFont);
m_static52Font.CreateFont(-12,0,0,0,FW_BOLD,false,false,false,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH|FF_DONTCARE,_T("MS Sans Serif"));
m_static52.SetFont((HFONT)m_static52Font);

m_yedit.Create(m_panel1,CRect(100,6,139,26),_T("8"),WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,IDC_YEDIT);
m_yedit.SetFont((HFONT)m_formFont);
Expand Down Expand Up @@ -456,16 +458,18 @@ LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/
m_buttonst61.SetColor(CButtonST::BTNST_COLOR_BK_OUT,RGB(0xF4,0xF3,0xEE));
m_buttonst61.SetIcon(IDI_VERT_ORDER_BOTTOM,IDI_VERT_ORDER_BOTTOM);

m_static62.Create(m_panel1,CRect(154,9,162,23),_T("X"),WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|SS_LEFT,0,IDC_CMAINFRAME_STATIC62);
m_static62.SetFont((HFONT)m_formFont);
m_static62.Create(m_panel1,CRect(154,9,162,23),_T("x"),WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|SS_LEFT,0,IDC_CMAINFRAME_STATIC62);
m_static62Font.CreateFont(-12,0,0,0,FW_BOLD,false,false,false,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH|FF_DONTCARE,_T("MS Sans Serif"));
m_static62.SetFont((HFONT)m_static62Font);

m_XCursor.Create(m_panel1,CRect(170,9,189,23),_T("0"),WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|SS_LEFT,0,IDC_XCURSOR);
m_XCursor.Create(m_panel1,CRect(170,9,195,23),_T("0"),WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|SS_LEFT,0,IDC_XCURSOR);
m_XCursor.SetFont((HFONT)m_formFont);

m_static64.Create(m_panel1,CRect(197,9,205,23),_T("Y"),WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|SS_LEFT,0,IDC_STATICY);
m_static64.SetFont((HFONT)m_formFont);
m_static64.Create(m_panel1,CRect(203,9,211,23),_T("y"),WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|SS_LEFT,0,IDC_STATICY);
m_static64Font.CreateFont(-12,0,0,0,FW_BOLD,false,false,false,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH|FF_DONTCARE,_T("MS Sans Serif"));
m_static64.SetFont((HFONT)m_static64Font);

m_YCursor.Create(m_panel1,CRect(213,9,232,23),_T("0"),WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|SS_LEFT,0,IDC_YCURSOR);
m_YCursor.Create(m_panel1,CRect(219,9,245,23),_T("0"),WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|SS_LEFT,0,IDC_YCURSOR);
m_YCursor.SetFont((HFONT)m_formFont);

//}}WTLBUILDER_MEMBER_CREATION
Expand Down Expand Up @@ -885,9 +889,6 @@ LRESULT CMainFrame::OnFileRecent(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*

void CMainFrame::OnEditCommand(WORD wID,Component *comp,CPoint * downPoint)
{
///////////////////////////////////////// to avoid app crash
return;
////////////////////////////////////////
if(project.Forms->Active==NULL)
return ;

Expand Down
4 changes: 4 additions & 0 deletions MainFrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,11 @@ class CMainFrame : public CFrameWindowImpl<CMainFrame, CWindow, CMainFrameWinTra
CButtonST m_buttonst38;
CButtonST m_showgrid;
CStatic m_static49;
CFont m_static49Font;
CEdit m_xedit;
CUpDownCtrl m_updownctrl51;
CStatic m_static52;
CFont m_static52Font;
CEdit m_yedit;
Panel::CPanel m_panel55;
CButtonST m_buttonst56;
Expand All @@ -138,8 +140,10 @@ class CMainFrame : public CFrameWindowImpl<CMainFrame, CWindow, CMainFrameWinTra
CButtonST m_buttonst60;
CButtonST m_buttonst61;
CStatic m_static62;
CFont m_static62Font;
CStatic m_XCursor;
CStatic m_static64;
CFont m_static64Font;
CStatic m_YCursor;
//}}WTLBUILDER_MEMBER_DECLARATION

Expand Down
20 changes: 10 additions & 10 deletions MainFrm.wff
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,9 @@
</Layout>
<OutImage FileName=".\res\Grid.ico" ID="IDI_SHOW_GRID" ImageType="Icon" Width="16" Height="16"/>
</m_showgrid>
<m_static49 Page="StdCtl" Class="CStatic" AcceptFiles="false" Border="false" Caption="x" ClientEdge="false" ClipChildren="false" ClipSiblings="false" ControlParent="false" DoContained="false" EnableToolTip="false" Enabled="true" Etched="false" Focus="false" Font="false" Generate="true" Group="false" HScroll="false" Height="14" ID="IDC_CMAINFRAME_STATIC49" IncludePath="" InternalWindowStyle="1342177280" InternalWindowStyleEx="0" Layout="false" Left="29" Localize="false" Name="m_static49" NoPrefix="true" Notify="false" ParentName="m_panel1" Simple="false" TabIndex="-1" TabStop="false" TextAlign="SS_LEFT" ToolTip="" Top="9" Transparent="false" UniqueID="49" VScroll="false" Visible="true" Width="6" WordWrap="false">
<m_static49 Page="StdCtl" Class="CStatic" AcceptFiles="false" Border="false" Caption="x" ClientEdge="false" ClipChildren="false" ClipSiblings="false" ControlParent="false" DoContained="false" EnableToolTip="false" Enabled="true" Etched="false" Focus="false" Font="true" Generate="true" Group="false" HScroll="false" Height="14" ID="IDC_CMAINFRAME_STATIC49" IncludePath="" InternalWindowStyle="1342177280" InternalWindowStyleEx="0" Layout="false" Left="29" Localize="false" Name="m_static49" NoPrefix="true" Notify="false" ParentName="m_panel1" Simple="false" TabIndex="-1" TabStop="false" TextAlign="SS_LEFT" ToolTip="" Top="9" Transparent="false" UniqueID="49" VScroll="false" Visible="true" Width="6" WordWrap="false">
<DoContained MessageMapID="0"/>
<Font Height="-12" Bold="false" Italic="false" Underline="false" StrikeOut="false" CharSet="DEFAULT_CHARSET" FaceName="MS Sans Serif"/>
<Font Height="-12" Bold="true" Italic="false" Underline="false" StrikeOut="false" CharSet="DEFAULT_CHARSET" FaceName="MS Sans Serif"/>
<Layout>
<Left AttachForm="false" AttachOppositeForm="false" AttachChild="false" AttachOppositeChild="false" AttachPosition="false" AttachSelf="false" AttachNone="false" Child="None" Position="0"/>
<Top AttachForm="false" AttachOppositeForm="false" AttachChild="false" AttachOppositeChild="false" AttachPosition="false" AttachSelf="false" AttachNone="false" Child="None" Position="0"/>
Expand Down Expand Up @@ -486,9 +486,9 @@
<VCenter AttachForm="false" AttachOppositeForm="false" AttachChild="false" AttachOppositeChild="false" AttachPosition="false" AttachSelf="false" AttachNone="false" Child="None" Position="0"/>
</Layout>
</m_updownctrl51>
<m_static52 Page="StdCtl" Class="CStatic" AcceptFiles="false" Border="false" Caption="y" ClientEdge="false" ClipChildren="false" ClipSiblings="false" ControlParent="false" DoContained="false" EnableToolTip="false" Enabled="true" Etched="false" Focus="false" Font="false" Generate="true" Group="false" HScroll="false" Height="14" ID="IDC_CMAINFRAME_STATIC52" IncludePath="" InternalWindowStyle="1342177280" InternalWindowStyleEx="0" Layout="false" Left="87" Localize="false" Name="m_static52" NoPrefix="true" Notify="false" ParentName="m_panel1" Simple="false" TabIndex="-1" TabStop="false" TextAlign="SS_LEFT" ToolTip="" Top="9" Transparent="false" UniqueID="52" VScroll="false" Visible="true" Width="6" WordWrap="false">
<m_static52 Page="StdCtl" Class="CStatic" AcceptFiles="false" Border="false" Caption="y" ClientEdge="false" ClipChildren="false" ClipSiblings="false" ControlParent="false" DoContained="false" EnableToolTip="false" Enabled="true" Etched="false" Focus="false" Font="true" Generate="true" Group="false" HScroll="false" Height="14" ID="IDC_CMAINFRAME_STATIC52" IncludePath="" InternalWindowStyle="1342177280" InternalWindowStyleEx="0" Layout="false" Left="87" Localize="false" Name="m_static52" NoPrefix="true" Notify="false" ParentName="m_panel1" Simple="false" TabIndex="-1" TabStop="false" TextAlign="SS_LEFT" ToolTip="" Top="9" Transparent="false" UniqueID="52" VScroll="false" Visible="true" Width="6" WordWrap="false">
<DoContained MessageMapID="0"/>
<Font Height="-12" Bold="false" Italic="false" Underline="false" StrikeOut="false" CharSet="DEFAULT_CHARSET" FaceName="MS Sans Serif"/>
<Font Height="-12" Bold="true" Italic="false" Underline="false" StrikeOut="false" CharSet="DEFAULT_CHARSET" FaceName="MS Sans Serif"/>
<Layout>
<Left AttachForm="false" AttachOppositeForm="false" AttachChild="false" AttachOppositeChild="false" AttachPosition="false" AttachSelf="false" AttachNone="false" Child="None" Position="0"/>
<Top AttachForm="false" AttachOppositeForm="false" AttachChild="false" AttachOppositeChild="false" AttachPosition="false" AttachSelf="false" AttachNone="false" Child="None" Position="0"/>
Expand Down Expand Up @@ -606,9 +606,9 @@
</Layout>
<OutImage FileName=".\res\VertOrderBottom.ico" ID="IDI_VERT_ORDER_BOTTOM" ImageType="Icon" Width="16" Height="16"/>
</m_buttonst61>
<m_static62 Page="StdCtl" Class="CStatic" AcceptFiles="false" Border="false" Caption="X" ClientEdge="false" ClipChildren="true" ClipSiblings="true" ControlParent="false" DoContained="false" EnableToolTip="false" Enabled="true" Etched="false" Focus="false" Font="false" Generate="true" Group="false" HScroll="false" Height="14" ID="IDC_CMAINFRAME_STATIC62" IncludePath="" InternalWindowStyle="1442840576" InternalWindowStyleEx="0" Layout="false" Left="154" Localize="true" Name="m_static62" NoPrefix="true" Notify="false" ParentName="m_panel1" Simple="false" TabIndex="-1" TabStop="false" TextAlign="SS_LEFT" ToolTip="" Top="9" Transparent="false" UniqueID="62" VScroll="false" Visible="true" Width="8" WordWrap="false">
<m_static62 Page="StdCtl" Class="CStatic" AcceptFiles="false" Border="false" Caption="x" ClientEdge="false" ClipChildren="true" ClipSiblings="true" ControlParent="false" DoContained="false" EnableToolTip="false" Enabled="true" Etched="false" Focus="false" Font="true" Generate="true" Group="false" HScroll="false" Height="14" ID="IDC_CMAINFRAME_STATIC62" IncludePath="" InternalWindowStyle="1442840576" InternalWindowStyleEx="0" Layout="false" Left="154" Localize="true" Name="m_static62" NoPrefix="true" Notify="false" ParentName="m_panel1" Simple="false" TabIndex="-1" TabStop="false" TextAlign="SS_LEFT" ToolTip="" Top="9" Transparent="false" UniqueID="62" VScroll="false" Visible="true" Width="8" WordWrap="false">
<DoContained MessageMapID="0"/>
<Font Height="-12" Bold="false" Italic="false" Underline="false" StrikeOut="false" CharSet="DEFAULT_CHARSET" FaceName="MS Sans Serif"/>
<Font Height="-12" Bold="true" Italic="false" Underline="false" StrikeOut="false" CharSet="DEFAULT_CHARSET" FaceName="MS Sans Serif"/>
<Layout>
<Left AttachForm="false" AttachOppositeForm="false" AttachChild="false" AttachOppositeChild="false" AttachPosition="false" AttachSelf="false" AttachNone="false" Child="None" Position="0"/>
<Top AttachForm="false" AttachOppositeForm="false" AttachChild="false" AttachOppositeChild="false" AttachPosition="false" AttachSelf="false" AttachNone="false" Child="None" Position="0"/>
Expand All @@ -618,7 +618,7 @@
<VCenter AttachForm="false" AttachOppositeForm="false" AttachChild="false" AttachOppositeChild="false" AttachPosition="false" AttachSelf="false" AttachNone="false" Child="None" Position="0"/>
</Layout>
</m_static62>
<m_XCursor Page="StdCtl" Class="CStatic" AcceptFiles="false" Border="false" Caption="0" ClientEdge="false" ClipChildren="true" ClipSiblings="true" ControlParent="false" DoContained="false" EnableToolTip="false" Enabled="true" Etched="false" Focus="false" Font="false" Generate="true" Group="false" HScroll="false" Height="14" ID="IDC_XCURSOR" IncludePath="" InternalWindowStyle="1442840576" InternalWindowStyleEx="0" Layout="false" Left="170" Localize="true" Name="m_XCursor" NoPrefix="true" Notify="false" ParentName="m_panel1" Simple="false" TabIndex="-1" TabStop="false" TextAlign="SS_LEFT" ToolTip="" Top="9" Transparent="false" UniqueID="63" VScroll="false" Visible="true" Width="19" WordWrap="false">
<m_XCursor Page="StdCtl" Class="CStatic" AcceptFiles="false" Border="false" Caption="0" ClientEdge="false" ClipChildren="true" ClipSiblings="true" ControlParent="false" DoContained="false" EnableToolTip="false" Enabled="true" Etched="false" Focus="false" Font="false" Generate="true" Group="false" HScroll="false" Height="14" ID="IDC_XCURSOR" IncludePath="" InternalWindowStyle="1442840576" InternalWindowStyleEx="0" Layout="false" Left="170" Localize="true" Name="m_XCursor" NoPrefix="true" Notify="false" ParentName="m_panel1" Simple="false" TabIndex="-1" TabStop="false" TextAlign="SS_LEFT" ToolTip="" Top="9" Transparent="false" UniqueID="63" VScroll="false" Visible="true" Width="25" WordWrap="false">
<DoContained MessageMapID="0"/>
<Font Height="-12" Bold="false" Italic="false" Underline="false" StrikeOut="false" CharSet="DEFAULT_CHARSET" FaceName="MS Sans Serif"/>
<Layout>
Expand All @@ -630,9 +630,9 @@
<VCenter AttachForm="false" AttachOppositeForm="false" AttachChild="false" AttachOppositeChild="false" AttachPosition="false" AttachSelf="false" AttachNone="false" Child="None" Position="0"/>
</Layout>
</m_XCursor>
<m_static64 Page="StdCtl" Class="CStatic" AcceptFiles="false" Border="false" Caption="Y" ClientEdge="false" ClipChildren="true" ClipSiblings="true" ControlParent="false" DoContained="false" EnableToolTip="false" Enabled="true" Etched="false" Focus="false" Font="false" Generate="true" Group="false" HScroll="false" Height="14" ID="IDC_STATICY" IncludePath="" InternalWindowStyle="1442840576" InternalWindowStyleEx="0" Layout="false" Left="197" Localize="true" Name="m_static64" NoPrefix="true" Notify="false" ParentName="m_panel1" Simple="false" TabIndex="-1" TabStop="false" TextAlign="SS_LEFT" ToolTip="" Top="9" Transparent="false" UniqueID="64" VScroll="false" Visible="true" Width="8" WordWrap="false">
<m_static64 Page="StdCtl" Class="CStatic" AcceptFiles="false" Border="false" Caption="y" ClientEdge="false" ClipChildren="true" ClipSiblings="true" ControlParent="false" DoContained="false" EnableToolTip="false" Enabled="true" Etched="false" Focus="false" Font="true" Generate="true" Group="false" HScroll="false" Height="14" ID="IDC_STATICY" IncludePath="" InternalWindowStyle="1442840576" InternalWindowStyleEx="0" Layout="false" Left="203" Localize="true" Name="m_static64" NoPrefix="true" Notify="false" ParentName="m_panel1" Simple="false" TabIndex="-1" TabStop="false" TextAlign="SS_LEFT" ToolTip="" Top="9" Transparent="false" UniqueID="64" VScroll="false" Visible="true" Width="8" WordWrap="false">
<DoContained MessageMapID="0"/>
<Font Height="-12" Bold="false" Italic="false" Underline="false" StrikeOut="false" CharSet="DEFAULT_CHARSET" FaceName="MS Sans Serif"/>
<Font Height="-12" Bold="true" Italic="false" Underline="false" StrikeOut="false" CharSet="DEFAULT_CHARSET" FaceName="MS Sans Serif"/>
<Layout>
<Left AttachForm="false" AttachOppositeForm="false" AttachChild="false" AttachOppositeChild="false" AttachPosition="false" AttachSelf="false" AttachNone="false" Child="None" Position="0"/>
<Top AttachForm="false" AttachOppositeForm="false" AttachChild="false" AttachOppositeChild="false" AttachPosition="false" AttachSelf="false" AttachNone="false" Child="None" Position="0"/>
Expand All @@ -642,7 +642,7 @@
<VCenter AttachForm="false" AttachOppositeForm="false" AttachChild="false" AttachOppositeChild="false" AttachPosition="false" AttachSelf="false" AttachNone="false" Child="None" Position="0"/>
</Layout>
</m_static64>
<m_YCursor Page="StdCtl" Class="CStatic" AcceptFiles="false" Border="false" Caption="0" ClientEdge="false" ClipChildren="true" ClipSiblings="true" ControlParent="false" DoContained="false" EnableToolTip="false" Enabled="true" Etched="false" Focus="false" Font="false" Generate="true" Group="false" HScroll="false" Height="14" ID="IDC_YCURSOR" IncludePath="" InternalWindowStyle="1442840576" InternalWindowStyleEx="0" Layout="false" Left="213" Localize="true" Name="m_YCursor" NoPrefix="true" Notify="false" ParentName="m_panel1" Simple="false" TabIndex="-1" TabStop="false" TextAlign="SS_LEFT" ToolTip="" Top="9" Transparent="false" UniqueID="65" VScroll="false" Visible="true" Width="19" WordWrap="false">
<m_YCursor Page="StdCtl" Class="CStatic" AcceptFiles="false" Border="false" Caption="0" ClientEdge="false" ClipChildren="true" ClipSiblings="true" ControlParent="false" DoContained="false" EnableToolTip="false" Enabled="true" Etched="false" Focus="false" Font="false" Generate="true" Group="false" HScroll="false" Height="14" ID="IDC_YCURSOR" IncludePath="" InternalWindowStyle="1442840576" InternalWindowStyleEx="0" Layout="false" Left="219" Localize="true" Name="m_YCursor" NoPrefix="true" Notify="false" ParentName="m_panel1" Simple="false" TabIndex="-1" TabStop="false" TextAlign="SS_LEFT" ToolTip="" Top="9" Transparent="false" UniqueID="65" VScroll="false" Visible="true" Width="26" WordWrap="false">
<DoContained MessageMapID="0"/>
<Font Height="-12" Bold="false" Italic="false" Underline="false" StrikeOut="false" CharSet="DEFAULT_CHARSET" FaceName="MS Sans Serif"/>
<Layout>
Expand Down
20 changes: 20 additions & 0 deletions Project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include "FormType.h"
#include <_util.h>
#include <direct.h>
#include "FormComponent.h"

//////////////////////////////////////////////////////////////////////////
BOOL PROPERTY_API PreReadForm(const CString &fn,CString &page,CString &cmpName);
BOOL PROPERTY_API ExtractName(CString &str,CString &cmpPage,CString &cmpName);
Expand Down Expand Up @@ -61,6 +63,14 @@ BOOL __stdcall CProject::Open(BSTR fn)

if(fileName.GetExt()==_T("wff"))
{
Component *tmp = NULL;
if ((tmp=forms.Find((LPCSTR)fileName)) != NULL)
{
::ShowWindow((HWND)tmp->GetHandle(), SW_SHOWNORMAL);
SendEvent(evSetActiveForm, tmp);
return TRUE;
}

if(PreReadForm(fileName.GetPath(),page,cmpName)==FALSE)
{
::MessageBox(NULL,MakeString(_T("Error loading form file %s."),(LPCTSTR)fileName),_T("WTLBuilder"),MB_OK);
Expand Down Expand Up @@ -394,4 +404,14 @@ void CForms::AddUndo(Component *form)
SendEvent(evAddUndo,active);
StopEvent(evAddUndo);
}
}

Component * CForms::Find(const CString & str)
{
for (long i = 0; i < (long)forms.size(); i++)
{
if (str.CompareNoCase(((CFormComponent *)forms.at(i))->GetFileName()) == 0)
return forms.at(i);
}
return NULL;
}
1 change: 1 addition & 0 deletions Project.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class CForms:public IDispDynImpl<CForms>
void __stdcall set_Active(Component *);
__declspec(property(get=get_Active, put=set_Active)) Component *Active;
BOOL RemoveAll();
Component * Find(const CString &);
};
//////////////////////////////////////////////////////////////////////////

Expand Down
Loading

0 comments on commit 9575be1

Please sign in to comment.