Update of /cvsroot/pywin32/pywin32/Pythonwin
In directory sc8-pr-cvs1:/tmp/cvs-serv20022
Modified Files:
Win32app.h stddde.cpp win32app.cpp win32control.cpp
win32prop.cpp win32thread.cpp win32uiExt.h
Log Message:
Various changes to get us (mostly) working with VS.NET.
Index: Win32app.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Win32app.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Win32app.h 11 May 2000 13:12:32 -0000 1.2
--- Win32app.h 20 Jan 2004 22:28:50 -0000 1.3
***************
*** 26,30 ****
static ui_type_CObject type;
MAKE_PY_CTOR(PyCWinApp)
! static void cleanup();
};
--- 26,30 ----
static ui_type_CObject type;
MAKE_PY_CTOR(PyCWinApp)
! virtual void cleanup();
};
***************
*** 53,58 ****
--- 53,61 ----
void SetMainFrame (CWnd *pWnd) {m_pMainWnd = pWnd;}
CDocument *FindOpenDocument (const char *lpszFileName);
+ // warning C4996: 'xxx' was declared deprecated
+ #pragma warning( disable : 4996 )
BOOL Enable3dControls() {return CWinApp::Enable3dControls();}
void SetDialogBkColor(COLORREF clrCtlBk, COLORREF clrCtlText) { CWinApp::SetDialogBkColor(clrCtlBk, clrCtlText);}
+ #pragma warning( default : 4996 )
BOOL HaveLoadStdProfileSettings() {return m_pRecentFileList!=NULL;}
void LoadStdProfileSettings(UINT max) {CWinApp::LoadStdProfileSettings(max);}
Index: stddde.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/stddde.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** stddde.cpp 10 Nov 2003 04:39:44 -0000 1.1
--- stddde.cpp 20 Jan 2004 22:28:52 -0000 1.2
***************
*** 954,958 ****
// Gaah - it took me two days to realize that I need "offset" here
//
! __declspec ( naked ) _template() {
__asm {
pop eax // save the return addr
--- 954,958 ----
// Gaah - it took me two days to realize that I need "offset" here
//
! __declspec ( naked ) void _template() {
__asm {
pop eax // save the return addr
Index: win32app.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32app.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** win32app.cpp 16 Oct 2000 05:46:52 -0000 1.3
--- win32app.cpp 20 Jan 2004 22:28:53 -0000 1.4
***************
*** 406,409 ****
--- 406,410 ----
void PyCWinApp::cleanup()
{
+ PyCWinThread::cleanup();
// total hack!
while (pExistingAppObject)
Index: win32control.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32control.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** win32control.cpp 5 Sep 2001 23:56:10 -0000 1.3
--- win32control.cpp 20 Jan 2004 22:28:55 -0000 1.4
***************
*** 1906,1912 ****
--- 1906,1919 ----
if (!pSC)
return NULL;
+ #if _MFC_VER >= 0x0710
+ // This just vanished in VS7
+ PyErr_SetString(PyExc_NotImplementedError,
+ "VerifyPos does not appear in this version of MFC");
+ return NULL;
+ #else
GUI_BGN_SAVE;
pSC->VerifyPos();
GUI_END_SAVE;
+ #endif
RETURN_NONE;
}
Index: win32prop.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32prop.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** win32prop.cpp 1 Sep 1999 23:33:02 -0000 1.1
--- win32prop.cpp 20 Jan 2004 22:28:57 -0000 1.2
***************
*** 445,449 ****
return NULL;
GUI_BGN_SAVE;
! BOOL ok = pPS->PressButton(button);
GUI_END_SAVE;
if (!ok)
--- 445,454 ----
return NULL;
GUI_BGN_SAVE;
! BOOL ok = TRUE;
! #if _MFC_VER < 0x0710
! ok =
! #endif
! pPS->PressButton(button);
!
GUI_END_SAVE;
if (!ok)
Index: win32thread.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32thread.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** win32thread.cpp 11 May 2000 13:12:33 -0000 1.4
--- win32thread.cpp 20 Jan 2004 22:28:58 -0000 1.5
***************
*** 97,100 ****
--- 97,106 ----
BOOL bIdle = TRUE;
LONG lIdleCount = 0;
+ #if _MFC_VER >= 0x0710
+ _AFX_THREAD_STATE* pState = AfxGetThreadState();
+ MSG &msgCur = pState->m_msgCur;
+ #else
+ MSG &msgCur = m_msgCur;
+ #endif /* _MFC_VER_ */
// acquire and dispatch messages until a WM_QUIT message is received.
***************
*** 103,107 ****
// phase1: check to see if we can do idle work
while (bIdle &&
! !::PeekMessage(&m_msgCur, NULL, NULL, NULL, PM_NOREMOVE))
{
// call OnIdle while in bIdle state
--- 109,113 ----
// phase1: check to see if we can do idle work
while (bIdle &&
! !::PeekMessage(&msgCur, NULL, NULL, NULL, PM_NOREMOVE))
{
// call OnIdle while in bIdle state
***************
*** 114,118 ****
// pump message, but quit on WM_QUIT
if (!PumpMessage()) {
! #ifdef _DEBUG
m_nDisablePumpCount--; // application must NOT die
#endif
--- 120,124 ----
// pump message, but quit on WM_QUIT
if (!PumpMessage()) {
! #if defined(_DEBUG) && _MFC_VER < 0x0710
m_nDisablePumpCount--; // application must NOT die
#endif
***************
*** 121,125 ****
// reset "no idle" state after pumping "normal" message
! if (IsIdleMessage(&m_msgCur))
{
bIdle = TRUE;
--- 127,131 ----
// reset "no idle" state after pumping "normal" message
! if (IsIdleMessage(&msgCur))
{
bIdle = TRUE;
***************
*** 127,131 ****
}
! } while (::PeekMessage(&m_msgCur, NULL, NULL, NULL, PM_NOREMOVE));
}
--- 133,137 ----
}
! } while (::PeekMessage(&msgCur, NULL, NULL, NULL, PM_NOREMOVE));
}
***************
*** 144,162 ****
}
return bHaveQuit;
- /**************88
- while(::PeekMessage(&m_msgCur, NULL, NULL, NULL, PM_NOREMOVE))
- if (!PumpMessage()) {
- // if got a close message, must send it back down.
- #ifdef _DEBUG
- m_nDisablePumpCount--; // hack!
- #endif
- PostQuitMessage(0);
- return;
- }
- // let MFC do its idle processing
- LONG lIdle = 0;
- while ( AfxGetApp()->OnIdle(lIdle++ ) )
- ;
- ********/
}
unsigned int ThreadWorkerEntryPoint( LPVOID lpvoid )
--- 150,153 ----
Index: win32uiExt.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uiExt.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** win32uiExt.h 16 Oct 2000 05:46:52 -0000 1.3
--- win32uiExt.h 20 Jan 2004 22:28:58 -0000 1.4
***************
*** 293,297 ****
return T::OnNcHitTest(pt);
}
! afx_msg UINT OnSetCursor(CWnd *pWnd, UINT ht, UINT msg) {
// @pyvirtual int|PyCWnd|OnSetCursor|Called for the WM_SETCURSOR message.
// @xref <om PyCWnd.OnSetCursor>
--- 293,297 ----
return T::OnNcHitTest(pt);
}
! afx_msg BOOL OnSetCursor(CWnd *pWnd, UINT ht, UINT msg) {
// @pyvirtual int|PyCWnd|OnSetCursor|Called for the WM_SETCURSOR message.
// @xref <om PyCWnd.OnSetCursor>
***************
*** 359,365 ****
protected: \
static AFX_DATA const AFX_MSGMAP messageMap;
-
static const AFX_MSGMAP* PASCAL _GetBaseMessageMap() {
return &T::messageMap;
}
virtual const AFX_MSGMAP* GetMessageMap() const {
--- 359,368 ----
protected: \
static AFX_DATA const AFX_MSGMAP messageMap;
static const AFX_MSGMAP* PASCAL _GetBaseMessageMap() {
+ #if _MFC_VER >= 0x0700
+ return T::GetThisMessageMap();
+ #else
return &T::messageMap;
+ #endif /* _MFC_VER */
}
virtual const AFX_MSGMAP* GetMessageMap() const {
***************
*** 947,951 ****
--- 950,958 ----
static const AFX_MSGMAP* PASCAL _GetBaseMessageMap() {
+ #if _MFC_VER >= 0x0700
+ return T::GetThisMessageMap();
+ #else
return &T::messageMap;
+ #endif
}
virtual const AFX_MSGMAP* GetMessageMap() const {
|