|
There are some examples of multi-language applications on CP... just have a look at them.
Don't try it, just do it!
|
|
|
|
|
lynchspawn wrote:
It sounds like a real nightmare.
Indeed.
lynchspawn wrote:
Are there better ways to go about this?
Yes. It involves changes to the project's .rc file. Search MSDN for internationalization articles.
I realize you couldn't do this, but for my company's product, we create the initial DLL in English and then ship the DLL's source code to IBM for translation. They take that and create a DLL for each additional language. The customer then only gets the DLL for their locale.
lynchspawn wrote:
Also - how to people deal with the text field lengths (static boxes, group boxes, buttons, ...) when the translations end up needing more space?
I increase their width by 65%. They might be a little too wide but that's better than being any too narrow.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thank you very much for the replies. I will try to convince our marketing dept. that using a text file may not be the best way to go. Actually, I have to convince them - I'm a dead man if I can't .
|
|
|
|
|
If it's a one-time endeavor, or a small-scale application, a text-file solution is not that bad. However, I would first try and convince them top do it right. Be prepared and bring lots of ammunition (e.g., references, examples) to the table.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
hi..
my project about fire all.. we made packet filtring we fineshed it
i wan t to make ""Stateful Inspection Firewall"" .. i got some describtions on som eweb pages but not enough if any one can help me to send me any thing can help how it wark haow can i implement it will be thanka very much..
thanks,
note: i want implement it by vc++.
|
|
|
|
|
This[^] might help.
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
thanks alot for helping me..
|
|
|
|
|
Am i understanding this correctly?
We use a Node to represent the very first first tag in the document. After that we use elements for all subsequent tags. Is this correct?
If so, i understand how to add set attributes for elements but i do not see how to set attrabutes for Nodes. I am trying to set some attributes for my very first node in the document.
Thanks
|
|
|
|
|
Hi,
First I'll make a correction to your concept that very first in XML document is a node.
Actually, node is a generic concept in XML DOC. Every thing including attribute, element, and document itself is a node. From implementation perspective if you study the documentation of XML Document object Model of Microsoft, you will find that a NODE actually is base class(interface) for every other xml construct e.g. element, attrubute, document.
Now you want to set attribute of a node, so in C++ you will do the following;
IXMLDOMNode* pNode;
// Set pNode to a valid reference of some node
// Now cast it to IXMLDOMElement
IXMLDOMElement* pElement;
pNode->QueryInterface(IID_IXMLDOMElement, (void**)&pElement);
// Now you can use "pElement" to add an attribte
Regards
Adeel Saqib
|
|
|
|
|
Wow, thanks... I was not aware before of how the QueryInterface was used... but this makes sense.
So if i have multiple elements, would i have to do this for each one?
|
|
|
|
|
Hi,
Thanx for appreciation, first I will make correction to first sentence of my last message. It is "every thing(construct) e.g. element, comment, attribute, and document itself is a node". I am sorry for that.
Now come to your question, yes you have to do the same thing for all elements, but if you have elements of the same name then you can do it like this.
CComPtr<ixmldomdocument> pDoc;
CComPtr<ixmldomnodelist> pNodeList;
long nCount;
pDoc->getElementsByTagName(_bstr_t(_T("element_name")), &pNodeList);
pNodeList->get_length(&nCount);
for (long i = 0; i < nCount; i++)
{
CComPtr<ixmldomnode> pNode;
CComPtr<ixmldomelement> pElement;
pNodeList->get_item(_variant_t(i), &pNode);
pNode->QueryInterface(IID_IXMLDOMElement, (void*)&pElement);
// Do your own struff for this particular element
}
Regards,
Adeel Saqib
|
|
|
|
|
i wrote this code about the Matrix project here is a part of the code to input the matrix or a vector with a dynamic allocation:
double*vector ; int num ;
cout<<"enter the size of the vector"<<\n;
cin>>num;
vector=new double[num];
for(i=0;i{
cout<<"enter the element"<<i+1<<"in the="" vector"<<\n;
cin="">>*(vector+i)
}
this for input the vector but for input the matrix i made it in another function:
double*grade ; double**matrix ; int row ; int col;
cout<<"enter the number of rows then coloumns in the matrix"<<\n;
cin>>row>>col;
double**matrix=new double*[row];
for(int j=0;j{
matrix[j]=new double[col]
for(int k=0; k{
for( int l=0; l{
cout<<"enter the element"<<l+1<<"in the="" row"<<k+1<<\n;
cin="">>*(grade[k]+l)
}}}
iwant to ask of there is any missing in the followin part of the code
so may you answer these previous questions?
& is this pretag right?
|
|
|
|
|
kosamoza wrote:
is this pretag right?
No, the <pre> and </pre> tags need to surround the code. Before posting, click the Preview button.
See here for an example of a multi-dimensional array.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
hiho@ll
i'm working on a browser helper object and i need to change the http header before a website is called
the problem is how can i change the header?
i tried using the BeforeNavigate function but the customizations are not made by IE (for testing i tried to change the URL, but it was ignored)
so i thingk BeforeNavigate is only for control, if you want to request the url or not (return value true or false)
anybody knows a function or way how to change the http header before it get send by IE?
thx@ll
|
|
|
|
|
NOBODY knows an answer?
can't believe!
ok i have another problem now:
the problem is that DISPID_BEFORENAVIGATE2 doesn't work for that! i get only http headers sent to navigate method (which are not the real headers sent to the server (or not all headers!))
www.debugbar.com is a IE toolbar which can grab the http headers! this means it's possible
the problem i have is that i have to change the http header depending on the header which should be sent an the url to which it should be sent
does anybody know a method how to grab a http header?
maybe i have to code something to grab it from the network interface?
thx@ll
|
|
|
|
|
Hi All
I have written an uninstall program to compliment an install program I have produced. However, how do you get around the problem of removing the uninstall program? It won't delete itself when running. How is uninstall usually done?
I do note that my current install program does not inform the Windows Add/Remove Programs utility - which means I can't use that. It does use the registry but what settings are needed to use the Windows Add/Remove utility?
Is there a way of informing Windows of the program so that I can use the Add/Remove functionality?
Many thanks
u6ik
|
|
|
|
|
u6ik wrote:
However, how do you get around the problem of removing the uninstall program? It won't delete itself when running.
One way is with MoveFileEx(..., MOVEFILE_DELAY_UNTIL_REBOOT) . If you need this functionality on Windows 95, you'll need to use the wininit.ini file. See here for more.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Outstanding.
Cheers Dave.
u6ik
|
|
|
|
|
You can use a .cmd file for it... There is a tutorial about that... but I don't remember where I found it... try google.
Don't try it, just do it!
|
|
|
|
|
Hi there,
I have a dialog box (derived from CDialog), which contains an edit control.
I want to handle the esc and enter keys at the message handler of the edit control, but the esc and enter messages are being translated by accelerators and the whole dialog box closes.
How can I make the keys handled by the edit control?
Thanks for advice,
Alex
Don't try it, just do it!
|
|
|
|
|
Alexander M. wrote:
...but the esc and enter messages are being translated by accelerators and the whole dialog box closes.
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
the best way is to derive a class from CEdit and handle WM_CHAR. there you can do whatever you want in response to VK_RETURN, VK_ESCAPE. also make sure that in your dialog you have handlers for OK and Cancel. In those handlers comment the part with the call of the base class:
void CBDlg::OnOK()
{
// TODO: Add extra validation here
//CDialog::OnOK();
}
Now your dialog will not exit when you press enter.
same for OnCancel..
PS: Stay away from PreTranslate... as it's design is not for this kind of use.
|
|
|
|
|
Yeah the dialog does not exit... but the CEdit does not receive a WM_CHAR message... I've already tried this, but without success.
I will check PreTranslateMessage... lets see what is possible...
Don't try it, just do it!
|
|
|
|
|
What you need to do is handle the WM_ONGETDLGCODE message for your edit control class. This message tells the dialog box procedure what keys to process for your control and which to skip.
For example:
UINT CMyEdit:OnGetDlgCode()
{
return( CEdit::OnGetDlgCode() | DLGC_WANTALLKEYS );
}
Then process in OnChar as normal.
|
|
|
|
|
Perfect answer, that was exactly what I wanted to know... thank you very much!!!
Don't try it, just do it!
|
|
|
|