-
Notifications
You must be signed in to change notification settings - Fork 1
/
DlgFindPart.cpp
53 lines (42 loc) · 960 Bytes
/
DlgFindPart.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// DlgFindPart.cpp : implementation file
//
#include "stdafx.h"
#include "FreePcb.h"
#include "DlgFindPart.h"
#include ".\dlgfindpart.h"
// CDlgFindPart dialog
IMPLEMENT_DYNAMIC(CDlgFindPart, CDialog)
CDlgFindPart::CDlgFindPart(CWnd* pParent /*=NULL*/)
: CDialog(CDlgFindPart::IDD, pParent)
{
}
CDlgFindPart::~CDlgFindPart()
{
}
void CDlgFindPart::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_COMBO1, m_combo_ref_des);
if( !pDX->m_bSaveAndValidate )
{
// incoming
cpart * part = m_pl->GetFirstPart();
while( part )
{
m_combo_ref_des.AddString( part->ref_des );
part = m_pl->GetNextPart( part );
}
}
else
{
// outgoing
m_combo_ref_des.GetWindowText( sel_ref_des );
}
}
BEGIN_MESSAGE_MAP(CDlgFindPart, CDialog)
END_MESSAGE_MAP()
// CDlgFindPart message handlers
void CDlgFindPart::Initialize( CPartList * pl )
{
m_pl = pl;
}