|
Joan Murt wrote: I need to show special characters from that special character set
By "special character set" do you mean "font"? If so, then simply select the font by calling SetFont() on the static control.
|
|
|
|
|
Hello Hans,
I do not mean that, I use the character set of the Spanish language, and I want to use special characters like AE (a letter that has the A and E joined) and other ones used in Danish.
But anyway, thank you for your feedback.
|
|
|
|
|
To start with you need to compile with UNICODE
led mike
|
|
|
|
|
OK, I knew about UNICODE, but how I make some chars to appear? I mean, UNICODE will allow me to use them, but how do I use them?
Thank you for your feedback.
|
|
|
|
|
Just a stupid question, but have you installed that particular language on your machine? If not, please do it: Control panel -> Regional and language options -> ...
You may use the language bar to switch between languages and type it.
Shog on learning VB6: Ah, that would have been VB6. Kicked my ass anyway. So easy to learn, just like falling down a flight of stairs...
|
|
|
|
|
I guess I'll have to do that...
PS: Now I'll go to home and commit suicide by eating my computer keyboard...
Thank you for your help.
|
|
|
|
|
When we start something new, it would be the little things, that we would miss.
Anything I will say you will bring it down to whatever you want.
|
|
|
|
|
You hould hve tol m tht bfor... I'm finihing ith th lft prt of th kybord...
Thnk you for your fbck...
|
|
|
|
|
Didn't your mother teach you to not talk with your mouth full?
I can sympathize with learning about UNICODE. I went through this several years ago, when we first started worrying about Japanese versions of our products. Once you learn the 'best practices' for UNICODE, you'll never go back to writing MBCS-only applications. Well, maybe not .
Software Zen: delete this;
|
|
|
|
|
I have my algorithm in vc++2005 and I want to save my results in XML,I declared
#using <system.xml.dll>
using namespace System::Xml;
using namespace System::IO;
using System::Console;
using namespace System::Text;
using System::String;
and now I have some example made in c# for saving my data in XML, the two line from below are made in c++ :
String^ path = gcnew String("c:\\results.xml");
XmlTextWriter myXmlTextWriter = gcnew XmlTextWriter(path,0);
and it give me 2 errors like:
Error 1 error C2664: 'System::Xml::XmlTextWriter::XmlTextWriter(System::IO::Stream ^,System::Text::Encoding ^)' : cannot convert parameter 1 from 'System::String ^' to 'System::IO::Stream ^'
Error 2 error C3767: 'System::Xml::XmlTextWriter::XmlTextWriter': candidate function(s) not accessible
please help me ...I have to do this in 2 days..I am realy disperate
lavi
|
|
|
|
|
|
sorry I declare and : #using <system.xml.dll>
|
|
|
|
|
Maybe change
XmlTextWriter myXmlTextWriter = gcnew XmlTextWriter(path,0);
to
XmlTextWriter^ myXmlTextWriter = gcnew XmlTextWriter(path,0);
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
Hi, sorry for my bad english.
I have build a DLL with Visual C++ 2005 (C++/ATL) that use the Netica API for creating a bayesian net. With this API, I can only load a file from the disc and passing from a stream for reading the net. I would to embedd the net file (a simple txt) in the resource file (.rc), and passing to a stream.
The step that I using is :
stream = NewStreamFile_ns ("C:\PathToNetFile", ... );
net = ReadNet_bn ( stream, ... );
If I can redirect the file from the resource to the stream, I will be an happy man
I hope that someones help me.
Thanks in advance.
|
|
|
|
|
One way...
You can insert the text into the resource in Visual Studio by creating a custom resource.
Project Menu/Add Resource...
Click Custom... button
Name the resource type "TEXT" or whatever
paste the text into the binary editor.
To retrieve the resource you can use FindResource()/LoadResource()/LockResource()/etc.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thank u, but I'm not an expert of this kind of programming, and I don't understand how I can do this.
The API is in C language.
the stream is defined as
typedef struct stream__ns stream_ns; //The structure is ignote (opaque pointer)
and I define the var as follow:
stream_ns * stream = NewStreamFile_ns ("C:\PathToNetFile", otherParams... );
net = ReadNet_bn ( stream, otherParams... );
Please help me
|
|
|
|
|
I was describing storing a text resource in an EXE/DLL and loading a text resource into memory
from an EXE/DLL.
Looking at the Netica C-API online, I don't see any way to use a memory stream - only file
streams.
Do they have support for the APIs?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I am using 'High-speed Charting Control' tutorial by Cedric Moonen to display 2D data. I have followed all the instructions mentioned on his tutorial but I am unable to get the graph of the 'ellipsoid curve' that he has mentioned. I have "Plot" Button on my GUI. On Click Event, I pasted the code that is given. The output that I get is that axis settings, background color gets changed, but it does not plot the data.
Thanks in advance.
Gaurav
|
|
|
|
|
Please, next time use the forum at the bottom at the article (scroll completely at the bottom of the page), that's the reason why they are there.
Did you post exactly the code that was in the example (I think there is even an error because the formating removed one space, but you can correct it easily) ?
If yes, did you follow all the other steps explained at the begining of the article ? I just tested here and it works fine.
So, what happens exactly ? When you start your application, how does the control looks like ? Like an empty chart control or like a blank rectangle ?
Did you check that the axis are correctly positioned ?
BTW, which IDE are you using ?
|
|
|
|
|
I am using Microsoft Visual c++ 6.0. I have a dialog based MFC application, here I have a button 'Plot'. On Click Plot, I have placed the code that is given in the tutorial.
The result that I see is - Title is addded, background color has been changed, but it does not plot the data.
void CCharttutorialDlg::OnPlot()
{
// TODO: Add your control notification handler code here
double X[361];
double Y[361];
CChartSerie *pLineSerie = m_ChartCtrl.AddSerie(CChartSerie::stLineSerie);
for (int i = 0; i < 361; i++)
{
X[i] = 10 * sin(i/360 * 2 * 3.141592);
Y[i] = 10 * cos( (i-60)/360 * 2 * 3.141592);
}
pLineSerie->SetPoints(X, Y, 361);
COLORREF TextColor = RGB(0,180,0);
COLORREF BackColor = RGB(0,50,0);
COLORREF GridColor = RGB(0,180,0);
COLORREF SerieColor = RGB(0,255,0);
m_ChartCtrl.SetEdgeType(EDGE_SUNKEN);
m_ChartCtrl.SetBorderColor(TextColor);
m_ChartCtrl.SetBackColor(BackColor);
m_ChartCtrl.GetBottomAxis()->SetMinMax(-15,15);
m_ChartCtrl.GetLeftAxis()->SetMinMax(-15,15);
m_ChartCtrl.GetBottomAxis()->SetColor(TextColor);
m_ChartCtrl.GetBottomAxis()->SetTextColor(TextColor);
m_ChartCtrl.GetBottomAxis()->GetGrid()->SetColor(GridColor);
m_ChartCtrl.GetLeftAxis()->SetColor(TextColor);
m_ChartCtrl.GetLeftAxis()->SetTextColor(TextColor);
m_ChartCtrl.GetLeftAxis()->GetGrid()->SetColor(GridColor);
m_ChartCtrl.GetTitle()->SetColor(TextColor);
m_ChartCtrl.GetTitle()->SetFont(140, "Times NewRoman");
m_ChartCtrl.GetTitle()->AddString("An example of Plot tutorial");
pLineSerie->SetColor(SerieColor);
m_ChartCtrl.RefreshCtrl();
}
Gaurav
|
|
|
|
|
The problem has nothing to do with the chart control but with how you use the sin and cos functions. If you use your debugger, you'll see that the values in each array are always the same. This is due to this:
X[i] = 10 * sin(i/360 * 2 * 3.141592);
If you look at my code, it is this:
X[i] = 10 * sin(i/360.0 * 2 * 3.141592);
Why does that make a difference ? Simply because when you divide two integers (i and 360), the result will always be an integer. In all cases, even if is something like 0.002 (it will be rounded to 0). If you do this: i/360.0, at least one of the operand (here the 360.0) is a float, thus the result will be a float, and you won't have an error of bounding.
(Of course, you need to do that for both the sin and the cos).
By the way, you should initialize the chart control (background, axis, title, ...) in your OnInitiDialog function, so that when you start your application, the control will look the same as when you click on the button.
|
|
|
|
|
|
how to change a button image when mouse is over and leave on button.
|
|
|
|
|
You could use TrackMouseEvent() using the button's HWND to request to receive WM_MOUSEHOVER and
WM_MOUSELEAVE messages. In response to those messages, change the button's bitmap appropriately.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|