Displaying Special symbols on the dialog window.
-
Hello Im stuck with the problem of displaying special symbols say m_up_direction= "↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑"; or m_down_direction= "↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ "; on the dialog window(im using vc++ 6.0) could any please help ,e whether i need to type cast the expression or do any setting...?? -thanks
-
Hello Im stuck with the problem of displaying special symbols say m_up_direction= "↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑"; or m_down_direction= "↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ "; on the dialog window(im using vc++ 6.0) could any please help ,e whether i need to type cast the expression or do any setting...?? -thanks
I'm presuming that the arrow symbols are in the symbols font? In that case, you'll need something like this (it's taken pretty much verbatim from some of my own code):
class MyDialog : public CDialog
{
CButton m_up_direction;
CButton m_down_direction;
CFont symbols_;
};BOOL MyDialog::OnInitDialog()
{
CDialog::OnInitDialog();
if (symbols_.CreatePointFont(100, "Symbol"))
{
m_up_direction.SetFont(&symbols_);
m_down_direction.SetFont(&symbols_);
}
else // If we can't create the font, use some ugly ASCII-art arrow-esque figures.
{
m_up_direction.SetWindowText("^");
m_down_direction.SetWindowText("V");
}
}Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
I'm presuming that the arrow symbols are in the symbols font? In that case, you'll need something like this (it's taken pretty much verbatim from some of my own code):
class MyDialog : public CDialog
{
CButton m_up_direction;
CButton m_down_direction;
CFont symbols_;
};BOOL MyDialog::OnInitDialog()
{
CDialog::OnInitDialog();
if (symbols_.CreatePointFont(100, "Symbol"))
{
m_up_direction.SetFont(&symbols_);
m_down_direction.SetFont(&symbols_);
}
else // If we can't create the font, use some ugly ASCII-art arrow-esque figures.
{
m_up_direction.SetWindowText("^");
m_down_direction.SetWindowText("V");
}
}Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
hey Stuart,, thanks ya for the reply,, but actually im trying to put the unicode strings on the window. also there is one more method to retrieve from an unicode file(where these ↑ and ↓ are being stored) and display it on the window.. since those stuffs make my project messy,, thought of putting direct unicode string in the code,, i thing may be the numeric value of the unicode may work...
-
hey Stuart,, thanks ya for the reply,, but actually im trying to put the unicode strings on the window. also there is one more method to retrieve from an unicode file(where these ↑ and ↓ are being stored) and display it on the window.. since those stuffs make my project messy,, thought of putting direct unicode string in the code,, i thing may be the numeric value of the unicode may work...
aravind.sn wrote:
but actually im trying to put the unicode strings on the window.
I'm guessing that'll only work if
IsWindowUnicode
[^] returns TRUE for the window? Also, you'll either want to #define UNICODE and _UNICODE to get the Unicode APIs, or use the xxxW variants of the API calls.Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
aravind.sn wrote:
but actually im trying to put the unicode strings on the window.
I'm guessing that'll only work if
IsWindowUnicode
[^] returns TRUE for the window? Also, you'll either want to #define UNICODE and _UNICODE to get the Unicode APIs, or use the xxxW variants of the API calls.Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
Thank you,, i just did and array of (unsigned short)decimal values for the unicode. then to CString. thanks stuart for ya reply... :)