|
Does anyone knows whats the future of the MFC library and the Utlimate Toolbox? Does microsoft has any replacement library with powefully GUIs.
I know that MS visual Studio 2019 still support MFC and that microsoft is still updating the library, but it is still in 32 bits?
Mauricio Alfaro
|
|
|
|
|
1) In UTB OXHTMLParser.cpp: line ~823
TagDescriptor* COXHTMLParser::GetTagDescriptor(LPCTSTR szTag) const
{
// v9.3 - update 03 - 64-bit - HashNode uses DWORD, so revised this - TD
// DWORD_PTR dwData;
DWORD dwData;
if (!m_HTMLTagTable.Lookup(szTag, dwData))
return NULL;
else
return (TagDescriptor*) dwData;
}
x64 needs DWORD_PTR, it was wrong to simply change dwData to a DWORD. The hashtable & hashNode need changed to a DWORD_PTR. all instances need changed to _PTR types to prevent memory exceptions in x64.
2) What is with all the 4456 warnings? (Declaration Hides Previously Declared Variable)
It makes the code VERY unclear. "Is this a mistake? No one would create a local (m_) named variable on purpose...but I assume they didn't want to use the member...I guess Ill leave it until I have time to understand it."
3) OXUUDec.cpp line 153 & line 590
1>..\..\source\OXUUDec.cpp(153): warning C4473: 'sscanf_s' : not enough arguments passed for format string
note: placeholders and their parameters expect 3 variadic arguments, but 2 were provided. The missing variadic argument 3 is required by format string '%255s'. This argument is used as a buffer size.
change to
if (sscanf_s(m_buf, "begin %d %255s", &amode, targetfile, sizeof(char)*256) != 2)
if (sscanf_s(m_buf, "begin %d %80s", &amode, fn, sizeof(char)*81) != 2)
4) remove all (#pragma message). OXDao.h x64 messages each time included.
It's already #defined out, the compiler will error.
modified 8-Dec-17 13:04pm.
|
|
|
|
|
2. That error means there is a variable at module or global scope with the same name as a local variable in a method or function. Those should be fixed if possible because you have essentially ambiguous variables and those are not good.
|
|
|
|
|
Hello,
Recently, we move from VisualStudio 2010 to 2013.
I use Ultimate Toolbox that I have compiled it with Visual C++ 2013 in a lib. It compiles and links without problem.
When I link this lib with my program, I get a link error: LNK2019 unresolved external symbol. With Visual C++ 2010, the link process was correct.
The symbol is the MonitorFromRect Windows function in COXToolTipCtrl:: CalculateInfoBoxRect().
We runs on Windows 7 Professionnal 64 bits. We compile on 32 bits Visual C++.
Is there a way to bypass this problem?
Thanks for any help.
Claude
|
|
|
|
|
I had this problem. I fixed it but it required a change to the source of the library and a rebuild of it.
What you have to do is remove includes of Multimon.h. In the latest SDK that function is declared in WinUser.h and there are macros to 'map' it. The macros in Multimon.h differ from the one in WinUser.h and the function it's defined as does not exist.
Get the last five updates to the library. They have commented it off in several modules. You will still need to rebuild but at least you will have the latest, standard version of the code.
modified 24-Feb-17 10:57am.
|
|
|
|
|
I would like to report that I was able to get Ultimate Toolbox building as a DLL (not Unicode) using Visual Studio 2015 with just a few minor changes. This is for a test conversion of moving our software to both Visual Studio 2012 and 2015 Professional. If anyone would like the details let me know and I can post them.
|
|
|
|
|
I got it to build as a DLL with VS 2015 too, sort of. I am having problems with the bar menu classes and conversion between HMENU and CMenu *. Have you fixed that?
Never mind. I see this has been fixed with the updates. Now I have an issue with GetVersion calls in the SysInfo module to either solve or remove.
modified 24-Feb-17 10:59am.
|
|
|
|
|
I have update CellTypeDemoGrid.cpp and CellTypeDemoGrid.h to make the code Unicode compliant. This consists of adding alot of _T() constructs to the cpp file and changing a few LPCSTR to LPCTSTR in the cpp and h files.
How can I send the code?
Clayton
|
|
|
|
|
m_grid.QuickSetNumber( r, 1, person->getUserNo() );
m_grid.QuickSetText( r, 2, person->getUserName() );
Above is part of a loop to fill a grid.
CUGCtrl::SetCell() ds = m_GI->m_colInfo[col].dataSource; line 2813.
I am using VS 2012.
Anybody got a version of the grid working in vs2012?
|
|
|
|
|
MS VS 2010 : I am using an object of COXStatusBar Class (pointer) in the CMainFrame class of my project. I need to refer this same object into two DLLs. When it is used in first DLL then it is working fine but when the same object is being used in the second DLL it is crashing. The function which is being called is "ResetBar" .
Please help me to get rid of this error.
|
|
|
|
|
Hi,
Does this control is compatible with windows mobile ((MFC apps in VS208) ?
Thx
|
|
|
|
|
|
I found that when COXStaticText was scrolling and SetBgColour was called, the scrolling text position was reset to the default which made it look jumpy. I have alternating colours on my CStaticText background so it looked a bit odd. I found that adding the following check to see if scrolling had started fixed my issue...
in OnPrepareBitmap...
if(!IsScrollingStarted())
GetInitialDisplacement(textRect);
|
|
|
|
|
Hello, I was just wondering if anyone has been able to get the UTB working with VS2012 yet? I was able to compile the UG without problem but I am having some issues with the UTB and wanted to check if anyone else has fixed the problems yet before I delve in to deep.
Shawn
|
|
|
|
|
Looks like VS2012 won't work with XP so I had to change the WINVER in the stdafx from 0x0501 (XP) to 0x0600 (Vista) after that UTB built with out major problems. I would still like to target XP with my application but I may need to stay away from VS2012 until they fix that issue.
Shawn
|
|
|
|
|
Hi ,
I have used UGGrid in my application and built in both 64 as well as 32 bit . It was working fine . Now we started using new look of common controls #define _IMPROVE_LOOKANDFEEL InitCommonControlsEx then it started crashing and it seems to be a some paint issue. Got few updates from Code project could solve the paint in 64 bit but 32 bit it is still crashing . In 64 bit when we sort the list it crashes i.e CUGTopHdg::OnLButtonDown which intern points to OnDrawFocusRect of the client .
Is there any update for these new look of common controls and 64 bit crash .
|
|
|
|
|
Hello!
I wonder when we get full packages with the patches included?
|
|
|
|
|
I derived my own class from COXEdit, everything works fine till i switch compilation to UNICODE.
Now I'm getting strange link errors:
ultimateUnicode error LNK2001: unresolved external symbol "public: virtual int __thiscall COXEdit::SetInputData(wchar_t const *,int)" (?SetInputData@COXEdit@@UAEHPB_WH@Z)
ultimateUnicode error LNK2001: unresolved external symbol "protected: virtual int __thiscall COXEdit::InsertAt(int,wchar_t)" (?InsertAt@COXEdit@@MAEHH_W@Z)
ultimateUnicode error LNK2001: unresolved external symbol "protected: virtual int __thiscall COXEdit::SetAt(int,wchar_t)" (?SetAt@COXEdit@@MAEHH_W@Z)
ultimateUnicode error LNK2001: unresolved external symbol "public: virtual class ATL::CStringT<wchar_t,class StrTraitMFC_DLL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > __thiscall COXEdit::GetInputData(void)const " (?GetInputData@COXEdit@@UBE?AV?$CStringT@_WV?$StrTraitMFC_DLL@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@XZ)
does enyone konw why it happens?
myclass.h:
class CMEdit : public COXEdit
{
DECLARE_DYNCREATE(CMEdit)
public:
CMEdit();
virtual ~CMEdit();
inline COLORREF GetActiveFont(){return m_clrActiveFont; }
inline COLORREF GetActiveBack(){return m_clrActiveBack; }
inline void SetActiveFont(COLORREF clrNew){m_clrActiveFont = clrNew; }
inline void SetActiveBack(COLORREF clrNew) {m_clrActiveBack = clrNew; }
inline COLORREF GetNormalFont(){return m_clrNormalFont; }
inline COLORREF GetNormalBack(){return m_clrNormalBack; }
inline void SetNormalFont(COLORREF clrNew){m_clrNormalFont = clrNew; }
inline void SetNormalBack(COLORREF clrNew) {m_clrNormalBack = clrNew; }
inline COLORREF GetDisabledFont(){return m_clrDisabledFont; }
inline COLORREF GetDisabledBack(){return m_clrDisabledBack; }
inline void SetDisabledFont(COLORREF clrNew){m_clrDisabledFont = clrNew; }
inline void SetDisabledBack(COLORREF clrNew) {m_clrDisabledBack = clrNew; }
inline BOOL GetActiveMarking() {return m_bEnableActiveMarking;}
inline void SetActiveMarking(BOOL bVal) {m_bEnableActiveMarking = bVal; }
inline BOOL GetAlwaysReadOnly() {return m_bAlwaysReadOnly;}
inline void SetAlwaysReadOnly(BOOL bVal) {m_bAlwaysReadOnly = bVal; }
inline BOOL GetOffColors() {return m_bOffColors;}
inline void SetOffColors(BOOL bVal) {m_bOffColors = bVal; }
protected:
COLORREF m_clrNormalFont;
COLORREF m_clrNormalBack;
COLORREF m_clrDisabledFont;
COLORREF m_clrDisabledBack;
COLORREF m_clrActiveFont;
COLORREF m_clrActiveBack;
BOOL m_bEnableActiveMarking;
BOOL m_bAlwaysReadOnly;
BOOL m_bOffColors;
public:
afx_msg HBRUSH CtlColor(CDC* , UINT );
afx_msg void OnKillFocus(CWnd* pNewWnd);
DECLARE_MESSAGE_MAP()
};
myclass.cpp:
IMPLEMENT_DYNCREATE(CMEdit, COXEdit)
CMEdit::CMEdit():
m_clrNormalBack (c_clrEnabledBack), m_clrNormalFont(c_clrEnabledFont),
m_clrActiveBack(c_clrActiveBack), m_clrActiveFont(c_clrActiveFont),
m_clrDisabledBack(c_clrDisabledBack), m_clrDisabledFont(c_clrDisabledFont),
m_bAlwaysReadOnly(FALSE), m_bEnableActiveMarking(TRUE), m_bOffColors(FALSE)
{
m_clrText = m_clrNormalFont;
m_clrBack = m_clrNormalBack;
EnableActiveAccessibility();
}
CMEdit::~CMEdit()
{
}
BEGIN_MESSAGE_MAP(CMEdit, COXEdit)
ON_WM_CTLCOLOR_REFLECT()
ON_WM_KILLFOCUS()
END_MESSAGE_MAP()
HBRUSH CMEdit::CtlColor(CDC* pDC, UINT nCtlColor)
{
UNREFERENCED_PARAMETER(nCtlColor);
COLORREF newTextColor;
COLORREF newBkColor ;
if(m_bOffColors)
{
newTextColor = !IsWindowEnabled() ? RGB (80, 80, 80) : GetSysColor(COLOR_WINDOWTEXT);
newBkColor = GetSysColor(COLOR_WINDOW);
}
else
{
if (!IsWindowEnabled())
{
newTextColor = m_clrDisabledFont;
newBkColor = m_clrDisabledBack;
}
else if(GetStyle()&ES_READONLY)
{
newTextColor = m_clrReadOnlyFont;
newBkColor = m_clrReadOnlyBack;
}
else if(this == GetFocus() && m_bEnableActiveMarking)
{
newTextColor = m_clrActiveFont;
newBkColor = m_clrActiveBack;
}
else
{
newTextColor = m_clrNormalFont ;
newBkColor = m_clrNormalBack ;
}
}
pDC->SetTextColor(newTextColor);
pDC->SetBkColor(newBkColor);
if((HFONT)m_font!=NULL)
pDC->SelectObject(&m_font);
static CBrush brush;
if((HBRUSH)brush!=NULL)
brush.DeleteObject();
brush.CreateSolidBrush(newBkColor);
return (HBRUSH)brush;
}
void CMEdit::OnKillFocus(CWnd* pNewWnd)
{
COXEdit::OnKillFocus(pNewWnd);
RedrawWindow();
}
|
|
|
|
|
I have got some time to check some settings. Both projects (ut library and my project) have to had the same setting for /Zc:wchar_t (wchar_t Is Native Type)
|
|
|
|
|
I am using the ultimate toolbox for my application. I have two toolbars side by side in my application.
keeping my application on top and if the system is locked and unlocked, the toolbars are at the same positions side by side. But if the application is minimized, and system is locked and unlocked, then the two tool bars which are side by side, become one below the other. how to fix this?
Thanks
pavan
|
|
|
|
|
Never heard of this before, sorry
|
|
|
|
|
Never heard of this before, sorry dude
|
|
|
|
|
UltimateToolbox\UltimateToolbox93_samples\Ultimate Toolbox\source\OXWABook.cpp(1361) : error C2440: '=' : cannot convert from 'char [260]' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
UltimateToolbox\UltimateToolbox93_samples\Ultimate Toolbox\source\OXWABook.cpp(1669) : error C2664: 'LDAPUrl' : cannot convert parameter 4 from 'char [260]' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
OXWatchedDir.cpp
#if (defined _UNICODE) && ((defined WABIMPORTPARAM) || (_MFC_VER >= 0x0600))
char szBuffer[_MAX_PATH];
#endif // _UNICODE
// v9.3 - update 04 fixes for unicode builds in vc6 CHANGED _MFC_VER - AAW 2009-03-29
#if (defined _UNICODE) && ((defined WABIMPORTPARAM) || (_MFC_VER >= 0x0600))
::WideCharToMultiByte(CP_ACP, WC_SEPCHARS, m_sBookPath, m_sBookPath.GetLength(),
szBuffer, _MAX_PATH, NULL, NULL);
stWabParam.szFileName = szBuffer;
#else
stWabParam.szFileName = (TCHAR*)(LPCTSTR) m_sBookPath;
#endif
}
// v9.3 - update 04 fixes for unicode builds in vc6 CHANGED _MFC_VER - AAW 2009-03-29
#if (defined _UNICODE) && ((defined WABIMPORTPARAM) || (_MFC_VER >= 0x0600))
char szBuffer[_MAX_PATH];
::WideCharToMultiByte(CP_ACP, WC_SEPCHARS, lpszLDAPURL, -1,
szBuffer, _MAX_PATH, NULL, NULL);
hRslt = m_pIWABObject->LDAPUrl(m_pIAddrBook, m_hWnd,ulFlags,
szBuffer, &pUser);
#else
hRslt = m_pIWABObject->LDAPUrl(m_pIAddrBook, m_hWnd,ulFlags,
lpszLDAPURL, &pUser);
#endif
|
|
|
|
|
VC6 error
VC++2008 noerror
|
|
|
|
|
Dear All,
I'm using the SMTP function to send Email (the Mail example). Unfortunately every time I get error "There was no response from the server". With the same server in Outlook I can send Emails. Can anybody help here?
Thanks!
Best Regards,
Ahamade.
|
|
|
|