📄 btspy.cpp
字号:
{
// the Next button was pressed
LPTSTR NextPage = (LPTSTR)-1; // By default, don't advance!
// Get the number of Composite ins
CString n = AllTrim(ebNumComposites.GetText());
UINT Nbr = (n.Len() && n[0] >= '0' && n[0] <= '4') ? n[0] - '0' : 0;
app->CompositeIns = Nbr;
if (n.Len()) {
if (Nbr) {
NextPage = MAKEINTRESOURCE(IDD_PAGE7);
} else {
NextPage = MAKEINTRESOURCE(IDD_PAGE8);
}
}
SetNextPage(NextPage);
return TRUE;
}
//
// Wizard Page 7(Capture Composite Nbr)
INT CWPage7::OnInitDialog()
{
// First bind the controls
tMsg.SetHWND(*this,IDT_Msg);
// Create the tooltip and associate tooltips to the controls
ttWindow.Create(app->Instance,*this);
return TRUE;
}
INT CWPage7::OnKillActive()
{
SetResult(FALSE);
return TRUE;
}
INT CWPage7::OnReset()
{
// Set active buttons
SetWizButtons(PSWIZB_BACK | PSWIZB_NEXT);
SetResult(FALSE);
return TRUE;
}
INT CWPage7::OnSetActive()
{
// Prepare the text and use it!
tMsg = Printf(TEXT("\tNow, select the Composite input #%d using the program supplied with your card. It does not matter if you actually have a video source connected to it. Just make sure that video input is selected when you press the \"Next\" button below and audio is NOT muted!"),app->CurrComposite + 1);
// Set Active buttons
SetWizButtons(PSWIZB_BACK | PSWIZB_NEXT);
return TRUE;
}
INT CWPage7::OnWizNext()
{
// Capture the values!
app->Composite_GPOE[app->CurrComposite] = app->BtAccess.GetGPOE();
app->Composite_GPDATA[app->CurrComposite] = app->BtAccess.GetGPDATA();
app->Composite_Mux[app->CurrComposite] = app->BtAccess.GetMux();
app->CurrComposite++;
// Prepare the text and use it!
tMsg = Printf(TEXT("\tNow, select the Composite input #%d using the program supplied with your card. It does not matter if you actually have a video source connected to it. Just make sure that video input is selected when you press the \"Next\" button below and audio is NOT muted!"),app->CurrComposite + 1);
// the Next button was pressed
SetNextPage( (app->CurrComposite < app->CompositeIns) ?
MAKEINTRESOURCE(IDD_PAGE7) : MAKEINTRESOURCE(IDD_PAGE8)
);
return TRUE;
}
INT CWPage7::OnWizBack()
{
// Always return to page 4! (HasSvideo)
SetNextPage(
(app->CurrComposite == 0) ? MAKEINTRESOURCE(IDD_PAGE6) : MAKEINTRESOURCE(IDD_PAGE7)
);
if (app->CurrComposite) app->CurrComposite--;
// Prepare the text and use it!
tMsg = Printf(TEXT("\tNow, select the Composite input #%d using the program supplied with your card. It does not matter if you actually have a video source connected to it. Just make sure that video input is selected when you press the \"Next\" button below and audio is NOT muted!"),app->CurrComposite + 1);
return TRUE;
}
// Wizard page 8 (Has Radio)
INT CWPage8::OnInitDialog()
{
// First, Bind the controls
rbNo.SetHWND(*this,IDR_No);
rbYes.SetHWND(*this,IDR_Yes);
// Create the tooltip and associate tooltips to the controls
ttWindow.Create(app->Instance,*this);
ttWindow.Register(rbNo,
TEXT("Means your card does NOT have a Radio tuner inside"));
ttWindow.Register(rbYes,
TEXT("Means your card is able to receive Radio stations"));
// Set start options
app->Has_Radio = FALSE;
// Set no selection by default
rbYes.SetCheck(FALSE);
rbNo.SetCheck(FALSE);
return TRUE;
}
INT CWPage8::OnCommand(WORD ControlID,WORD NotifyCode)
{
// If some action detected, check button
if (NotifyCode == BN_CLICKED) { // notification code
switch ( ControlID ) { // item, control, or accelerator identifier
case IDR_Yes:
case IDR_No:
app->Has_Radio = (ControlID == IDR_Yes);
// Set Buttons
SetWizButtons(PSWIZB_BACK | PSWIZB_NEXT);
break;
}
}
return FALSE;
}
INT CWPage8::OnKillActive()
{
SetResult(FALSE);
return TRUE;
}
INT CWPage8::OnReset()
{
// Set no active buttons
SetWizButtons(PSWIZB_BACK);
// Set no selection by default
rbYes.SetCheck(FALSE);
rbNo.SetCheck(FALSE);
SetResult(FALSE);
return TRUE;
}
INT CWPage8::OnSetActive()
{
// Set Active buttons
SetWizButtons(PSWIZB_BACK | (
(rbYes.GetCheck() || rbNo.GetCheck())
? PSWIZB_NEXT : 0));
return TRUE;
}
INT CWPage8::OnWizBack()
{
// Always return to page 6! (CompositeIns)
SetNextPage(MAKEINTRESOURCE(IDD_PAGE6));
return TRUE;
}
INT CWPage8::OnWizNext()
{
// the Next button was pressed
LPTSTR NextPage = (LPTSTR)-1; // By default, don't advance!
if ((rbYes.GetCheck() || rbNo.GetCheck())) {
if (rbYes.GetCheck()) {
NextPage = MAKEINTRESOURCE(IDD_PAGE9);
} else {
NextPage = MAKEINTRESOURCE(IDD_PAGE10);
}
}
SetNextPage(NextPage);
return TRUE;
}
// Wizard Page 9(Capture Radio)
INT CWPage9::OnInitDialog()
{
// Create the tooltip and associate tooltips to the controls
ttWindow.Create(app->Instance,*this);
return TRUE;
}
INT CWPage9::OnKillActive()
{
SetResult(FALSE);
return TRUE;
}
INT CWPage9::OnReset()
{
// Set active buttons
SetWizButtons(PSWIZB_BACK|PSWIZB_NEXT);
SetResult(FALSE);
return TRUE;
}
INT CWPage9::OnSetActive()
{
// Set Active buttons
SetWizButtons(PSWIZB_BACK|PSWIZB_NEXT);
return TRUE;
}
INT CWPage9::OnWizNext()
{
// Capture the values!
app->Radio_GPOE = app->BtAccess.GetGPOE();
app->Radio_GPDATA = app->BtAccess.GetGPDATA();
// the Next button was pressed
SetNextPage(MAKEINTRESOURCE(IDD_PAGE10));
return TRUE;
}
// Wizard Page 10(Capture Mute)
INT CWPage10::OnInitDialog()
{
// Create the tooltip and associate tooltips to the controls
ttWindow.Create(app->Instance,*this);
return TRUE;
}
INT CWPage10::OnKillActive()
{
SetResult(FALSE);
return TRUE;
}
INT CWPage10::OnReset()
{
// Set active buttons
SetWizButtons(PSWIZB_BACK|PSWIZB_FINISH);
SetResult(FALSE);
return TRUE;
}
INT CWPage10::OnSetActive()
{
// Set Active buttons
SetWizButtons(PSWIZB_BACK|PSWIZB_FINISH);
return TRUE;
}
INT CWPage10::OnWizFinish()
{
// Capture the values!
app->Mute_GPOE = app->BtAccess.GetGPOE();
app->Mute_GPDATA = app->BtAccess.GetGPDATA();
// the Next button was pressed
SetResult(FALSE);
// And create the Report!
CResult report(app);
report.Execute(app->Instance,*this);
return TRUE;
}
INT CResult::OnInitDialog()
{
// First, bind controls to objects
ebSummary.SetHWND(*this,IDE_Result);
// Create the tooltip and associate tooltips to the controls
ttWindow.Create(app->Instance,*this);
ttWindow.Register(ebSummary,
TEXT("This window displays the info that was obtained "
"from current installed driver, and the way hardware "
"must be handled to get audio and video working as "
"expected!"
));
// Now, create the report!
ebSummary = CreateReport();
// And the peeker window
peeker.AmodalExecute(app->Instance,*this);
peeker.Hide();
return TRUE;
}
INT CResult::OnCommand(WORD ControlID, WORD NotifyCode)
{
//
switch (ControlID) {
case IDB_Peeker: {
if (!peeker.IsDisplayed()) {
peeker.Display();
} else {
peeker.Hide();
}
break;
}
case IDB_SaveReport: {
SaveReport();
break;
}
}
if (ControlID == IDOK) {
// End Peeker
peeker.Hide();
peeker.End();
End();
}
return TRUE;
}
CResult::VendorInfo CResult::Info[] = { // Vendor infos and descriptions
{0x0000,TEXT("Gammagraphx, Inc.")},
{0x001a,TEXT("Ascend Communications, Inc.")},
{0x0033,TEXT("Paradyne corp.")},
{0x003d,TEXT("Lockheed Martin-Marietta Corp")},
{0x0070,TEXT("Hauppauge computer works Inc.")},
{0x0100,TEXT("Ncipher Corp Ltd")},
{0x0675,TEXT("Dynalink")},
{0x0a89,TEXT("BREA Technologies Inc")},
{0x0e11,TEXT("Compaq Computer Corporation")},
{0x1000,TEXT("LSI Logic / Symbios Logic (formerly NCR)")},
{0x1001,TEXT("Initio")},
{0x1002,TEXT("ATI Technologies Inc")},
{0x1003,TEXT("ULSI Systems")},
{0x1004,TEXT("VLSI Technology Inc")},
{0x1005,TEXT("Avance Logic Inc. [ALI]")},
{0x1006,TEXT("Reply Group")},
{0x1007,TEXT("NetFrame Systems Inc")},
{0x1008,TEXT("Epson")},
{0x100a,TEXT("Phoenix Technologies")},
{0x100b,TEXT("National Semiconductor Corporation")},
{0x100c,TEXT("Tseng Labs Inc")},
{0x100d,TEXT("AST Research Inc")},
{0x100e,TEXT("Weitek")},
{0x1010,TEXT("Video Logic, Ltd.")},
{0x1011,TEXT("Digital Equipment Corporation")},
{0x1012,TEXT("Micronics Computers Inc")},
{0x1013,TEXT("Cirrus Logic")},
{0x1014,TEXT("IBM")},
{0x1015,TEXT("LSI Logic Corp of Canada")},
{0x1016,TEXT("ICL Personal Systems")},
{0x1017,TEXT("SPEA Software AG")},
{0x1018,TEXT("Unisys Systems")},
{0x1019,TEXT("Elitegroup Computer Systems")},
{0x101a,TEXT("AT&T GIS (NCR)")},
{0x101b,TEXT("Vitesse Semiconductor")},
{0x101c,TEXT("Western Digital")},
{0x101e,TEXT("American Megatrends Inc.")},
{0x101f,TEXT("PictureTel")},
{0x1020,TEXT("Hitachi Computer Products")},
{0x1021,TEXT("OKI Electric Industry Co. Ltd.")},
{0x1022,TEXT("Advanced Micro Devices [AMD]")},
{0x1023,TEXT("Trident Microsystems")},
{0x1024,TEXT("Zenith Data Systems")},
{0x1025,TEXT("Acer Incorporated [ALI]")},
{0x1028,TEXT("Dell Computer Corporation")},
{0x1029,TEXT("Siemens Nixdorf IS")},
{0x102a,TEXT("LSI Logic")},
{0x102b,TEXT("Matrox Graphics, Inc.")},
{0x102c,TEXT("Chips and Technologies")},
{0x102d,TEXT("Wyse Technology Inc.")},
{0x102e,TEXT("Olivetti Advanced Technology")},
{0x102f,TEXT("Toshiba America")},
{0x1030,TEXT("TMC Research")},
{0x1031,TEXT("Miro Computer Products AG")},
{0x1032,TEXT("Compaq")},
{0x1033,TEXT("NEC Corporation")},
{0x1034,TEXT("Framatome Connectors USA Inc.")},
{0x1035,TEXT("Comp. & Comm. Research Lab")},
{0x1036,TEXT("Future Domain Corp.")},
{0x1037,TEXT("Hitachi Micro Systems")},
{0x1038,TEXT("AMP, Inc")},
{0x1039,TEXT("Silicon Integrated Systems [SiS]")},
{0x103a,TEXT("Seiko Epson Corporation")},
{0x103b,TEXT("Tatung Co. of America")},
{0x103c,TEXT("Hewlett-Packard Company")},
{0x103e,TEXT("Solliday Engineering")},
{0x103f,TEXT("Synopsys/Logic Modeling Group")},
{0x1040,TEXT("Accelgraphics Inc.")},
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -