 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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) { // Call OnPropertyValueChanged(...) and save the value 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); }
// Hide the editor 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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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)); // crash here //.... }
This happens when the COXBitmapMenuOrganizer is created in the main frame class.
Any hints ?
Thanks.
Max.
This signature was proudly tested on animals.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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');
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
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!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
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; // Dock Canidate DWORD dwCurr = 0; // Current Orientation // let's check for something in our current orientation first // then if the shift key is not forcing our orientation then // check for horizontal or vertical orientations as long // as we are close enough ASSERT(m_dwStyle != 0); bStyleHorz = HORZF(m_dwStyle); m_pTargetDockBar = NULL; // can simplify this, 'cos most of the rectangles are actually the same if (dwDock == 0 && HORZF(m_dwDockStyle)/* && m_rectDragHorzAlone.PtInRect(m_ptLast)*/) { dwDock = m_pDockSite->CanDock(m_rectDragHorzAlone, m_dwDockStyle & ~CBRS_ORIENT_VERT, (CDockBar**)&m_pTargetDockBar); } if (dwDock == 0 && VERTF(m_dwDockStyle)/* && m_rectDragVertAlone.PtInRect(m_ptLast)*/) { dwDock = m_pDockSite->CanDock(m_rectDragVertAlone, m_dwDockStyle & ~CBRS_ORIENT_HORZ, (CDockBar**)&m_pTargetDockBar); } if (dwDock != 0) // will dock somewhere - now look for 1/2 bars on the row... { 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;
// AAW if (m_pBar->m_pDockBar == m_pTargetDockBar) { // if we're planning to move it to the same bar, don't change our width. CRect rct; m_pBar->GetWindowRect(&rct); m_rectDragDock.bottom = m_rectDragDock.right + rct.Width(); } else // AAW END { 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; // AAW if (m_pBar->m_pDockBar == m_pTargetDockBar) { // if we're planning to move it to the same bar, don't change our height. CRect rct; m_pBar->GetWindowRect(&rct); m_rectDragDock.bottom = m_rectDragDock.top + rct.Height(); } else // AAW END { m_rectDragDock.bottom = m_rectDragDock.top+ m_rectDragVertAlone.Height()/(nBars+1); } } } } }
return dwCurr; }
Anthony Wieser Wieser Software Ltd
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
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); //////////////////////////////////////////////// // non-unicode ********************************* 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
//////////////////////////////////////////////////// /////////////// NO CHANGES AFTER THIS ///////////
GlobalUnlock(hglobal); if(res) // conversion ok m_dataSource.CacheGlobalData(CF_TEXT,hglobal,NULL);
/////////////////////////////////////////////////// // unicode ****************************************
# 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; }
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I use GetAttachmentNumber(), GetAttachmentInfo(.....) , But how to return real attachment file / emebbed img in htmlbody / other ?
hh
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Have a look at the CUT_Msg::Decode functions:
int Decode(int index, CUT_DataSource & dest) int Decode(int index, LPCTSTR filename)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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?
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
At destructor memory (string list and it's content) allocated in function CUT_MimeEncode::AddFileHeaderTag is not freed
function EmptyAttachmentList must be
/******************************** EmptyAttachmentList Deletes all elements in the Attachment List, including all elements of any include custom header lists. PARAM: none RETURN: none *********************************/ 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;
/* free memory allocated in AddFileHeaderTag */ if(m_ptrAttachList->ptrHeaders) { m_ptrAttachList->ptrHeaders->ClearList(); delete m_ptrAttachList->ptrHeaders; }
delete m_ptrAttachList;
m_ptrAttachList = item; } }
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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:
/*********************************************** EncodeAttachmentFileName Encodes the filename of the attachment PARAM: iIndex - index of the attachment EncodingType - encoding algorithm (ENCODING_BASE64 or ENCODING_QUOTED_PRINTABLE) lpszCharSet - character set of the header ("utf-8", ...) RETURN: UTE_SUCCESS - success UTE_ERROR - error ************************************************/ int CUT_MimeEncode::EncodeAttachmentFileName(int iIndex, enumEncodingType EncodingType, LPCSTR lpszCharSet) { // Loop though all the attachment items and find the one we want MIMEATTACHMENTLISTITEM* pItem = m_ptrAttachList; int iCount = 0; while (pItem != NULL) { if (iIndex == iCount) { // Encode this filename 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; }
/*********************************************** DecodeAttachmentFileName Decodes the filename of the attachment PARAM: iIndex - index of the attachment lpszCharSet - (out) character set of the decoded text RETURN: UTE_SUCCESS - success UTE_ERROR - error ************************************************/ int CUT_MimeEncode::DecodeAttachmentFileName(int iIndex, LPSTR lpszCharSet) { // Loop though all the attachment items and find the one we want MIMEATTACHMENTLISTITEM* pItem = m_ptrAttachList; int iCount = 0; while (pItem != NULL) { if (iIndex == iCount) { CUT_HeaderEncoding HE; if (HE.IsEncoded(pItem->lpszName)) { // Decode this filename 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; }
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |