?? q3dwebcamtxttotal_int.cpp
字號:
// Q3DWebCamTxtTotal_Int.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#include "Q3DWebCamTxtTotal_Int.h"
#include "resource.h"
ChannelType channelType;
extern "C" __declspec( dllexport ) ChannelType* __cdecl GetType() {
channelType.guid = Q3DWEBCAMTXTTOTAL_GUID; // GUID of the channel
channelType.miversion = QUEST3D_ENGINEVERSION; // Core engine version, do not change
StringCbCopy(channelType.name, 80, "Q3DWebCamTxtTotal_Int"); // Name of the interface
return &channelType;
}
Q3DWEBCAMTXTTOTAL_INTDLL_EXPORTS
//////////////////////////////////////////////////////
// DlgProc - Dialog message processing
// Routes windows messages to the Dialog OnWndMessage method
//
BOOL CALLBACK
Q3DWebCamTxtTotal_IntDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
// Create a pointer to the dialog class from the user data
Q3DWebCamTxtTotal_Int* channelDialog=NULL;
channelDialog = reinterpret_cast<Q3DWebCamTxtTotal_Int*>(GetWindowLong(hwnd, GWL_USERDATA));
if( ! channelDialog)
return FALSE;
return channelDialog->OnWndMessage(hwnd, message, wParam, lParam);
}
Q3DWebCamTxtTotal_Int::Q3DWebCamTxtTotal_Int() {
dialogHwnd_=NULL;
}
Q3DWebCamTxtTotal_Int::~Q3DWebCamTxtTotal_Int() {
SetWindowLong(dialogHwnd_, GWL_USERDATA, (DWORD)NULL);
EndDialog(dialogHwnd_, 0);
dialogHwnd_=NULL;
}
void Q3DWebCamTxtTotal_Int::InitDialog()
{
//TODO: Add further initialization code here
}
//////////////////////////////////////////////////////
// Release of the dialog
//
void Q3DWebCamTxtTotal_Int::Release() {
// Change our user data pointer into NULL to make sure it is cleared
SetWindowLong(dialogHwnd_, GWL_USERDATA, (DWORD)NULL);
// Destroy our window
DestroyWindow(dialogHwnd_);
// Clear our HWND
dialogHwnd_=NULL;
Quest3DReleaseDialog();
}
//////////////////////////////////////////////////////
// Refresh of the dialog
//
void Q3DWebCamTxtTotal_Int::Refresh() {
}
BOOL Q3DWebCamTxtTotal_Int::OnWndMessage(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
switch (message) {
case WM_COMMAND: // Notification from a control
return OnCommandMessage (hwnd, (int)LOWORD(wParam), (HWND)(lParam), (UINT)HIWORD(wParam));
case WM_INITDIALOG:
return TRUE;
case WM_HSCROLL:
break;
}
return FALSE;
}
BOOL Q3DWebCamTxtTotal_Int::OnCommandMessage(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) {
switch (id) {
case 0:
default:
return FALSE;
}
return TRUE;
}
bool Q3DWebCamTxtTotal_Int::GetChannelDialog(bool modeLess) {
HWND hwnd = CreateDockingInterface();
if(hwnd!=NULL) {
return true;
}
return false;
}
bool Q3DWebCamTxtTotal_Int::CreateDockedChannelDialog(HWND parentHwnd) {
if(dialogHwnd_!=NULL) {
ShowWindow(dialogHwnd_, SW_SHOW);
return true;
}
dialogHwnd_ = CreateDialog(dllInstance_, "IDD_Q3DWebCamTxtTotal_INT", parentHwnd, (DLGPROC) Q3DWebCamTxtTotal_IntDlgProc);
if(dialogHwnd_==NULL) {
eMsg("The Q3DWebCamTxtTotal_Int dialog could not be created");
return false;
}
SetWindowLong(dialogHwnd_, GWL_USERDATA, (DWORD)this);
ourChannel_ = static_cast<Q3DWebCamTxtTotal*>(channel_);
ShowWindow(dialogHwnd_, SW_SHOW);
InitDialog();
Refresh();
return true;
}
RECT Q3DWebCamTxtTotal_Int::GetStandardDialogRect() {
// Overload this function for a different window opening
RECT dockingRect;
dockingRect.left = 300;
dockingRect.right = 450;
dockingRect.top = 300;
dockingRect.bottom = 550;
return dockingRect;
}
void Q3DWebCamTxtTotal_Int::SetTabWindowSize(int X, int Y, int newWidth, int newHeight) {
MoveWindow(dialogHwnd_, X, Y, newWidth, newHeight, TRUE);
}
void Q3DWebCamTxtTotal_Int::HideMainWindow(bool hide) {
if(dialogHwnd_!=NULL) {
if(hide)
ShowWindow(dialogHwnd_, SW_HIDE);
else
ShowWindow(dialogHwnd_, SW_SHOW);
}
}
bool Q3DWebCamTxtTotal_Int::GetIfSupportForCancel() {
//Note: If you return false, no Cancel button will be available
return true;
}
void Q3DWebCamTxtTotal_Int::ClickedOk() {
//TODO: Add your handler logic here
}
void Q3DWebCamTxtTotal_Int::ClickedCancel() {
//TODO: Add your handler logic here
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -