|
Well, start here for some info that might be useful regarding character sets:
http://www.joelonsoftware.com/articles/Unicode.html[^]
In fact, IIRC JoS has a few articles that deal with developing for multiple langauges.
As long as you write your software with internationalization in mind (sometimes referred to as "i10n" or "i18n" - try googling those terms), you shouldn't need to worry about the specific fonts - as users in different languages will have the appropriate (unicode) font set themselves anyway!
I don't know of any developer that internationalizes their software in a manner that requires a new font being used instead of the systems default fonts.
HTH.
[EDIT] Just a thought - this still applies, even when the base operating system is set as English - at least on 2000/XP, as I seem to recall it's poosible to have multiple language bases installed. [/EDIT]
--
Ian Darling
"The moral of the story is that with a contrived example, you can prove anything." - Joel Spolsky
|
|
|
|
|
Ian Darling wrote:
sometimes referred to as "i10n" or "i18n"
Internationalisation is always 'i18n' - there are 18 characters between the leading i and the trailing n. Internationalisation normally refers to the process of stripping out any language- or culture-dependent behaviour from the application, using the user's preferred language and culture.
l10n (not i10n) is Localisation (again, 10 characters between l and n), the process of taking an internationalised application and creating the appropriate resources to adapt it for a particular culture.
I seem to recall it's poosible to have multiple language bases installed.
What, you mean the Multilingual User Interface[^]?
Microsoft's Global Development Portal[^] is a good start for anyone needing to write an international application.
|
|
|
|
|
Mike Dimmick wrote:
Internationalisation is always 'i18n' - there are 18 characters between the leading i and the trailing n.
Mike Dimmick wrote:
l10n (not i10n) is Localisation (again, 10 characters between l and n),
I must have misread the 'l' in l10n as 'i' - I thought that the 18 and 10 might have had something to do with the number of languages being translated, 18 being a bigger and more complex job because you would include arabic, hebrew, japanese and chinese scripts, on top of a load of mostly straightforward left-to-right european dialects (being the original 10).
Learn something new every day
--
Ian Darling
"The moral of the story is that with a contrived example, you can prove anything." - Joel Spolsky
|
|
|
|
|
I posted this twice earlier, no responses. They got buried in a few pages of messages.
I have classes car, street, building and static world. The car, street, and building are created and modified and "exist" in the world object. Here is my post (after posting a question about how to create global class objects):
I declared a global static class world, and it was indeed available to all objects. Thank you for the advice. Eventually I'll do the singleton method. The only problem now is, for some reason, objects are incapable of modifying public attributes or calling public methods of the global class.
Lets go back to my example. Before I had the global class, when constructing a "building" object, I had to pass it the myworld object constructor. The constructor would initialize certain variables, and call some initializing member functions. It would also call a member function of the myworld object, that would essentially(on the myworld object side) just increment the building count attribute of the world class. Before and after building object construction, I cout'ed myworld object's building count. It didnt change.
Now, with the static global object myworld, the results are the same. Myworld just refuses to change. Building has been made a friend class to the world class. In fact, nothing is private in the world class.
Just to check my coding, I called world class member functions and modified building counts directly from the main function, and it worked. It just doesnt seem to want to be modified by another object.
Any ideas?
|
|
|
|
|
I suspect the reason no one has responded is that your problem is clearly not where you think it is. The situation you are describing isn't the case, a public method on a static object that you've tested from main can certainly be called and work from a member of some other class.
The real problem is something you haven't mentioned in your question, because you don't know about it. It's pretty much impossible to guess what that might be given your description.
Try boiling it down, come up with the smallest set of code that exhibits the problem that's plaguing you. Sounds like you should be able to express it in 10 lines of code or less. Don't use your existing code, cut it down to just an example of the problem - two classes, one static and one not.
Once you've done that, if you haven't already spotted the problem, post the code and I'm sure someone will help you.
--
-Blake (com/bcdev/blake)
|
|
|
|
|
Hello, everyone!
I want to get all the handles of opened msword windows on the local machine. And then send message to close them. I have no experience on FindWindow function before and the two parameters of this API make me puzzled. Are there some sample codes that I can make a reference?
BTW: Can I get the how long a specified window have been opened?
I am using VC++ 6.0.
Thanks in advance,
Geo
|
|
|
|
|
|
Thanks, Anthony_Yio buddy!
I will take some time to see the source codes of this project.
regards,
Geo
|
|
|
|
|
Is there a way to write up a littl C code in .NET or V6 and be able to look at the assembly code that it produced after it compiled?
|
|
|
|
|
Easy -- set a breakpoint at the beginning of the code you want to view the assembly for, execute the program in debug mode, then when the breakpoint is triggered, right-click on the statement and select "Go To Disassembly". (This is for VS.NET 2K3).
- Mike
|
|
|
|
|
Michael's answer works fine. Alternatively, add the /Fa switch when you compile and .asm files will be generated that you can browse through with your favorite editor. I often find this more convenient.
--
-Blake (com/bcdev/blake)
|
|
|
|
|
I have a related question, I still haven't gotten around to using managed C++ code so I still no next to nothing about dotnet aside from it's java like qualities,
but i do know some assembly from reading books and so forth.
What format is .NET IL assembly in? is it MASM assembly, or a new type of assembly with different macros+syntax or what?
|
|
|
|
|
At a basic layout level IL syntax looks somewhat like other assembly syntax in that it is line based, has directives that start with a dot, labels at the left, then a short opcode, then arguments, typically rendered in aligned columns.
From there is goes on to completely unlike MASM (or any other physical machine assembly) in that the opcodes are stack based, strongly typed, and at a much higher level of abstraction than even CISC assembly. No macros or the like as ILASM is not designed to be written by humans so there's no purpose for such things.
--
-Blake (com/bcdev/blake)
|
|
|
|
|
Here is the whole code: I should of put it out here to begin with on my previous forum. I tends to generate an error c2783 on the find_index() call in the insert funtion. Is it the way I am sending the struct in the main to the insert fucntion? I don't know. Very frustrated with this.
I put void main() on the bottom of this page.
Thanks for the help.
#ifndef TABLE1_H
#define TABLE1_1
#include <cstdlib>
#include <cassert>
const size_t CAPACITY = 811;
int NEVER_USED = -1;
int PREVIOUSLY_USED = -2;
struct tractor
{
int key;
};
template<class recordType>
class table
{
//MEMBER CONSTANTS
private:
//MEMBER VARIABLES
recordType data[CAPACITY];
size_t used;
//HELPER FUNCTIONS
template<class recordType>
size_t hash(const recordType key) const
{
return (key % CAPACITY);
}
size_t next_index(size_t index) const
{
if((index+1)==CAPACITY)
return ((index + 1) % CAPACITY);
}
template<class recordType>
void find_index(int key, bool &found, std::size_t &index) const
{
size_t count; //number of entries that have been examined
count = 0;
i=hash(key);
while((count<CAPACITY) && (!never_used(i)) && (data[i].key != key))
{
++count;
i = next_index(i);
}
found = (data[i].key == key);
}
bool never_used(size_t index) const;
bool is_vacant(size_t index) const;
public:
//CONSTRUCTOR
table()
{
size_t i;
used = 0;
for(i=0; i<CAPACITY; ++i)
data[i].key = NEVER_USED;
}
//MODIFICATION MEMBER FUNCTIONS
void insert(recordType &entry)
{
bool already_present;
size_t index;
assert(entry.key >= 0);
//SET INDEX SO THAT DATA[INDEX] IS THE SPOT TO PLACE THE NEW ENTRY
find_index(entry.key,already_present,index);
//IF THE KEY WASN'T ALREADY THERE, THEN FIND THE LOCATION FOR THE NEW ENTRY.
if(!already_present)
{
assert(size() < CAPACITY);
index = hash(entry);
while(!is_vacant(index))
index = next_index(index);
++used;
}
data[index] = entry;
}
/*template<class recordType>*/
void remove(int key)
{
bool found;
std::size_t index; //SPOT WHERE DATA[INDEX].KEY==KEY
assert(key >= 0);
find_index(key,found,index);
if(found)
{
//THE KEY WAS FOUND SO REMOVE THIS RECORD AND REDUCE USED BY 1
data[index].key = PREVIOUSLY_USED; //INDICATES A SPOT THATS NO LONGER IN USE
--used;
}
}
//CONSTANT MEMBER FUNCTIONS
/*template<class recordType>*/
bool is_present(int key) const
{
bool found;
std::size_t index;
assert(key>=0);
find_index(key,found,index);
return found;
}
/* template<recordType>*/
void find(int key, bool &found, recordType &result) const
{
std::size_t index;
assert(key>=0);
find_index(key,found,index);
if(found)
result = data[index];
}
size_t size() const
{
return used;
}
};
#endif
void main()
{
table<tractor> tr;
tractor t;
t.key=28;
tr.insert(t);
}
|
|
|
|
|
Just a guess, based on the error code -- when you call find_index , you need to specify the template argument, e.g.: find_index<tractor>( ... ) .
In many cases, the compiler will attempt to deduce the template argument based on the types of data you pass to it, but it can't in this case.
- Mike
|
|
|
|
|
Hi,
I am newbee to VC++. I am basically C,C#,VB,VB.Net Programmer.
can anybody please let me know how to resize and reposition all the controls in the dialog in a dialog based applicaiton. actually I added a toobar, statusbar,treeview,listview and few buttons to the dialog. I want to resize and reposition the controls whenever user resizes the dialog window or maximize the dialog window. can anybody please give an idea to proceed or a sample to proceed ?
thanking you
Praveen
|
|
|
|
|
|
I have a problem and need somebody to show me the light.
I am trying to pass a struct through a template class called table. I keep generating an error of c2783 and cant for the life of me figure out why or what is wrong. The code is directly from a text book. Here is the code that is generating that error.
template<class recordType>
class table
{
table()
{
size_t i;
used = 0;
for(i=0; i<CAPACITY; ++i)
data[i].key = NEVER_USED;
}
//MODIFICATION MEMBER FUNCTIONS
template<class recordType>
void insert(const recordType &entry)
{
bool already_present;
size_t index;
assert(entry.key >= 0);
//SET INDEX SO THAT DATA[INDEX] IS THE SPOT TO PLACE THE NEW ENTRY
find_index(&entry.key,already_present,index);
//IF THE KEY WASN'T ALREADY THERE, THEN FIND THE LOCATION FOR THE NEW ENTRY.
if(!already_present)
{
assert(size() < CAPACITY);
index = hash(entry.key);
while(!is_vacant(index))
index = next_index(index);
++used;
}
data[index] = entry;
}
};
struct tractor
{
int key;
};
void main()
{
table<tractor> ta;
tractor t;
t.key=44;
ta.insert(t);
}
|
|
|
|
|
Well, you didn't say where the error is happening, so I can only guess:
<s>template<class recordType></s>
void insert(const recordType &entry) Take out the redundant template there, you only need that if the method has different template params than the class that it's in.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Actual sign at the laundromat I go to: "No tinting or dying."
|
|
|
|
|
sorry about not being more specific, but it seems to not like the way I am sending the parameter in the void main(). I will try your method and see what happends. thanks.
Also when I double-click on the error, it goes directly to the find_index() call in the insert function.
Such as: see the comment below.
void main()
{
table<tractor> ta;
tractor t;
t.key=44;
ta.insert(t);
}
|
|
|
|
|
In searching Google, I actually found code very similar to this except they pass entry.key by value instead of taking address:
<br />
find_index(entry.key,already_present,index);<br />
You probably just made a typo.
|
|
|
|
|
no, I got this choppy code out of my text book and you are right, it is entry.key but I have tried it that way and several different ways and it still fails to compile.
|
|
|
|
|
Please help me to list requirements and resources to create a windows application that have DHTML GUI like Windows Explorer ... with VC 6.0 ?
----------------------
Coding for lv,lv & di
|
|
|
|
|
Hi!
There is a DHTML editing control distributed with Windows Explorer. Check it out it might be useful. Or you can use the Internet Navigator control distributed with Windows Explorer.
Do you want to make your internet navigator or just use some functions in an application?
Well... I am a beginner ...
|
|
|
|
|
Hi,
My project has 4 dialogues.I inserted a tab ctrl and set its style as Popup style and border as dialogue frame .I set my dialogs as Child and Border None.
The proj worked fine earlier without tab.after insertinon of the tab ctrl it just hangs.There is no error in it.
If i set the dialogues style back to popup and border to dialogue frame then it works without my tab dialogue showing up.
Can anyone suggest me where i'm wrong?
Thanks
|
|
|
|