|
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
|
|
|
|
|
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?
|
|
|
|
|