|
Is there any limit, and how much is it?
Would it be practical to send a 100 fully qualified file names as arguments by the command line?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
sashoalm wrote: Is there any limit...
Yes.
sashoalm wrote: ...and how much is it?
I don't recall for sure, but 8K comes to mind. See here for more.
sashoalm wrote: Would it be practical to send a 100 fully qualified file names as arguments by the command line?
No. Perhaps writing those paths to a file that your program could then parse would be better.
"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
|
|
|
|
|
32K in windows XP + and MAX_PATH Windows 2000 and below.
Best Wishes,
-David Delaune
modified on Thursday, July 31, 2008 12:10 PM
|
|
|
|
|
But I've seen that explorer sends file names through the command line. When you drag files on the icon of an executable, the executable is started with the file names added to the command line. I've tested this on Windows 98 and XP.
I found out this while writing the response here. If the files are too much explorer failed to start the exe and an error message 'Access to the specified device, path or file is denied'.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
In your original post you stated that you needed to send the full path of around 100 files. We have 32767 bytes available.
Your limitation could be defined as:
<br />
100 * sizeof(wchar_t) * wcslen(szPath);<br />
Therefore if the average length of your path strings are greater than 164 wide characters it will fail.
because ((164 * 100) * 2) == 32800;
and 32800 > 32767
Best Wishes,
-David Delaune
|
|
|
|
|
Hi all,
I want to test that is my PDA supporting Arabic language? I wrote this code;
CString str;
for(int i = 1500;i<1800;i++)
{
str.Format(_T("%s %c"),str,i);
}
m_edit.SetWindowText(str);
But I know that %c does not get 2 bytes.So it is getting the first Byte of an unicode and does not display an Arabic letter if the OS is supporting it.How can I see an Arabic letter?
Thanks
|
|
|
|
|
You could try just creating an array of WCHARs and intializing it with numeric values.
<br />
WCHAR aTestString[10] = <br />
{<br />
1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 0000<br />
};<br />
<br />
m_edit.SetWindowText( aTestString );<br />
Not a way to test 300 characters but at least you should see whether it works without involving the comlpexities of printf formating.
I've implemented Arabic support on a WinCE application and it's far from simple partly because much of the Uniscribe API is unusably slow on a 200Mhz ARM processor.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
modified on Thursday, July 31, 2008 12:06 PM
|
|
|
|
|
You already had an answer to displaying an arabic char - assuming you have the fonts etc etc.
But I can't let the line
str.Format(_T("%s %c"),str,i);
be without jumping on it.
You are trying to put the contents of str into str? At best this will crash, at worst it will do very strange things...
If you are trying to add new characters to the end of your string, why not just do that? Or just build up a string yourself - it;s a fixed length.
A/
CString str;
for (wchar_t i = 1500; i < 1800; i++)
str += i;
B/
wchar_t buf [301];
for (wchar_t i = 0; i < 300; i++)
buf [i] = i + 1500;
buf [i] = 0;
The choice is yours.
Iain.
|
|
|
|
|
I have a dialog based application . It Executes a third party application and displays that application inside that Window. Now i want that third party application to be non-movable inside parent window . . What i am looking specifically is to disable mouse drag messages only on the child window (3rd party application).
S.K
|
|
|
|
|
Do you mean that this child window has a caption bar and you want to prevent it being dragged in this manner, or is it dragged by it's client area and you want to prevent this?
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
Hi!
I've to declare a function which is already defined in another class. I don't want to inherit from the existing class. The function is under a namespace in the first file. When I declare the function in the new class, I got the following errors:
d:\aicharactercontrol\testai.h(84) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\aicharactercontrol\testai.h(84) : error C2143: syntax error : missing ',' before '*'
I've declared the function in the public section only. How do I declare the function in the second class?
|
|
|
|
|
Given your company's policies it is quite difficult to help you. Please post an equivalent code snippet.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I've to declare a function which is already defined in another class. I don't want to inherit from the existing class. The function is under a namespace in the first file. When I declare the function in the new class, I got the following errors:
d:\character\test.h(84) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\character\test.h(84) : error C2143: syntax error : missing ',' before '*'
I've declared the function in the public section only. How do I declare the function in the second class?
|
|
|
|
|
He didn't ask you to repeat your question - he asked you for some actual CODE.
If you can't post the actual code, try recreating the problem with similar code - this is probably a good idea anyway. I'm guessing your code is more than 10 lines long anyway. And by recreating the problem, you may even see your own soloution.
If you only post the error message, it is very unlikely anyone can or will help you.
Iain.
|
|
|
|
|
The function I want to declare is inside a namespace. It's coded like this:
namespace dtAI
{
void AICharacter::GoToWaypoint(float dt, const Waypoint* pWaypoint)
{
mCharacter->RotateToPoint(pWaypoint->GetPosition(), dt * 3.0f);
mCharacter->SetSpeed(-float(mSpeed));
if(!mCharacter->IsAnimationPlaying("Run"))
{
mCharacter->ClearAllAnimations(0.5f);
mCharacter->PlayAnimation("Run");
}
}
}
This function is declared in the header file under public section as below :
void GoToWaypoint(float dt, const Waypoint* pWaypoint);
I've to declare the function in some other header file. I can comment the function in the first file. When I declare the function in the second file, I got the above mentioned errors. What to do?
|
|
|
|
|
OK, I'm not much clearer, as you haven't show all the places.
But to expand on Alan Balkany's answer to you, I've done a similar solution to the one he proposes (though I didn't know it had a name).
namespace Iain
{
class CIain
{
virtual BOOL DoSomethingExciting (char a, int b, void *p) = 0;
}
CIain *GetAnIainInterface ();
};
Now we have a pure virtual class and interface. Let's try and use it!
#include "Iain.h"
...
CIain *pIain = Iain::GetAnIainInterface ();
ASSERT(pIain);
pIain->DoSomethingExciting ('a', 97, NULL);
...
So far so good - but we need to actually implement it somewhere!
#include "Iain.h"
class CIainImpl : public Iain::CIain
{
....
virtual BOOL DoSomethingExciting (char a, int b, void *p)
{
return TRUE;
}
};
CIainImpl m_Iain;
Iain::GetAnIainInterface ()
{
return &m_Iain;
}
I hope that helps a little as an example!
Iain.
|
|
|
|
|
See here [^] (Iain expresses what I think even better than I'm able to ).
Probably the errors occurred have nothing to do with you requirement to include in a new class a method having the same name of some other class's method. This is the reason we're asking for the code. For sure we have no intention at all to copy it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Sorry Gentlemen! I told my company's policies only. I never think anybody will copy my code. I feel really sorry if I hurt anybody.
|
|
|
|
|
Don't worry. Just kidding. Anyway if you can post a simple sample code emulating your troubled one...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Here it is:
The function I want to declare is inside a namespace. It's coded like this:
namespace dtAI
{
void AICharacter::GoToWaypoint(float dt, const Waypoint* pWaypoint)
{
mCharacter->RotateToPoint(pWaypoint->GetPosition(), dt * 3.0f);
mCharacter->SetSpeed(-float(mSpeed));
if(!mCharacter->IsAnimationPlaying("Run"))
{
mCharacter->ClearAllAnimations(0.5f);
mCharacter->PlayAnimation("Run");
}
}
osg::Vec3 AICharacter::GetPosition() const
{
osg::Matrix mat = mCharacter->GetMatrixNode()->getMatrix();
osg::Vec3 pos(mat(3, 0), mat(3, 1), mat(3, 2));
return pos;
}
}
This function is declared in the header file under public section as below :
void GoToWaypoint(float dt, const Waypoint* pWaypoint);
I've to declare the function in some other header file. I can comment the function in the first file. When I declare the function in the second file, I got the above mentioned errors. What to do?
|
|
|
|
|
T.RATHA KRISHNAN wrote: void GoToWaypoint(float dt, const Waypoint* pWaypoint);
The above declaration doesn' correnspond to the definition, unless it is enclosed inside the same namespace(dtAI ) and class(AICharacter ).
What do you need to do? Declare another function with the same signature outside the namespace?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I've to declare the function in another file not only the signature but I need the functionalites also in the function that is to be declared by me in the second file.(I can comment the function inside the first file i.e included in the namespace).
|
|
|
|
|
Ahh, it was so much clearer the second time!
You might consider the Facade design pattern (http://en.wikipedia.org/wiki/Facade_pattern[^]) to give one class access to a single function another class, without coupling the classes together.
The basic idea is to declare an interface that defines the one function, and make the existing class derive from that interface. The class that uses this function sees an instance of the existing class as the interface -- not the whole class.
|
|
|
|
|
I import class from excel.exe in office 2003.
In the program, I use only basic operations to manipulate .xls files.
Will the program be compatible with .xls file create with other versions of Excel, for example Excel 2000 or 2007?
system
|
|
|
|
|
Excel 2007 has many changes i.e ribbon bar , but as far as just programming excel is concern , think a program with excel 2003 should work with excel 2007 .
Vikas Amin
My First Article on CP" Virtual Serail Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|