From: <ad...@us...> - 2003-02-13 17:26:54
|
Update of /cvsroot/bdadev/CleverTelly In directory sc8-pr-cvs1:/tmp/cvs-serv13221 Modified Files: CleverTelly.cpp CleverTelly.dsp CleverTelly.rc MSVidCtlComp.cpp StdAfx.h resource.h Log Message: Interim Checkin starting to add some basic functionality Index: CleverTelly.cpp =================================================================== RCS file: /cvsroot/bdadev/CleverTelly/CleverTelly.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CleverTelly.cpp 13 Feb 2003 10:50:17 -0000 1.2 --- CleverTelly.cpp 13 Feb 2003 17:26:44 -0000 1.3 *************** *** 47,50 **** --- 47,73 ---- return NULL; } + void CreateNewClass() + { + WNDCLASSEX wc; + + EnterCriticalSection(&_Module.m_csWindowCreate); + wc.cbSize = sizeof(WNDCLASSEX); + wc.style = 0; + + wc.lpfnWndProc = AtlAxWindowProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = _Module.GetModuleInstance(); + wc.hIcon = LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_CLEVERTELLY)); + wc.hCursor = ::LoadCursor(NULL, IDC_ARROW); + wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); + wc.lpszMenuName = NULL; + wc.lpszClassName = CAxWindow::GetWndClassName(); + wc.hIconSm = LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_CLEVERTELLY)); + + ::RegisterClassEx(&wc); + + LeaveCriticalSection(&_Module.m_csWindowCreate); + } ///////////////////////////////////////////////////////////////////////////// *************** *** 102,110 **** _ASSERTE(SUCCEEDED(hRes)); AtlAxWinInit(); HWND hWnd = ::CreateWindow( TEXT("AtlAxWin"), TEXT("CleverTelly.MSVidCtlComp"), ! NULL, CW_USEDEFAULT, CW_USEDEFAULT, --- 125,135 ---- _ASSERTE(SUCCEEDED(hRes)); + CreateNewClass(); AtlAxWinInit(); + HWND hWnd = ::CreateWindow( TEXT("AtlAxWin"), TEXT("CleverTelly.MSVidCtlComp"), ! WS_POPUP, CW_USEDEFAULT, CW_USEDEFAULT, *************** *** 117,120 **** --- 142,148 ---- ); + ::SetWindowText(hWnd, TEXT("CleverTelly")); + ::ShowWindow(hWnd, SW_SHOW); + MSG msg; while (GetMessage(&msg, 0, 0, 0)) *************** *** 129,132 **** --- 157,164 ---- _Module.Term(); + + // close the log file + LOG(0, NULL); + CoUninitialize(); return nRet; *************** *** 137,140 **** --- 169,175 ---- // // $Log$ + // Revision 1.3 2003/02/13 17:26:44 adcockj + // Interim Checkin starting to add some basic functionality + // // Revision 1.2 2003/02/13 10:50:17 adcockj // Split out Module stuff and tidy up auto generated ATL code Index: CleverTelly.dsp =================================================================== RCS file: /cvsroot/bdadev/CleverTelly/CleverTelly.dsp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CleverTelly.dsp 13 Feb 2003 10:19:07 -0000 1.1.1.1 --- CleverTelly.dsp 13 Feb 2003 17:26:44 -0000 1.2 *************** *** 53,57 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib /nologo /subsystem:windows /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib /nologo /subsystem:windows /machine:I386 # Begin Custom Build - Performing registration OutDir=.\Release --- 53,57 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib /nologo /subsystem:windows /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib winmm.lib /nologo /subsystem:windows /machine:I386 # Begin Custom Build - Performing registration OutDir=.\Release *************** *** 88,92 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c ! # ADD CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" --- 88,92 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c ! # ADD CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /GZ /c # ADD BASE RSC /l 0x809 /d "_DEBUG" # ADD RSC /l 0x809 /d "_DEBUG" *************** *** 96,100 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept # Begin Custom Build - Performing registration OutDir=.\Debug --- 96,100 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Strmiids.lib winmm.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept # Begin Custom Build - Performing registration OutDir=.\Debug *************** *** 141,144 **** --- 141,152 ---- # Begin Source File + SOURCE=.\DebugLog.cpp + # End Source File + # Begin Source File + + SOURCE=.\Module.cpp + # End Source File + # Begin Source File + SOURCE=.\MSVidCtlComp.cpp # End Source File *************** *** 155,158 **** --- 163,174 ---- # Begin Source File + SOURCE=.\DebugLog.h + # End Source File + # Begin Source File + + SOURCE=.\Module.h + # End Source File + # Begin Source File + SOURCE=.\MSVidCtlComp.h # End Source File *************** *** 171,175 **** --- 187,199 ---- # Begin Source File + SOURCE=.\cleverte.ico + # End Source File + # Begin Source File + SOURCE=.\CleverTelly.rgs + # End Source File + # Begin Source File + + SOURCE=.\msvidctl.bmp # End Source File # Begin Source File Index: CleverTelly.rc =================================================================== RCS file: /cvsroot/bdadev/CleverTelly/CleverTelly.rc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CleverTelly.rc 13 Feb 2003 10:19:07 -0000 1.1.1.1 --- CleverTelly.rc 13 Feb 2003 17:26:45 -0000 1.2 *************** *** 135,139 **** IDB_MSVIDCTLCOMP BITMAP DISCARDABLE "msvidctl.bmp" - ///////////////////////////////////////////////////////////////////////////// // --- 135,138 ---- *************** *** 141,151 **** // ! IDD_MSVIDCTLCOMP DIALOGEX 0, 0, 400, 300 ! STYLE DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_THICKFRAME EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Sans Serif" BEGIN CONTROL "",IDC_MSVIDCTL1,"{B0EDF163-910A-11D2-B632-00C04F79498E}", ! WS_TABSTOP,0,0,399,300 CONTROL "",IDC_MSVIDCTL2,"{B0EDF163-910A-11D2-B632-00C04F79498E}", NOT WS_VISIBLE | WS_TABSTOP,13,12,128,118 --- 140,152 ---- // ! IDD_MSVIDCTLCOMP DIALOGEX 0, 0, 239, 206 ! STYLE DS_3DLOOK | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_VISIBLE | WS_CAPTION | ! WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_CONTROLPARENT + CAPTION "CleverTelly" FONT 8, "MS Sans Serif" BEGIN CONTROL "",IDC_MSVIDCTL1,"{B0EDF163-910A-11D2-B632-00C04F79498E}", ! WS_TABSTOP,0,0,238,206 CONTROL "",IDC_MSVIDCTL2,"{B0EDF163-910A-11D2-B632-00C04F79498E}", NOT WS_VISIBLE | WS_TABSTOP,13,12,128,118 *************** *** 169,172 **** --- 170,182 ---- END + + ///////////////////////////////////////////////////////////////////////////// + // + // Icon + // + + // Icon with lowest ID value placed first to ensure application icon + // remains consistent on all systems. + IDI_CLEVERTELLY ICON DISCARDABLE "cleverte.ico" #endif // English (U.K.) resources ///////////////////////////////////////////////////////////////////////////// Index: MSVidCtlComp.cpp =================================================================== RCS file: /cvsroot/bdadev/CleverTelly/MSVidCtlComp.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MSVidCtlComp.cpp 13 Feb 2003 13:42:12 -0000 1.2 --- MSVidCtlComp.cpp 13 Feb 2003 17:26:46 -0000 1.3 *************** *** 60,63 **** --- 60,66 ---- HRESULT hr = S_OK; + SetIcon(LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_CLEVERTELLY))); + SetIcon(LoadIcon(_Module.m_hInstResource, MAKEINTRESOURCE(IDI_CLEVERTELLY)), FALSE); + hr = GetDlgControl(IDC_MSVIDCTL1, __uuidof(IMSVidCtl), reinterpret_cast<void **>(&m_pVidControl)); *************** *** 71,79 **** void CMSVidCtlComp::ResizeVideoControl() { ! CWindow VidCtlWnd(GetDlgItem(IDC_MSVIDCTL1)); ! RECT rcWindow; ! GetWindowRect(&rcWindow); ! ScreenToClient(&rcWindow); ! VidCtlWnd.MoveWindow(&rcWindow); } --- 74,85 ---- void CMSVidCtlComp::ResizeVideoControl() { ! CComQIPtr<IOleInPlaceObject> pInPlaceObject(m_pVidControl); ! if(pInPlaceObject != NULL) ! { ! RECT WinRect; ! GetWindowRect(&WinRect); ! ScreenToClient(&WinRect); ! pInPlaceObject->SetObjectRects(&WinRect, &WinRect); ! } } *************** *** 102,108 **** { // always do default processing ! bHandled = FALSE; ! ResizeVideoControl(); return 0; --- 108,130 ---- { // always do default processing ! bHandled = TRUE; ! switch(wParam) ! { ! case SIZE_MAXIMIZED: ! ResizeVideoControl(); ! ShowWindow(SW_SHOW); ! break; ! case SIZE_MINIMIZED: ! CloseWindow(m_hWnd); ! break; ! case SIZE_RESTORED: ! ShowWindow(SW_SHOW); ! ResizeVideoControl(); ! break; ! default: ! ResizeVideoControl(); ! break; ! } return 0; *************** *** 238,241 **** --- 260,266 ---- // // $Log$ + // Revision 1.3 2003/02/13 17:26:46 adcockj + // Interim Checkin starting to add some basic functionality + // // Revision 1.2 2003/02/13 13:42:12 adcockj // Added Event listeners Index: StdAfx.h =================================================================== RCS file: /cvsroot/bdadev/CleverTelly/StdAfx.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StdAfx.h 13 Feb 2003 10:50:17 -0000 1.2 --- StdAfx.h 13 Feb 2003 17:26:46 -0000 1.3 *************** *** 37,40 **** --- 37,41 ---- #include <atlctl.h> + #include "DebugLog.h" //{{AFX_INSERT_LOCATION}} Index: resource.h =================================================================== RCS file: /cvsroot/bdadev/CleverTelly/resource.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** resource.h 13 Feb 2003 10:19:08 -0000 1.1.1.1 --- resource.h 13 Feb 2003 17:26:46 -0000 1.2 *************** *** 9,12 **** --- 9,13 ---- #define IDD_MSVIDCTLCOMP 103 #define IDC_MSVIDCTL1 202 + #define IDI_CLEVERTELLY 202 #define IDC_MSVIDCTL2 203 *************** *** 15,19 **** #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NEXT_RESOURCE_VALUE 202 #define _APS_NEXT_COMMAND_VALUE 32768 #define _APS_NEXT_CONTROL_VALUE 204 --- 16,20 ---- #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NEXT_RESOURCE_VALUE 203 #define _APS_NEXT_COMMAND_VALUE 32768 #define _APS_NEXT_CONTROL_VALUE 204 |