|
|
For some time, I've been dismayed by the behavior of docking windows when docked in their own control bar. Simply by dragging, they seem to resize themself even if you don't move them away from their current position.
I don't know if this is by design or not, but if you want to get rid of this annoying behaviour, you can modify
DWORD COXDragDockContext::CanDock()
to be this:
DWORD COXDragDockContext::CanDock()
{
BOOL bStyleHorz;
DWORD dwDock = 0;
DWORD dwCurr = 0;
ASSERT(m_dwStyle != 0);
bStyleHorz = HORZF(m_dwStyle);
m_pTargetDockBar = NULL;
if (dwDock == 0 && HORZF(m_dwDockStyle))
{
dwDock = m_pDockSite->CanDock(m_rectDragHorzAlone,
m_dwDockStyle & ~CBRS_ORIENT_VERT, (CDockBar**)&m_pTargetDockBar);
}
if (dwDock == 0 && VERTF(m_dwDockStyle))
{
dwDock = m_pDockSite->CanDock(m_rectDragVertAlone,
m_dwDockStyle & ~CBRS_ORIENT_HORZ, (CDockBar**)&m_pTargetDockBar);
}
if (dwDock != 0)
{
if (HORZF(dwDock))
{
m_rectDragDock = m_rectDragHorzAlone;
dwCurr = m_pDockSite->CanDock(m_rectDragHorz,
m_dwDockStyle & ~CBRS_ORIENT_VERT, (CDockBar**)&m_pTargetDockBar);
if (dwCurr != 0)
{
int nBars=m_pTargetDockBar->BarsOnThisRow(m_pBar,m_rectDragHorzAlone);
if(nBars!=0)
{
m_rectDragDock = m_rectDragHorz;
if (m_pBar->m_pDockBar == m_pTargetDockBar)
{
CRect rct;
m_pBar->GetWindowRect(&rct);
m_rectDragDock.bottom = m_rectDragDock.right +
rct.Width();
}
else
{
m_rectDragDock.right = m_rectDragDock.left+
m_rectDragHorzAlone.Width()/(nBars+1);
}
}
}
}
if (VERTF(dwDock))
{
m_rectDragDock = m_rectDragVertAlone;
dwCurr = m_pDockSite->CanDock(m_rectDragVert,
m_dwDockStyle & ~CBRS_ORIENT_HORZ, (CDockBar**)&m_pTargetDockBar);
if (dwCurr != 0)
{
int nBars=m_pTargetDockBar->BarsOnThisRow(m_pBar,m_rectDragVertAlone);
if(nBars!=0)
{
m_rectDragDock = m_rectDragVert;
if (m_pBar->m_pDockBar == m_pTargetDockBar)
{
CRect rct;
m_pBar->GetWindowRect(&rct);
m_rectDragDock.bottom = m_rectDragDock.top +
rct.Height();
}
else
{
m_rectDragDock.bottom = m_rectDragDock.top+
m_rectDragVertAlone.Height()/(nBars+1);
}
}
}
}
}
return dwCurr;
}
Anthony Wieser
Wieser Software Ltd
|
|
|
|
|
I was getting an error popping up in my debug window while I ran my newly converted UNICODE app. It said:
_CrtDbgReport: String too long or IO Error
I've managed to track it down to some erroneous trace messages in OXMenuBar.cpp and OXBitmapMenuOrganizer.cpp
Where the source code says:
TRACE(_T("\nCreated menu at %x - Line: %d, %s"), pBitmapMenu, __LINE__, __FILE__);
It should say
TRACE(_T("\nCreated menu at %x - Line: %d, %s"), pBitmapMenu, __LINE__, TEXT( __FILE__ ));
which will cause it to use a unicode string.
I notice that this bug still is present in the latest set of patches.
|
|
|
|
|
I think that might be my bad - good call.
There was a nasty crash in the menuing code (which I think has now been eliminated - update 01 has some extensive fixes in this area courtesy Manfred) - I was playing with it and probably left those traces in the initial Code Project release.
Can't take credit for all the existing traces - but that particular one was driving me bonkers.
Cleanup needed - at some point we'll need to decide on a v9.4 consolidation and whether traces and v9.3 update comments should be removed.
Tim (who should not be trusted with traces)
|
|
|
|
|
Hi Ultimate!
Thank you for this awesome peace of code!
I've got some update for the OXSkins.cpp file to reflect Vista skin style. Thought that my fixes are already part of the latest (9.3) release. Do you like to import my fixes?
jung-kreidler
|
|
|
|
|
Hi
Contributions always welcome - is this a new skin or a modification of an existing one?
|
|
|
|
|
It's a fix to show the xp-skin on vista.
|
|
|
|
|
As discussed privately, this appears to have been fixed in Vista SP1.
|
|
|
|
|
Could be improved, works for my needs .. I love you UT .. thanks for al these wonderful years
int CUGCtrl::StartDragDrop(){
ReleaseCapture();
CString SelectString;
size_t len;
CreateSelectedString(SelectString,FALSE);
len = (SelectString.GetLength()+1) * sizeof(TCHAR);
HGLOBAL hglobal = GlobalAlloc(GMEM_ZEROINIT,len);
int res = 1;
# ifdef _UNICODE
wchar_t* string = (wchar_t*)GlobalLock(hglobal);
memcpy(string, (wchar_t*)SelectString.GetBuffer(), len);
# else
LPTSTR string = (LPTSTR)GlobalLock(hglobal);
UGStr::tcscpy(string, SelectString.GetLength() + 1, SelectString);
# endif
GlobalUnlock(hglobal);
if(res)
m_dataSource.CacheGlobalData(CF_TEXT,hglobal,NULL);
# ifdef _UNICODE
HGLOBAL hglobalu = GlobalAlloc(GMEM_ZEROINIT,len);
LPTSTR stringu = (LPTSTR)GlobalLock(hglobalu);
UGStr::tcscpy(stringu, SelectString.GetLength() + 1, SelectString);
GlobalUnlock(hglobalu);
m_dataSource.CacheGlobalData(CF_UNICODETEXT,hglobalu,NULL);
# endif
m_dataSource.DoDragDrop(DROPEFFECT_COPY,NULL,NULL);
m_dataSource.Empty();
return UG_SUCCESS;
}
|
|
|
|
|
I use GetAttachmentNumber(), GetAttachmentInfo(.....) ,
But how to return real attachment file / emebbed img in htmlbody / other ?
hh
|
|
|
|
|
Have a look at the CUT_Msg::Decode functions:
int Decode(int index, CUT_DataSource & dest)
int Decode(int index, LPCTSTR filename)
|
|
|
|
|
|
Hi. I downladed UT for the first time today and spent some time reading the help. Some things looked good so I decided to build the DLLs. Unzipped and opened the UT2003 solution. It converted to VS2005 w/o error. Then tried to build the debug version and got a list of errors and warnings. First one is:
Error 1 error C2039: 'bWin95' : is not a member of 'AUX_DATA' c:\ultimatetb\source\oxzoomvw.cpp 1284 UT2003
Sure enough bWin95 is not a member.
Most times I would dig into these problems and try to figure out what is wrong myself, but after reading all the info in the help file about how perfectly everything should build under VC2005, I decided maybe you have unknown issues, so this question. Am I doing something wrong, or is the library project faulty?
Below are the other errors and warnigns.
Thanks, Russ
Error 1 error C2039: 'bWin95' : is not a member of 'AUX_DATA' c:\ultimatetb\source\oxzoomvw.cpp 1284 UT2003
Warning 2 warning C4005: 'TVGN_NEXTSELECTED' : macro redefinition c:\ultimatetb\include\oxtreectrl.h 535 UT2003
Warning 3 warning C4005: 'TVGN_NEXTSELECTED' : macro redefinition c:\ultimatetb\include\oxtreectrl.h 535 UT2003
Warning 4 warning C4005: 'TVGN_NEXTSELECTED' : macro redefinition c:\ultimatetb\include\oxtreectrl.h 535 UT2003
Warning 5 warning C4005: 'TVGN_NEXTSELECTED' : macro redefinition c:\ultimatetb\include\oxtreectrl.h 535 UT2003
Warning 6 warning C4005: 'TVGN_NEXTSELECTED' : macro redefinition c:\ultimatetb\include\oxtreectrl.h 535 UT2003
Warning 7 warning C4005: 'TVGN_NEXTSELECTED' : macro redefinition c:\ultimatetb\include\oxtreectrl.h 535 UT2003
Error 8 error C2555: 'COXMenuBar::GetMenu': overriding virtual function return type differs and is not covariant from 'CWnd::GetMenu' c:\ultimatetb\include\oxmenubar.h 611 UT2003
Error 9 error C2555: 'COXMenuBar::GetMenu': overriding virtual function return type differs and is not covariant from 'CWnd::GetMenu' c:\ultimatetb\include\oxmenubar.h 611 UT2003
Error 10 error C2039: 'bWin95' : is not a member of 'AUX_DATA' c:\ultimatetb\source\oxscrollwnd.cpp 2063 UT2003
Warning 11 warning C4005: 'TVGN_NEXTSELECTED' : macro redefinition c:\ultimatetb\include\oxtreectrl.h 535 UT2003
Warning 12 warning C4005: 'TVGN_NEXTSELECTED' : macro redefinition c:\ultimatetb\include\oxtreectrl.h 535 UT2003
Warning 13 warning C4005: 'TVGN_NEXTSELECTED' : macro redefinition c:\ultimatetb\include\oxtreectrl.h 535 UT2003
Error 14 error C2555: 'COXMenuBar::GetMenu': overriding virtual function return type differs and is not covariant from 'CWnd::GetMenu' c:\ultimatetb\include\oxmenubar.h 611 UT2003
Warning 15 warning C4005: 'TVGN_NEXTSELECTED' : macro redefinition c:\ultimatetb\include\oxtreectrl.h 535 UT2003
Error 16 error C2555: 'COXMenuBar::GetMenu': overriding virtual function return type differs and is not covariant from 'CWnd::GetMenu' c:\ultimatetb\include\oxmenubar.h 611 UT2003
Error 17 error C2555: 'COXMenuBar::GetMenu': overriding virtual function return type differs and is not covariant from 'CWnd::GetMenu' c:\ultimatetb\include\oxmenubar.h 611 UT2003
Error 18 error C2555: 'COXMenuBar::GetMenu': overriding virtual function return type differs and is not covariant from 'CWnd::GetMenu' c:\ultimatetb\include\oxmenubar.h 611 UT2003
Error 19 error C2555: 'COXMenuBar::GetMenu': overriding virtual function return type differs and is not covariant from 'CWnd::GetMenu' c:\ultimatetb\include\oxmenubar.h 611 UT2003
Error 20 error C2555: 'COXMenuBar::GetMenu': overriding virtual function return type differs and is not covariant from 'CWnd::GetMenu' c:\ultimatetb\include\oxmenubar.h 611 UT2003
Error 21 error C2555: 'COXMenuBar::GetMenu': overriding virtual function return type differs and is not covariant from 'CWnd::GetMenu' c:\ultimatetb\include\oxmenubar.h 611 UT2003
Error 22 error C2555: 'COXMenuBar::GetMenu': overriding virtual function return type differs and is not covariant from 'CWnd::GetMenu' c:\ultimatetb\include\oxmenubar.h 611 UT2003
Error 23 error C2555: 'COXMenuBar::GetMenu': overriding virtual function return type differs and is not covariant from 'CWnd::GetMenu' c:\ultimatetb\include\oxmenubar.h 611 UT2003
Error 24 error C2039: 'bWin95' : is not a member of 'AUX_DATA' c:\ultimatetb\source\ox3dtabview.cpp 390 UT2003
|
|
|
|
|
Odd!
Well, firstly you should use the UT.sln - that's the 2005 solution - yes, not obvious.
Second, some of those errors look like what you'd get in VS2008 without update 02 applied.
Hmmm... try the UT.sln and see how that goes? Also, if you've applied the updates (assume you have, if you're posting here) search the code for update 02 and you'll probably locate the offending code for the GetMenu calls - not sure why they're problematic though - do you have a later version of the PSDK taking precedence in your VC include dirs?
|
|
|
|
|
Thanks. Changing to UT instead of UT2003 did work. I do have VS2008 installed on this system, but was building in VS2005, so maybe that has something to do with it. Anyway thanks for the help and now I can start playing with COXInstanceManager.
Regards, Russ
|
|
|
|
|
At destructor memory (string list and it's content) allocated in function CUT_MimeEncode::AddFileHeaderTag is not freed
function EmptyAttachmentList must be
void CUT_MimeEncode::EmptyAttachmentList() {
MIMEATTACHMENTLISTITEM *item;
while (m_ptrAttachList != NULL) {
item = m_ptrAttachList->next;
if(m_ptrAttachList->ptrDataSource)
delete m_ptrAttachList->ptrDataSource;
if (m_ptrAttachList->lpszName != NULL)
delete[] m_ptrAttachList->lpszName;
if (m_ptrAttachList->lpszContentType != NULL)
delete[] m_ptrAttachList->lpszContentType;
if (m_ptrAttachList->lpszCharSet != NULL)
delete[] m_ptrAttachList->lpszCharSet;
if (m_ptrAttachList->lpszAttachType != NULL)
delete[] m_ptrAttachList->lpszAttachType;
if(m_ptrAttachList->ptrHeaders)
{
m_ptrAttachList->ptrHeaders->ClearList();
delete m_ptrAttachList->ptrHeaders;
}
delete m_ptrAttachList;
m_ptrAttachList = item;
}
}
|
|
|
|
|
both functions contain some error
pItem->lpszName = new char[::strlen(lpszEncoded)];
::strcpy(pItem->lpszName, lpszEncoded);
must be
pItem->lpszName = new char[::strlen(lpszEncoded)+1];
::strcpy(pItem->lpszName, lpszEncoded);
finaly:
int CUT_MimeEncode::EncodeAttachmentFileName(int iIndex, enumEncodingType EncodingType, LPCSTR lpszCharSet)
{
MIMEATTACHMENTLISTITEM* pItem = m_ptrAttachList;
int iCount = 0;
while (pItem != NULL)
{
if (iIndex == iCount)
{
CUT_HeaderEncoding HE;
LPCSTR lpszEncoded = HE.Encode(pItem->lpszName, lpszCharSet, EncodingType);
delete [] pItem->lpszName;
pItem->lpszName = new char[::strlen(lpszEncoded)+1];
::strcpy(pItem->lpszName, lpszEncoded);
}
pItem = pItem->next;
iCount++;
}
return UTE_SUCCESS;
}
int CUT_MimeEncode::DecodeAttachmentFileName(int iIndex, LPSTR lpszCharSet)
{
MIMEATTACHMENTLISTITEM* pItem = m_ptrAttachList;
int iCount = 0;
while (pItem != NULL)
{
if (iIndex == iCount)
{
CUT_HeaderEncoding HE;
if (HE.IsEncoded(pItem->lpszName))
{
LPCSTR lpszDecoded = HE.Decode(pItem->lpszName, lpszCharSet);
delete [] pItem->lpszName;
pItem->lpszName = new char[::strlen(lpszDecoded)+1];
::strcpy(pItem->lpszName, lpszDecoded);
}
}
pItem = pItem->next;
iCount++;
}
return UTE_SUCCESS;
}
|
|
|
|
|
Thanks - filed for update!
Tim
|
|
|
|
|
Thank you very much for this wonderful Toolbox!!
I hope it will still support VS 7.1 for the next time, even my VS is very old! =)
Cu
|
|
|
|
|
You're welcome!
We've tried to preserve compatibility back to VC6, which involved a little preprocessor fussing in the move to VS2008 - but most of the .sln/.vcproj files, except for specific library projects, are in VS2005 format.
For the samples, converting the existing VC6 .dsp or .dsw files in VS 7 should work. So in a sense it's the VC6 compatibility that's providing the hook for VS7, and there are no plans to drop VC6 support as long as it can be resonably accomodated as support for the newer compilers comes on line.
If you find some issues with VS7, share them here.
Cheers from the Group.
|
|
|
|
|
The WM_COMMAND notifications in function COXComboPickerCtrl::ShowDropDown(...) are sent incorrect to the parent. Instead of
pParentWnd->SendMessage(WM_COMMAND,MAKEWPARAM(CBN_DROPDOWN,GetDlgCtrlID()));
it should be
pParentWnd->SendMessage(WM_COMMAND,MAKEWPARAM(GetDlgCtrlID(),CBN_DROPDOWN));
This wrong order of LOWORD and HIWORD appears two times in this function.
Regards,
Chris
|
|
|
|
|
Thanks - filed for update.
Tim
|
|
|
|
|
Thanks so much for your updates to VS2008. I've used UTB and UG for more years than I can count. I used UTB before Dundas bought it from MFC Weekly <g>. I've been stuck with VS2003 until just now due to customer requirements and finally have been able to update to VS2008. I was very happy to see you all had updated the projects to 2008. Thanks and great work!
Phil McAdams
|
|
|
|
|
My thoughts as well. Great job! Thank you, thank you, thank you.
Dick Greene
|
|
|
|
|
Hi all
I've put together a second Ultimate Grid update (02) with changes for 64-bit compilation.
As with the Ulitmate Toolbox 64-bit update, these are just basic compilation adjustments - testers needed.
Thanks
Tim
|
|
|
|