|
There seems to be a minor issue in the methods
COXMiniFrameSkinXP::COXMiniFrameSkinXP(COXSkinXP* pSkinXP) and
COXDockbarSkinXP::COXDockbarSkinXP(COXSkinXP* pSkinXP)
of OXSkins.cpp. The call
m_fontCaption.CreatePointFont(85, _T("Tahoma BOLD"));
may fail on non-English systems. The font names are different. E.g. "Tahoma fett" on my machine. The effect is that the text is not rendered properly. Especially if the orientation of the text is vertical.
Replacing the line with
LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT));
lf.lfHeight = 85;
lf.lfWeight = FW_BOLD;
strcpy_s(lf.lfFaceName, LF_FACESIZE, "Tahoma");
VERIFY(m_fontCaption.CreatePointFontIndirect(&lf, NULL));
fixes the problem.
Rasmus
|
|
|
|
|
I've just installed the current releases of UT along with the 4 updates. I'm running Vista Home Premium 64 bit with VS2008. I've loaded UT2008 into VS2008 (VS2008 updates the project). When the platform is set to x64 then the project settings (i.e. click on [Project][Properties]) cannot be viewed/edited. This generates the error "The operation could not be completed. Unspecified error". However, the project settings can be viewed/edited when the platform is changed to Win32. Aside from rebuilding the entire project from scratch, does any one have any ideas or suggestions of how to correct this problem?
thanks,
Ian
|
|
|
|
|
Yes I think something got messed up here - the UT2008.sln might still be referencing the UT.proj file.
Try opening the UT2008.sln file in notepad and changing the reference in the "Project" line from UT.vcproj to UT2008.vcproj.
Tim
|
|
|
|
|
Hi Tim,
That did the trick. Thanks,
Ian
|
|
|
|
|
Cool - filed in the update pile - thanks
Tim
|
|
|
|
|
If you (like I did) forget to recompile your library which is dynamically linked to MFC, you'll find you have dependencies on both the old and new assemblies, and your program will no longer load, giving an error about the "Application configuration is incorrect".
Anthony Wieser
Wieser Software Ltd
Anthony Wieser
Wieser Software Ltd
|
|
|
|
|
HI All,
Hope Im posting this in the right place, if not, just flame me
Im using COXCoolToolBar in my COXSkinnedApp (office 2003 skin) with custom buttons (or, more specifically inserting combo boxes in various places of the COXCoolToolBars).
Everything works fine, it really looks quite flash!
Now I'm just grappling w/ one problem. Im not very good at inventing really useful icons to reflect the behavior of a button, so I rely pretty much on the text labels on the standard buttons to describe the command. (Eg if Ive got a button for the "Draw" command, Id rather have the word "Draw" on the button instead of a silly icon, that I made up myself, not being an artist it doesnt well reflect the button's behavior).
Now for STANDARD COXCoolToolBar buttons this is easy; its formally supported by the framework.
But how about the Combo Boxes that Ive inserted in the COXCoolToolBar as "custom buttons"...
Ive been fooling w/ 2 options here:
1) I can "indent" the "start point" of the buttons on the COXCoolToolBar, and, overriding "WM_PAINT" I can write by own text label in the blank space. This really looks quite nice but also is clearly only
useful to a) put a descriptive name on the bar, or b) on the first button in the bar.
2) Another, possibly better alternative is to use tool tips, but I have not been able to make them work for custom buttons.
Anyway my question(s) is(are):
* Can I make (easily) tooltips work for custom buttons on a COXCoolToolBar. It *appears* to me that they're not directly supported, but Im no guru!!!
* Any other clever ideas about how I can transmit to the user the function/meaning/use (by textual means, rather than an icon) of a custom combo inserted in a COXCoolToolBar.
Thanks in advance, all ideas gratefully received!!
Cheers
DaveC
|
|
|
|
|
In COXPropertyTree class, the function m_pPropertiesWnd->FinishEditing() is called in COXPropertyTree::OnKillEditFocus(), and COXPropertyTree::PreTranslateMessage(MSG* pMsg) WM_KEYDOWN -> VK_RETURN.
The problem is that m_pPropertiesWnd->FinishEditing() will be called twice when user enter value in any editable entry in PropertiesWnd and press enter, because in
void COXPropertiesWnd::FinishEditing(BOOL bSave)
{
if (m_hEditProp == NULL) {
return;
}
if (bSave)
{
CString strText;
COXMaskedEdit* pMaskedEdit = DYNAMIC_DOWNCAST(COXMaskedEdit, m_pEditWnd);
if (pMaskedEdit != NULL)
strText = pMaskedEdit->GetText();
else
m_pEditWnd->GetWindowText(strText);
BOOL bSaveValue = OnPropertyValueChanged(m_hEditProp,
GetPropertyValue(m_hEditProp), strText);
if (bSaveValue)
SetPropertyValue(m_hEditProp, strText);
}
m_pEditWnd->ShowWindow(SW_HIDE);
m_pEditWnd = NULL;
m_hEditProp = NULL;
m_wndTree.SelectItem(NULL);
}
the highlighted line will trigger COXPropertyTree::OnKillEditFocus() where m_pPropertiesWnd->FinishEditing() will be called for the second time.
This wrong behavior will lead to calling the overrided function OnPropertyValueChanged twice.
I tried a work around to solve this by modifying COXPropertyTree::OnKillEditFocus() as the following:
void COXPropertyTree::OnKillEditFocus()
{
if (m_pPropertiesWnd && m_pPropertiesWnd->m_pEditWnd->IsWindowVisible())
m_pPropertiesWnd->FinishEditing();
}
However the problem still exist with another scenario, when editing an entry and using mouse; focus on another entry.
I hope to get a solution for this.
Thanks a lot
Mina Saweres Yousef
Software Engineer - CITE Team
PSD (Pyramids Systems Development)
web : http://www.psd.com.eg
|
|
|
|
|
Howdy'
While upgrading our projects from VS2003 to VS2008...
I'm in the process of upgrading to the latest dundas toolkit code.
I've applied all the patches to our code.
I have a crash in COXBitmapMenuOrganizer::Init that confuse me.
BOOL COXBitmapMenuOrganizer::Init(UINT cx, UINT cy, UINT nCheckID, UINT nBulletID)
{
CDC memDC;
VERIFY(memDC.CreateCompatibleDC(NULL));
}
This happens when the COXBitmapMenuOrganizer is created in the main frame class.
Any hints ?
Thanks.
Max.
This signature was proudly tested on animals.
|
|
|
|
|
Hi Max
Not a clue on this one, but worth a shot.
I'm assuming you replaced your older version with v9.3 then applied the updates.
Are you compiling for 64 bit, and/or running on Vista? Any difference if aero on/off?
The skinsdemo in the samples/advanced dir might be worth testing to see if the same problem occurs - maybe break and check the call stack to see if the init arises in the same way.
You might or might not get something informative from a call to GetLastError when CreateCompatibleDC returns NULL .
Lastly it could be a resource issue, but then I think there would be other manifestations.
Just some thoughts - really haven't seen this one.
Tim
|
|
|
|
|
The issue was not at all related to that, but still related to Dundas.
I'm using VS2008 with the MFC Feature Pack.
There seems to be some conflicts between classes (Dundas' CMFCToolbar and the Feature Pack classe CMFCToolbar for example).
This signature was proudly tested on animals.
|
|
|
|
|
In function COXQuickString::GetString() the const chNull is defined as char causing a fail in UNICODE projects. To repair this fail do this change:
//Original
LPCTSTR COXQuickString::GetString() const
{
static const char chNull = TEXT('\0');
if (IsEmpty())
return (LPCTSTR)&chNull;
else
return (LPCTSTR)m_szText;
}
change line
static const char chNull = TEXT('\0');
to
static const TCHAR chNull = TEXT('\0');
|
|
|
|
|
How can I use a sub grid as a cell in grid?
is there a celltype for subgrid?
hh
|
|
|
|
|
utcertifman.cpp: CUT_CertificateManager::CertificateRequest
line 441:
_TCHAR *lpszBuffer =
(_TCHAR *)LocalAlloc(LMEM_FIXED, (SysStringLen(bstrResult) + 1024)*sizeof(_TCHAR));
line 476:
delete [] lpszBuffer;
LocalFree should be used!
|
|
|
|
|
Hi!
I've used Visual Studion 2008 Code Analysis tool and found a number of things.
Some of them are bugs, others make code safer. Some of the changes only remove high-level warnings.
You will find modified source files and PATCH file for all changes inside the following archive:
http://register.at.tut.by/sources/ultimatetcpip_from_sk2.zip[^] (Updated!)
modified on Tuesday, March 24, 2009 6:20 PM
|
|
|
|
|
|
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
|
|
|
|