|
A) and in some cases, it is... And I at least know that a double is 8 bytes wide, thus is a 64-bit floating point type and not a integer value. And as you have demonstrated, your point also applies the other way.
You still have not identified where FLOAT64 is a MS typedef that is commonly used. I also did not notice it in my driver SDK and IFS SDK files. And even if it was in the IFS SDK, the Platform SDK is commonly available, but the IFS SDK is not (or at least was not), so common would not apply.
B) When you have a wide and deep coverage of a certain area, your thoughts on what is proper or not do matter. Note that they do not have to matter to you.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
FLOAT64 is not a MS typedef. It does not exist in VC++ v6.0 or v7.1 nor is it listed on any page in MSDN that I could find. There is a float64 defined but VC++ is case sensitive and this is the VC++ forum.
|
|
|
|
|
It is a Microsoft typedef, just not one you have seen, which is EXACTLY why I told you it IS a Microsoft typedef, and part of a very long MS header that you just don't happen to have on your machine.
Not everything used by MS is in the docs or on the web (or in your header files).
|
|
|
|
|
Yeah, I am fairly confident that MSDN and Google combined cover the area of "common" quite well.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Hi, I have a question
I want to update my table with values like this
CString valuestr="('"+m_comm+"','"+m_sp+"')";<br />
CString req="UPDATE T_Port SET CommPort='%s', Speed=' s'"+valuestr;<br />
database.ExecuteSQL(req);
And I have an error:
non valide use of '!','.',or'()' in expression "%S'('COM4','9600')'
|
|
|
|
|
zizzzz wrote: CString req="UPDATE T_Port SET CommPort='%s', Speed=' s'"+valuestr;
What is %s in your query? I do not believe that format specifiers are allowed in queries. You might be better off rewriting your query as :
CString req;
req.Format("UPDATE T_Port SET CommPort='%s', Speed='%s'", m_comm, m_sp);
database.Execute(req);
|
|
|
|
|
thank's a lot
|
|
|
|
|
zizzzz wrote: CString req="UPDATE T_Port SET CommPort='%s', Speed=' s'"+valuestr;
The %s would only be valid if you were using CString::Format() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
This is method is ripe for SQL injection attacks.
This will never work.
CString req="UPDATE T_Port SET CommPort='%s', Speed=' s'"+valuestr;
Try something like this.
CString req=_T("");
req.Format(_T("UPDATE T_Port SET CommPort='%s', Speed=' s'"), valuestr);
But first read this article about dealing with SQL injection attacks SQL Injection Attacks and Some Tips on How to Prevent Them[^]
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hello,
I have been using _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF) to check for memory leaks and a memory leak has been at arcex.cpp, Line 94. It appears to me that memory is allocated when an Archive Exception is thrown. If it is possible, how can I get rid of this memory leak? Suggestions or help are appreciated.
Mike
|
|
|
|
|
mla154 wrote: If it is possible, how can I get rid of this memory leak?
Catch the exception and delete the CArchiveException object?
|
|
|
|
|
Hi everyone,
does anyone use the MFC Components from BCGSoft?
If yes :
In my project i add 126 Columns to a grid, but i show only 11 ( rest of them are hidden )
But it takes a lot of time to refresh ( redraw ) the grid.
If i test the same project with only the visible columns ( so an entire only 11 columns in the grid ) ... the refresh is fast.
I see this effect also with a sliding DockingControlbar.
On the Grid with (entire) 11 Columns, it slides very fast.
And on the Grid with 126 Columns (115 hidden) it doesn't slide fast, nearly jerking.
Is it a bug or why does it happen?
Because in each case, the grid shows only 11 columns and must redraw these 11 columns ( not the 115 hiddens )
Big thanks
|
|
|
|
|
While I have used them for ~2 years now, and I do not have much compliants about them, the code is written like a MFC developer that just discovered all the wrong ways to abuse CString . As a result, much of the string-manipulation code is far from optimal, and if you profile the grid, I would bet that much of the time is spent messing around with string data during the drawing phases.
It also may have naive collection code as well.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Oha!
I'm coding in MFC since 3 months. But i see that the CBCGPGridCtrl is somethimes very slowly.
I re-use each time the existing rows/items. I load all the time new data from a database into it.
Thanks for your opinion
|
|
|
|
|
baerten wrote: I load all the time new data from a database into it.
Ouch! 126 Columns reloaded frequently & how many rows? Sounds like it might be time to rethink the design.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
No,
in the default case only 10-11 columns are displayed in the Grid. The others are hidden.
The User can choose another columns from out the column-chooser ( a part of the CBCG Component )
I think all columns, even the hidden ones will be refreshed each time ...
But where is the logic to refresh columns who aren't displayed ?
If it's really bad programmed, so i create my own ColumnChooser who adds only the "Columns to display".
So i'm sure that there are really only 10-11 columns refreshed
You use the BCGSoft Component ?
Thanks
|
|
|
|
|
From the sounds of it all of the columns where being refreshed. It would seem logical that that’s where you’re getting the performance hit at. No I have never worked with the aforementioned grid. When ever I have to design an application that displays data in a grid I’m very cautious about how often I’m fetching data & refreshing it to the user. Coarse in staff I create I’m often a user as well so I need to pay more attention
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hi friends,
I am writing a windows service which access a directory/file from N/W mapped drive from my system using API FindFirstFile().
Here if I run this service as normal exe from console. I am able to access the directory/file. But If I run it as a "service" it says "System can not find the path specified".
I tried running the service using
1) local accout
2) Administrator account.
But results are same. Please help.
|
|
|
|
|
My guess would be that the mapped (or subst -ed) drives are specific to the user account they were created under.
Perhaps some option to make the mapped drives part of the local system users' profiles? Dunno - just making a guess there...
You may be able to do it by using the UNC name instead of the drive mapping. For example, \\SomeMachine\SomeShare or \\SomeMachine\SomeShare\SomeDir\SomeSubDir may work because it does not involve a specific mapping.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I tried using UNC names. but it started giving me errors like
" Login failure: Unknown user name or bad password"
|
|
|
|
|
My guess is that the share requires authentication. My guess is that you will have to have the service authenticate itself either directly, or by impersonation.
See the NetUseAdd(...) function (and related functions) for details on how to use the API to get access to a share.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Dear All,
I want to change Dialogbox's title text by coding ?
How can i do this?
Kindly Help me.
Thanks.
|
|
|
|
|
Override OnInitDialog .
Call SetWindowText(_T("Changed Title")) there.
|
|
|
|
|
prasad_som wrote: Override OnInitDialog
not necessary there...
the OP might need to change the caption at any time (not only at the dialog's construction). basically, this->SetWindowText() may be called in any event handler of the dialog itself...
|
|
|
|
|
toxcct wrote: not necessary there...
But it is one way.
toxcct wrote: the OP might need to change the caption at any time (not only at the dialog's construction). basically, this->SetWindowText() may be called in any event handler of the dialog itself...
True.
|
|
|
|