|
>> Would MFC still be a problem?
to do what exactly?
Most of MFC is GUI based Windows API wrapper classes.
"No matter where you go, there your are..." - Buckaoo Banzi
-pete
|
|
|
|
|
Ideally I'd like to use the Arrays Strings, Time, Maps, Sockets, etc.
Not really a whole lot of GUI stuff. I'm trying to keep that to a seperate app.
I just don't want to really resort to using old ansi c and I don't know how to use the iostream stuff and I'm looking for quick solutions for commadline parsing, ini files and so on but every example or open source that seems to be available depends on MFC becuase they use the CString class and other MFC types. That's my real reasoning behind the performance question. If it's that much of a performance hinder, then i'll resort to building the api's I need. I was just hoping that I could find stuff that didn't depend on MFC and I'm not having alot of luck. Kinda looking to not re-invent the wheel if you know what I mean.
Dan Willis
|
|
|
|
|
2Ghz = 2,000Mhz
2000Mhz / 50Mhz polling interval is only 40. That is only 40 clock ticks per polling interval. You won't be able to do much in 40 clock ticks and any IO interupt will kill your polling rate.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Dan, all of those class encapsulations aside from a Socket class is available in STL, i do developement all the time as you prescribed. I almost always choose a non-mfc path for them. The socket api's are the only complicated ones out of that group and even there it's pretty much confined to dealing with sock_addr and hostent structures and functions.
"No matter where you go, there your are..." - Buckaoo Banzi
-pete
|
|
|
|
|
Not if you use MFC effectively.
Having said that, you can do as many things wrong in MFC as in native Win32, and MFC doesn't encapsulate all of the Win32 functionality, that you might need.
a) A driver can't reduce the data rate; however, the driver has a guaranteed response time (which you don't have in user mode)
b) even a kernel driver should not _poll_ at 50MHz. What kind of hardware do you use? The acquisition hardware should be able to build packets (e.g. direct PCI bus->memory throughput, without CPU usage), and the driver can make this data available to user mode. Hoever, there is absolutely no guarantee that an applicaiton can always handle this amount of data (whatever it's doing)
c) What is your application supposed to do with the data?
If you go to war, you will destroy a great country a stoned greek chick to the richest man of the world
[sighist] | [Agile Programming] [doxygen]
|
|
|
|
|
Hello All. I've been working with dlls recently and i have some questions regarding the upgrading of dlls and how that affects programs that use them.
1) You have an exe and a dll. The exe uses the dll and does a static load of that dll. If you build a new dll that has additions to it's .h including new exported funcions, will the exe still be able to run with the new dll even if it is not rebuilt?
2) Same situation but you are loading the dll dynamically and getting the function pointers at run time. If you build a new dll with new exported stuff, will the exe still be able to use the dll even though the exe isn't rebuilt?
Thanks in advance!
Dan Willis
|
|
|
|
|
1) maybe not. certainly not safe
2) yes
"No matter where you go, there your are..." - Buckaoo Banzi
-pete
|
|
|
|
|
Now,
palbano wrote:
1) maybe not. certainly not safe
I'm assuming that the reason is when you rebuild the dll using the new header, regardless of what you have added (even if it was only a #define 5), there's no garauntee that the Function pointer map will be the same as when the exe was built against the dll. Am I right in this assumption? Becuase this is how I understood dlls to work if you link them statically.
palbano wrote:
2) yes
Dynamic linking on the other is void of this possible issue becuase you are getting the function pointer at run time. Am I correct in this assumption?
Again thanks! I look forward to hearing your input.
Dan Willis
|
|
|
|
|
>> that has additions to it's .h including new exported funcions
actually i was refering to that statement from your first post. Also if you use a DEF file you can order the functions so that could reduce the risk.
"No matter where you go, there your are..." - Buckaoo Banzi
-pete
|
|
|
|
|
Right. That makes sense. Thanks alot! I really appreciate it. Learn something new everyday!
Dan Willis
|
|
|
|
|
Hi everybody!!!
Explain in what a difference of the next lines of a code on Win95:
1.
CRgn m_rgn1;
CRgn m_rgn2;
{
m_rgn1.DeleteObject();
m_rgn2.DeleteObject();
CRgn rgn;
rgn.CreateRectRgn (0, 0, 1, 1);
...
rgn.CopyRgn(*m_rgnToolTip);
...
rgn.CombineRgn (*rgn, *m_rgn2, RGN_OR);
SetWindowRgn (HRGN(rgn), FALSE);
rgn.DeleteObject ();
}
2.
CRgn m_rgn1;
CRgn m_rgn2;
{
m_rgn1.DeleteObject();
m_rgn2.DeleteObject();
CRgn rgn;
rgn.CreateRectRgn (0, 0, 1, 1);
...
rgn.CopyRgn(*m_rgnToolTip);
...
rgn.CombineRgn (*rgn, *m_rgn2, RGN_OR);
HRGN hRgn = CreateRectRgn(0, 0, 1, 1);
::CombineRgn(hRgn, (HRGN)rgn.GetSafeHandle(), NULL, RGN_COPY);
SetWindowRgn(hRgn, FALSE);
rgn.DeleteObject ();
}
Why on Win95 the first variant was fail
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Came across the following:
typedef double (*COMPLEX_ARRAY)[2];
What does this do??
Thanks for any help you might give me,
Pankaj
Without struggle, there is no progress
|
|
|
|
|
pankajdaga wrote:
What does this do??
Confuse people, that's probably its main objective.
It's actually just a declaration for a pointer-to-a-two-dimensional-array-of-doubles-where-the-second-dimension-must-be-2.
So you can do this:
COMPLEX_ARRAY ca = NULL;
ca = new double[10][2];
delete [] ca;
double xyz[5][2];
ca = xyz;
ca[0][0] = 4.6;
ca[0][1] = 20.67;
Regards,
Alvaro
The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing. -- Albert Einstein
|
|
|
|
|
Ahhhhhh... I see. I knew it was like that. The syntax just confused the hell out of me. Thanks for the explanation! I wonder why people code like that!
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Multi-dimensional arrays in C/C++ make C strings look like the greatest thing since sliced bread.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hi. Im thinking of using crystal reports in my companys applications but im not sure how the licensing works.
The main question is: if i dont require the clients aplication to have a report designer, only print preview, printing and exporting, which license must i purchase?
I dont think i need the "Crystal Reports 9 Report Creation API Named User License, English", cause it includes the designer "...in order to integrate end user report creation capabilities into thick-client desktop applications.".
But i havent found another licensing program for my case.
Anyone with experience in this can help me?
|
|
|
|
|
Miguel Lopes wrote:
Anyone with experience in this can help me?
When I used Crystal 8.5 we had to make sure that we had a license for each client even though all they were doing was viewing the report (ad-hoc). We looked into using them for reporting over the web; however we decided to go with Data Dynamics because they have a royalty-free report designer. Besides, Crystal Reports over the web is way too expense, call them and they will quote you a price.
Nick Parker
The only man who never makes a mistake is the man who never does anything. - Theodore Roosevelt
|
|
|
|
|
Hi. Thanks for the quick answer.
I started looking at Data Dynamics for their "Active Reports" products, but it seems it only works with VB! Im a VC++ programmer and im in a middle of a vc++ software development, so vb is not an option.
On the other hand, it has an activeX version... can i access it easely through vc++?
|
|
|
|
|
Miguel Lopes wrote:
On the other hand, it has an activeX version... can i access it easely through vc++?
With version 8.5 you most certainly can, you used to be able to download a free trial version which actually came with samples in the different languages, I remember it had samples for both VB and VC++. Check them out, they really have a nice product, but so does Crystal. I think it really depends on how much you are willing to pay. I haven't found anything that I couldn't do with Active Reports that I could with Crystal.
-Nick
|
|
|
|
|
You were right! Active Reports is really an excellent product! Ive read most of their documentation and it fits really well! Now im stuck cause i dont find VC++ samples and especially cause i dont know how can i get the required DLL's to make a test application so we can decide to buy it or not.
Can u give me some links or hints?
Thanks for the help in general!
|
|
|
|
|
Miguel Lopes wrote:
Can u give me some links or hints?
Try Product Downloads[^], select ActiveReports 2.0 Pro unless you need to get the .NET version. I believe that it comes packed with samples. Let me know.
-Nick Parker
|
|
|
|
|
Thanks for the quick answer! Since my last msg, i already started to use the product downloads and right now i already have a vc++ working app with the activeX. Now i only need to learn the API
Thanks for the help! Now im on track. Ill have it incorporated in our apps within a week!
|
|
|
|
|
Glad to help.
-Nick Parker
|
|
|
|
|
I have a window which contains a bunch of checkboxes and buttons. They need to be created dynamically based on the output of a parsed configuration file. The controls will, after creation, have their font set to DEFAULT_GUI_FONT. Given that the labels in the controls are arbitrary, I need a way to determine the necessary size of the buttons. It must be pretty close to minimum size to give proper visual layout: it would be bad aesthetics to leave a bunch of excess margin on the right to account for potentially longer labels than anticipated. Same goes for the height, I don't want excess margin between the buttons. Keeping the right and between margins to a minimum will minimize the wasted screen real estate as well, which is fairly critical for this application. So how does one determine the necessary size? I could just get the text extents from the font, but then I'd have to hardcode the added sizes like the label-to-frame margin within the buttons and size of the non-label portion of a checkbox, but that seems kludgy. Is there an API to, after setting the font of a control, tell it to resize itself to the proper minimum dimensions? I can't find one but hope it's buried in there somewhere....
Thanks in advance,
Brian Tietz
|
|
|
|
|
I think you have to do it the hard way... and it doesnt seem so difficult...
May the SOURCE be with you
|
|
|
|