|
Thanks for clearing it out.
Best regards,
Alexandru Savescu
|
|
|
|
|
+ parts of the iostreams.
--
standing so tall, the ground behind
no trespassers, on every floor
a garden swing, and another door
she makes it clear, that everything is hers
A place of abode, not far from here, Ms. Van de Veer
|
|
|
|
|
Yes, put in IQ > 50 in User requirements below the System requirements on the box.
/Magnus
- I don't necessarily agree with everything I say
|
|
|
|
|
How can I decide whether the control is in design mode or not. I mean whether it's in an IDE such as VB and is being dragged and dropped, but not running as part of an application.
|
|
|
|
|
Not sure if this will work or not - give it a go - add the following to your control class:
BOOL IsUserMode()
{
BOOL bUserMode = TRUE;
HRESULT hRet = GetAmbientUserMode(bUserMode);
if (FAILED(hRet) || bUserMode)
{
return TRUE;
}
return FALSE;
}
If the control is in design mode, then the above returns FALSE ... I think ...
Faith. Believing in something you *know* isn't true.
|
|
|
|
|
|
I have a number of DLLs that use CAtlStrings in the public interfaces. At build times I recieve a large number of warnings of this nature:
SWServices\RuntimeDataPlugv1_0_0.h(102) : warning C4251: 'RuntimeDataPlugv1_0_0::m_strIconTip' : class 'ATL::CStringT<basetype,stringtraits>' needs to have dll-interface to be used by clients of class 'RuntimeDataPlugv1_0_0'
with
[
BaseType=char,
StringTraits=ATL::StrTraitATL<char,atl::chtraitscrt<char>>
]
At first I thought there was a real problem with the the use of using the template typedefs. However, everything works fine. Is there a way to get rid of these warnings? Is there something I'm missing that I should be worried about?
|
|
|
|
|
Returning CString/CAtlString from a dll is not really advisable. Simple return LPCTSTR.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
I was under the impression that VC 7 fixed all the problems they had with these sorts of issues. Is there something specifically that is dangerous in CATLString? Dealing in LPCTSTR is a performance hit I'd rather not deal with.
|
|
|
|
|
hi,
i have created certain math and engg utilities for myself using a lot of stl vector,valarray,string etc.is there any problem in using them in a dll?
-huus
|
|
|
|
|
None, I use STL quite a bit in ATL COM DLLs
"The greatest danger to humanity is humanity without an open mind." - Ian Mariano
http://www.ian-space.com/
|
|
|
|
|
There might be a problem if you are using VC 6.0 and you are declaring a std::map or std::set . That is because the STL implementation uses a static object in the XTREE header file. You need to update the XTREE header from the Dinkumware website. Details here[^]
Best regards,
Alexandru Savescu
|
|
|
|
|
how to include MFC in win32 Project?
hi there!
i needed to know how do i get to include MFC into a big and complex win32 application..i enabled mFC support but the linker throws a million lib files that are needed! where do i change the settings to include the lib files? I also included afxwin.h but then it said that an MFC application must not include windows.h so i removed it.. but then there are a million errors again..plz HELPPPP!
|
|
|
|
|
What exactly do you need from MFC to add to your App?
"The greatest danger to humanity is humanity without an open mind." - Ian Mariano
http://www.ian-space.com/
|
|
|
|
|
i want to include COleControl Class from MFC to replace a COleControl class from OLE 1.0..The thing is the files AfxCtrl.h , AfxWin.h cannot be included in the project..
hence BIGG probs..
plz do msg asap if u have a solution to this prob.
|
|
|
|
|
I suspect you are in hell. I don't see how you can easily do what you want. What you might try is create two console apps, and enable MFC in one ( I believe you can ). Do a diff of the two projects and see what has changed, and that might give you some ideas.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
welllll...
thanks a lot fellas!
ne better ideas????
|
|
|
|
|
Like I said, you are in hell.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Christian Graus wrote:
I suspect you are in hell. I don't see how you can easily do what you want. What you might try is create two console apps, and enable MFC in one ( I believe you can ). Do a diff of the two projects and see what has changed, and that might give you some ideas.
Playing games?
You cruel cruel man, but I like it.
|
|
|
|
|
A few hints :
- compiler options
use multithreaded run-time (/MD) (or /MDd if you are in Debug)
add the _AFXDLL compiler switch
- linker options
replace /subsystem:console with /subsystem:windows
- target type
open the .dsp file, and replace "(x86) Console Application 0x0103" with "(x86) Application 0x0101"
Back to real work : D-26.
|
|
|
|
|
|
I *was* using ostringstream as a member in a message construction class for a communication protocol. The app in question is a message format converter, that handles a few thousand messages per second on average and peaks can be in 10s of thousands per second.
The problem:
time_t t1, t2;
time(&t1);
for(unsigned long index = 0; index < 1000000; ++index)
{
ostringstream s;
}
time(&t2);
printf("%d\n", t2-t1);
takes 5 seconds to complete, ie, 5microseconds just to init the ostringstream.
Is there something that I am doing wrong?
Now, I replaced the ostringstream with a char buffer[MAX_SIZE] and is using sprintf and lstrcat instead. The CPU utilization at peak reduced from around 50% to 12 - 13%.
The times of ostringstream drops to 1 second for the above loop, if I use the Singlethreaded library instead of multithreaded.
I do not have a specific question, but I would guess that one should use stringstream very carefully in a very performance critical part of a multithreaded program.
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Exactly. I have no problems using standard C string because I am VERY VERY careful. When I want to be even EXTRA careful, I use vsnprintf which is overrun safe.
I use STL a lot. But when it comes to time critical, I am always going back to code written specifically for the job.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
I used sprintf, only because the largest message size is already known and anything larger than that is discarded.
modified 29-Aug-18 21:01pm.
|
|
|
|
|
I hate to agree with Tim on this ( hi, Tim ), but it's obvious that a generic solution such as ostringstream is simply not going to be optimised for the sort of heavy use you're asking of it. If it's only initialising, you can keep an ostringstream member and use str("") to clear it, but overall, 10,000 hits a second to me is time to go as low level as possible.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|