|
Does dumpbin helps? I just tried it and it does show the content of each section in an EXE or OBJ file. It also show the summary of different sections. I am not sure if it is easy to find the source of data in each section.
-Saurabh
|
|
|
|
|
In addition to above, confirm you have not selected the "Link incrementally" option.
|
|
|
|
|
On a sidenote, the debug EXE -since it is stuffed with debug information and other "surprises"- will be much bigger than the release one. Can it be that you simply forgot to switch your configuration from DEBUG to RELEASE?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
if it only were that simple...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
I created a binary predicate
// binary predicate for searching by exp date
bool exp_LT(curvePoint<double> lhs, curvePoint<double> rhs) { return (lhs.getExp() < rhs.getExp()); }
so I could search a vector by _expDate rather than _mDate on the curvePoint class:
template<class _Ty> class curvePoint : public subscriber
{
friend fwdCurve;
friend bktCurve;
public:
void setValue(_Ty p) { _mValue = p; }
_Ty getValue() { return _mValue; }
void setDate(Date d) { _mDate = d; }
inline void setDate(long d) { _mDate = d; }
Date getDate() { return _mDate; }
void setExp(Date d) { _expDate = d; }
void setExp(long d) { _expDate = d; }
Date getExp() { return _expDate; }
void update() {}
// allow self comparison
bool operator<(const curvePoint<_Ty>& rhs) const { return _mDate < rhs._mDate; }
bool operator>(const curvePoint<_Ty>& rhs) const { return _mDate > rhs._mDate; }
bool operator==(const curvePoint<_Ty>& rhs) const { return _mDate == rhs._mDate; }
bool operator!=(const curvePoint<_Ty>& rhs) const { return _mDate != rhs._mDate; }
protected:
_Ty _mValue;
Date _mDate;
Date _expDate;
};
When I call
curvePoint<double> c;
c.setExp(myDate("01/01/2009"));
i = lower_bound(vector.begin(), vector.end(), &c, exp_LT); <---- Crashes here
The compiler throws an error (C2664). The message is
1>c:\program files\microsoft visual studio 8\vc\include\xutility(312) : error C2664: 'bool (RAIV::curvePoint<_Ty>,RAIV::curvePoint<_Ty>)' : cannot convert parameter 2 from 'RAIV::curvePoint<_Ty> ' to 'RAIV::curvePoint<_Ty>'
1> with
1> [
1> _Ty=double
1> ]
1> No constructor could take the source type, or constructor overload resolution was ambiguous
I'm guessing the compiler cannot resolve something about the templated curvePoint<double> parameter but am at a loss as to how to proceed.
|
|
|
|
|
mjackson11 wrote: bool exp_LT(curvePoint<double> lhs, curvePoint<double> rhs) { return (lhs.getExp() < rhs.getExp()); }
Don't you want those to be references?
led mike
|
|
|
|
|
You can try
template< typename T >
struct curve_lt : public binary_function <T, T, bool>
{
bool operator()( const T &rhs, const T &lhs )
{
return rhs.getDate() < lhs.getData();
}
};
......
i = lower_bound(vector.begin(), vector.end(), &c, curve_lt());
|
|
|
|
|
It turned out that I called the routine correctly 5 times, on the sixth call, I had the wrong kind of parameter there, (an iterator as opposed to the actual class). Somehow that caused an error in all six places the function was called.
|
|
|
|
|
On a side note, a few changes will makes things better. First change this function by adding the underlined bits:
bool exp_LT(const curvePoint<double> &lhs, const curvePoint<double> &rhs) { return (lhs.getExp() < rhs.getExp()); }
Now change the class as follows (again, by adding the underlined bits):
public:
void setValue(_Ty p) { _mValue = p; }
_Ty getValue() const { return _mValue; }
void setDate(Date d) { _mDate = d; }
inline void setDate(long d) { _mDate = d; }
Date getDate() const { return _mDate; }
void setExp(Date d) { _expDate = d; }
void setExp(long d) { _expDate = d; }
Date getExp() const { return _expDate; }
Steve
|
|
|
|
|
Hi All,
I am working on a project which has 2 seperate processes.
1. MFC Dialog application
2. Windows Service written in C#
I want to send a user defined message from MDF Dialog application to the Windows service written in C#
Send message/post message dosent work as it need a handle to the window of the receiver, which we will not have in case of a service.
How can i accomplish this.
Thanks everyone.
|
|
|
|
|
There are many other IPC methods - named pipes, shared memory, mailslots, etc. I've unsed name pipes in the past, but I can;t say they're the best.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Dear sir,
I am using the "MimeSniffer.dll" for opening the eml files.
The eml files without the attachment is opened perfectly without any problems.
But when i tried to open the eml file having attachments, i was not able to get the body text of that eml file.
Sir, i have pasted the content of eml file, that i tried to open, below:
Please suggest me some solution for this.
Thanks & Regards
Sandeep
/****************************************************************************/
From: <xyz@xyz.com>
To: <abc@abc.com>
Subject: test mail
Date: Mon, 19 Jan 2009 16:42:46 +0530
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0019_01C97A54.F7104550"
X-Priority: 3
X-MSMail-Priority: Normal
X-Unsent: 1
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
This is a multi-part message in MIME format.
------=_NextPart_000_0019_01C97A54.F7104550
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_001A_01C97A54.F7104550"
------=_NextPart_001_001A_01C97A54.F7104550
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
hi=20
this is test mail.
hi=20
this is test mail.
hi=20
this is test mail.
hi=20
this is test mail.
hi=20
this is test mail.
------=_NextPart_001_001A_01C97A54.F7104550
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
charset=3Diso-8859-1">
|
|
|
|
|
I have some richedit controls in form view.
When doing mouse wheel scroll, I am getting notification message to OnNotify() function by setting ENM_SCROLLEVENTS mask to the richedit control.
But I want the OnMouseWheel() function to be called as I want to do scrolling of Form view like this inside "OnMouseWheel()":
<br />
OnMouseWheel(UINT fFlags, short zDelta, CPoint point)<br />
{<br />
if (fFlags & (MK_SHIFT | MK_CONTROL))<br />
return FALSE;<br />
<br />
return DoMouseWheel(fFlags, zDelta, point);<br />
}<br />
How to do this.
Or can I do scrolling by using OnNotify() itself?
Thanks & Regards,
Sabapathy
|
|
|
|
|
Looking at the docs[^], you'll get sent an EN_MSGFILTER[^] notification, which includes a pointer to a MSGFILTER[^] structure. This structure includes the original mouse wheel message, which you could send to the form? So, if I understand your question correctly, you could do the scrolling by forwarding the mouse wheel message to the form.
|
|
|
|
|
Hello All,
I am doing SDI application in MFC (VC++) . In that parent, window is having a Menu Bar. When I select one of the Menu option from parent window, another child window will be created. This child window is having its own Menu Bar.
Problem is that this Menu Bar’s submenu is disabled at starting. But when I click on child window’s view, this child window’s submenu item is enabled. How can I enable child window’s submenu item without clicking on child window’s view.
I written the follwing code in the Parent window's MenuBar. When i click on this Parent window sub menu item, child window is created of the name "Bed1" and attach the MenuBar IDR_MENU1 to this chile window
//////
CFrameWnd* pFrame ;
pFrame = new CFrameWnd;
if(!pFrame->Create(NULL,_T("Bed1"),WS_OVERLAPPEDWINDOW ,CRect(0,0,200,200),this,MAKEINTRESOURCE(IDR_MENU1),NULL,&newContext))
{
TRACE0("Failed to create MenuBar");
}
pFrame->SetWindowPos(NULL,rect.left,rect.top,rect.Width()/2,rect.Height()/2,SWP_SHOWWINDOW);
//////
If anybody know the solution, please help.
|
|
|
|
|
I want to show hotkey for menu items like "Ctrl + L" etc.
I have given it with "\t" like "E-mail\tCtrl + E" to align it in right side.
But when running application, the hotkey text is not visible.
Instead of tab, if I give spaces, it is showing, but alignment is varying between systems.
How to solve this, is there any other way to do this?
|
|
|
|
|
Are you doing any sort of menu owner drawing?
If in doubt, create a brand new project, SDI app, and try tweaking that menu. If the new project works, and yours does not - you need to track down the error.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
I am using Xtreme Toolkit's CXTPToolbar to load the menu and other toolbars.
Instead of CFrameWnd, I am deriving my mainframe class from CXTPFrameWnd as I am using many stuff from Xtreme Toolkit for GUI style & design.
|
|
|
|
|
Well, you can do the step I suggested and create a virgin project. If that works correctly, you have either found a bug in CXTPxxxx, or a bug in your useage of it.
If you can confirm then, then maybe they have a forum there that can help you? You can still try here of course - just because I have no clue about this tookit doesn't mean nobody does - but you'll stand a better chance on their forums.
Good luck,
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Hello,
I'm facing problems with the two-stage name lookup for templates, and I'm wondering what could be the right way to deal with it.
The issue is that non dependent names of template base class can not be "seen" at parse time in the derived class, and must therefore be made dependent, either using "this->" or qualification "base<T>::"
I can understand the usefullness of 2 stage name lookup, but also having all members and functions of base class used through "this->" in the derived class is "not a standard" and is ugly.
So What should be the right way of coding to work around this?
Thanks.
BR.
|
|
|
|
|
Can you post a sample code? What's the version of your compiler?
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
One alternative mentioned by the GCC docs[^] is this:
template <typename T> struct Base
{
int i;
};
template <typename T> struct Derived : public Base<T>
{
using Base<T>::i;
int get_i()
{
return i;
}
};
i.e. have a using declaration to bring the base classes name into the derived classes scope. This declaration has to be at the class, not in the method(s) that use the base classes name.
[edit] PS - as far as I can tell, no Microsoft C++ compiler up to and including the one in Visual Studio 2008 does this as per the standard - it will see the non-dependent name even though it's not meant to. g++ does conform to the standard, however, and has done since at least gcc 3.4.2 (which is the earliest one I've got access to). [/edit]
|
|
|
|
|
Thanks Stuart for the reply.
"using" declaration can be in fact more practical...
About the compiler, I tried with gcc4.0.1.
|
|
|
|
|
In the same context, I'm trying to minimize the changes and extra code to be added in derived class, is there a way to group together the non dependent names? Can the keyword "export" be of any help?
Thanks for any suggestion.
Regards.
|
|
|
|
|
f_jo wrote: Can the keyword "export" be of any help?
Unlikely, given that export is supported by Comeau ++ and Borland C++ (possibly) and...well, that's it...
f_jo wrote: In the same context, I'm trying to minimize the changes and extra code to be added in derived class, is there a way to group together the non dependent names?
Not entirely sure what you mea.
|
|
|
|