|
just a guess (stupid guess probably) : do you have to source of that analysis lib ?
|
|
|
|
|
Nope. Only the library object file.
Jijo raj suggested using _fpclass so I'm giving that a go.
'til next we type...
HAVE FUN!! -- Jesse
|
|
|
|
|
How can I block users from printing if they exceed their maximum number of printed pages?
Any ideas?
Thank you.
|
|
|
|
|
Are you creating the device driver, or are you somehow intercepting data sent to the device driver?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
I am going to start an application and I would like to make it multilanguage. I have been checking different methodes. In MSDN I found an article that explains how to do it through DLLs, I have seen other software that makes it with INI files and a developer in my firm told me about other option. Just for the menus would be enough with ini (or even with 3 different menus chanching them dinamically), but I want to translate messagebox contents, error messages and help files as well.
Have you already made something like that? Which is the best way to do it?
The application is going to have between 150 and 200 error messages, about 40 menu entries and I would like to make it in 3 or 4 languages (more if I get help with the translations).
I am not asking for code, just for opinions, tips or a bit orientation. I am still searching for info and making tiny tests, but if you know a good place with documentation any link will be wellcome.
P.S. it will probably made with VC++ 6.0 (MFC or APIs don't sure yet)
ADDED: Starting languages are going to be european/american "compatible" languages, maybe in the future other languages come. Is it difficult to change from "normal" to unicode? Or better start with Unicode or other supports to other languages?
Thanks
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
modified on Wednesday, June 4, 2008 2:00 PM
|
|
|
|
|
Put your application in UNICODE ( google and research a little on the topic) to support most/all scripts.
As for the technical aspect, your best bet is to use a resource DLL, one for each language, that you load when the application starts.
Depending on the size of your application, it could be useful to use a 3rd party "helper" application to manage your translations.
We currently use appTranslator[^] to generate a french and english versions of our software, it works fine; keeps track of the translations during the development of our product (i.e. will show what changed and what needs to be translated)
It also helps with reformatting UI to fit the new language, for example, in french, some terms and words take a different amount of space, so the UI needs to be tweak to fit the text.
We did not test it against non-European languages or scripts (asian, arabic or hebrew, ... ) so I cannot comment on how it works for them.
This signature was proudly tested on animals.
|
|
|
|
|
Thanks for the link and for the advices. I will check the translator you recommend.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I have been checking the web you told me, the program is quite amazing. I have found only one problem.
quote:
The Standard Edition contains all the features described here except for the 'Export to Translator Edition' and 'Import from Translator Edition' functions, which are included in the Professional Edition only.
quote:
This demo version is (almost) fully functional (no time limit). However, some text items in the translated files built using this demo are scrambled to prevent production use.
I have taken a look into prices... for a firm is ok, but for me... quite expensive
I guess I will have to do it on the old way
Anyways... thanks for the info.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Nelek wrote: I am not asking for code, just for opinions, tips or a bit orientation. I am still searching for info and making tiny tests, but if you know a good place with documentation any link will be wellcome.
Find a copy of this book[^]. It can save you a lot of headaches down the road
|
|
|
|
|
i was trying to figure out why my code tried to open the wrong files and after some debugging it turned out to be because of these two lines:
...
::strncpy(buffer, folder, sizeof(buffer));
::PathRemoveFileSpec(buffer);
...
buffer here was "C:\Documents and Settings\Administrator\My Documents" before and "C:\Documents and Settings\Administrator" after, even though it should remove the trailing file name only if it really is a file.
the msdn documentation for the function (at http://msdn.microsoft.com/en-us/library/bb773748(VS.85).aspx[^]) doesn't mention that as far as i could see
|
|
|
|
|
That kinda makes sense, if you think about it. If the function does not actually check to see if the filepath is valid, it has no idea if the path:
C:\Documents and Settings\Administrator\My Documents - refers to a directory, or to a file called "My Documents".
Not that I would expect it to work that way, but it makes sense if the function is "dumb".
Also, using sizeof(buffer) in that manner is unsafe - it will not work as expected on Unicode builds (although neither would strncpy as opposed to _tcsncpy ), and it may leave the resulting string in buffer without a NUL -terminator if the contents of folder are too long.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> 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! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
sashoalm wrote: ...even though it should remove the trailing file name only if it really is a file.
Says who?
Why not call PathIsDirectory() before calling PathRemoveFileSpec() ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I am sure this behaviour is "by design". Finding out if a path refers to a file or a directory is "very" expensive as it requires at least one and probably multiple disk reads. Simply scanning the string and stripping off the text after the final directory separator is likely to be 100's of times faster.
|
|
|
|
|
Hi All,
I have an old vc++ application which was running perfectly fine on Win NT and Win XP. (I use VC++ 7 to build it)
Now i am running it on Vista.
While opening one perticular view it throws an unhandelled exception and simply dies.
After debugging I found that the exception is being thrown when i try to add buttons to my dynamic tool bar.
The code structure is :
There is a CDynamicToolBar derived from CToolBar
class CDynamicToolBar : public CToolBar
When I need to instantiates the dynamic tool bar i do something like this
m_wndToolBar = new CDynamicToolBar ()
if (!m_wndToolBar->CreateEx(this))
{
m_wndToolBar->Load();
Its in the Load() ,where I add the buttons array
I am getting the exception in Vista while there is no problem in XP
GetToolBarCtrl().AddButtons(iButtonCount+iSeptratorCount, pAToolBarButton);
I have tried removing the code related to the tool bar and running the view without it on Vista.
It gives no problem at all (except,i don't get the toolbar of course)
I am completely at loss here...
Anyone with ideas /suggestion/ solutions
only dead fish swim with the stream
|
|
|
|
|
what! no replies!
Anyway the problem is solved.
in the line
GetToolBarCtrl().AddButtons(iButtonCount+iSeptratorCount, pAToolBarButton);
pAToolBarButton is an array of TBBUTTON structure where each structure represents a button on the tool bar.
It seems that each field in TBBUTTON structure must be properly initialized in Vista. Well this is a good programming practice anyway.
But in case you have left the less used fields like TBBUTTON.dwValue uninitialized, it would ignored when you application runs on XP.
Where as in Vista you get an exception when you try to add the buttons to your toolbar control.
only dead fish swim with the stream
|
|
|
|
|
Can any one of you help me how to implement a MD5 algorithm in C++
Thanks
Nandu
|
|
|
|
|
Surely you jest:
I could do this if I only had a search engine
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
RFC-1321 describes the MD5 steps and includes the original reference implmentation.
http://www.rfc.net/rfc1321.html[^]
I assume you want to do this for educational purposes. Otherwise it would be better to use Microsoft cryptographic service providers.
Best Wishes,
-David Delaune
|
|
|
|
|
Thanks for your prompt reply.
-Nandu
|
|
|
|
|
|
With the above link i am able to ecoding, but can any help me to decoding it.
Thanks
-Nandu
|
|
|
|
|
Nandu_77b wrote: any help me to decoding it
MD5 is a hash, it only goes from plain-text to hashed data. It does not go the other way. If you want to go back and forth, you need to look at cryptography, not hashing.
Judy
|
|
|
|
|
HI
Any can help me, to get the users home directory in windows. Is there any win32 API avilable for it?
Home directory means ::C:\Documents and Settings\<userid>
Please help with possible ways to get this thro program.
Thanks,
Nandu
|
|
|
|
|
Home dir:C:\Documents and Settings\userid
|
|
|
|
|