資源簡介
本Demo是基于VC6寫的關于激光控制卡Samlight的二次開發例程

代碼片段和文件信息
//?ChildFrm.cpp?:?implementation?of?the?CChildframe?class
//
#include?“stdafx.h“
#include?“SAMExample.h“
#include?“sc_globals.h“
#include?“ChildFrm.h“
#include?“SAMExampleOptic.h“
#include?“SAMExampleView.h“
#include?“MainFrm.h“
#include?
#include?“afx.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CChildframe
IMPLEMENT_DYNCREATE(CChildframe?CMDIChildWnd)
BEGIN_MESSAGE_MAP(CChildframe?CMDIChildWnd)
//{{AFX_MSG_MAP(CChildframe)
ON_WM_PAINT()
//}}AFX_MSG_MAP
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW?0?0xFFFF?OnToolTipText)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA?0?0xFFFF?OnToolTipText)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CChildframe?construction/destruction
CChildframe::CChildframe()
{
}
CChildframe::~CChildframe()
{
}
BOOL?CChildframe::PreCreateWindow(CREATESTRUCT&?cs)
{
cs.style?&=?~WS_SYSMENU;
cs.style?&=?~FWS_ADDTOtitle;
cs.style?|=WS_MAXIMIZEBOX?|WS_MINIMIZEBOX?|WS_MAXIMIZE;
return?CMDIChildWnd::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
//?CChildframe?diagnostics
#ifdef?_DEBUG
void?CChildframe::AssertValid()?const
{
CMDIChildWnd::AssertValid();
}
void?CChildframe::Dump(CDumpContext&?dc)?const
{
CMDIChildWnd::Dump(dc);
}
#endif?//_DEBUG
/////////////////////////////////////////////////////////////////////////////
//?CChildframe?message?handlers
void?CChildframe::OnPaint()?
{
CPaintDC?dc(this);?//?device?context?for?painting
CMDIChildWnd*?c_wnd?=?(CMDIChildWnd*)this;
CWnd?*child?=?c_wnd->GetTopWindow();
while?(child)
{
if?(child->IsKindOf(RUNTIME_CLASS(CSAMExampleOptic)))
{
SetWindowText(sl_resource_get_string(34));
return;
}
else?if?(child->IsKindOf(RUNTIME_CLASS(CSAMExampleView)))
{
SetWindowText(sl_resource_get_string(35));
return;
}
child=?child->GetNextWindow();
}
((CMainframe*)AfxGetMainWnd())->set_window_title();
}
BOOL?CChildframe::OnToolTipText(UINT?NMHDR*?pNMHDR?LRESULT*?pResult)
{
USES_CONVERSION;
ASSERT(pNMHDR->code?==?TTN_NEEDTEXTA?||?pNMHDR->code?==?TTN_NEEDTEXTW);
//?allow?top?level?routing?frame?to?handle?the?message
if?(GetRoutingframe()?!=?NULL)
return?FALSE;
//?need?to?handle?both?ANSI?and?UNICODE?versions?of?the?message
TOOLTIPTEXTA*?pTTTA?=?(TOOLTIPTEXTA*)pNMHDR;
TOOLTIPTEXTW*?pTTTW?=?(TOOLTIPTEXTW*)pNMHDR;
CString?strTipText;
UINT?nID?=?pNMHDR->idFrom;
if?(pNMHDR->code?==?TTN_NEEDTEXTA?&&?(pTTTA->uFlags?&?TTF_IDISHWND)?||
pNMHDR->code?==?TTN_NEEDTEXTW?&&?(pTTTW->uFlags?&?TTF_IDISHWND))
{
return?TRUE;
//?idFrom?is?actually?the?HWND?of?the?tool
// nID?=?_AfxGetDlgCtrlID((HWND)nID);
}
bool?convert?=?FALSE;
CString?h;
switch?(nID)
{
case?ID_FILE_OPEN:
{
h
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-04-09?23:30??VC_SAMExample\
?????文件????????3677??2018-04-09?23:30??VC_SAMExample\Ipfr
?????文件????????2305??2018-04-09?23:30??VC_SAMExample\sc_dispcomioctrl.cpp
?????文件?????????747??2018-04-09?23:30??VC_SAMExample\SAMExample.dsw
?????文件???????11279??2018-04-09?23:30??VC_SAMExample\sc_entity_prop_sheet_ctrl_type_lib.cpp
?????文件????????2040??2018-04-09?23:30??VC_SAMExample\SC_SettingsPropSheet.cpp
?????文件????????3317??2018-04-09?23:30??VC_SAMExample\SC_PropUSC.h
?????文件????????4757??2018-04-09?23:30??VC_SAMExample\sc_disp_entity_prop_sheet_ctrl_type_lib.cpp
?????文件????????4510??2018-04-09?23:30??VC_SAMExample\sc_image_16.cpp
?????文件????????3100??2018-04-09?23:30??VC_SAMExample\sc_entity_prop_sheet_ctrl_type_lib.h
?????文件????????4076??2018-04-09?23:30??VC_SAMExample\sc_image_16.h
?????文件???????23810??2018-04-09?23:30??VC_SAMExample\scview2dctrl.cpp
?????文件????????1384??2018-04-09?23:30??VC_SAMExample\clean.bat
?????目錄???????????0??2018-04-09?23:30??VC_SAMExample\res\
?????文件?????????718??2006-08-25?12:10??VC_SAMExample\res\Toolbar.bmp
?????文件???????12922??2006-08-25?12:10??VC_SAMExample\res\logo_16.bmp
?????文件?????????766??2006-08-25?12:10??VC_SAMExample\res\idr_main.ico
?????文件?????????766??2006-08-25?12:10??VC_SAMExample\res\icon1.ico
?????文件?????????718??2006-08-25?12:10??VC_SAMExample\res\IToolbar.bmp
?????文件?????????402??2018-04-09?23:30??VC_SAMExample\res\SAMExample.rc2
?????文件????????1270??2006-08-25?12:10??VC_SAMExample\res\bitmap1.bmp
?????文件????????6436??2018-04-09?23:30??VC_SAMExample\sc_globals.cpp
?????文件????????5147??2018-04-09?23:30??VC_SAMExample\SAMExampleView.h
?????文件????????3080??2018-04-09?23:30??VC_SAMExample\SC_PropView.h
?????文件???????22710??2018-04-09?23:30??VC_SAMExample\SAMExampleView.cpp
?????文件?????????992??2018-04-09?23:30??VC_SAMExample\scpropertypage.cpp
?????文件????????1348??2018-04-09?23:30??VC_SAMExample\scpropertypage.h
?????文件????????2700??2018-04-09?23:30??VC_SAMExample\MainFrm.h
?????文件????????5671??2018-04-09?23:30??VC_SAMExample\ChildFrm.cpp
?????文件????????2383??2018-04-09?23:30??VC_SAMExample\SAMExampleOptic.h
?????文件????????4288??2018-04-09?23:30??VC_SAMExample\scopticmodule2dctrl.h
............此處省略128個文件信息
- 上一篇:LK金字塔光流法
- 下一篇:十進制浮點數轉IEEE754浮點數
評論
共有 條評論