|
I found another trouble, I have to include the D:\template for every individual project. Is it possible to include it like "VC98\include" as an one-time-job ?
|
|
|
|
|
In vs2005,
1. Go to Tools->Options
2. Click on projects and solutions tree item
3. Select vc++ directories item
4. Select Include files in drop down window "Show Directories for"
5. Then add your include directory.
I think it will be same in all VS IDE.
http://www.mono-project.com/Main_Page
|
|
|
|
|
void CFLUpdaterDlg::Print(CString s_Format, ...)
{
va_list args;
va_start(args, s_Format);
int BUFLEN = 1024;
CString s_Out;
TCHAR* t_Out = s_Out.GetBuffer(BUFLEN+1);
_vsntprintf(t_Out, BUFLEN, s_Format, args);
t_Out[BUFLEN] = 0;
s_Out.ReleaseBuffer();
if (s_Out.GetLength() == BUFLEN)
s_Out.Replace(_T("\r"), _T(""));
s_Out.Replace(_T("\n"), _T("\r\n"));
ms_Output += s_Out;
m_Print.SetWindowText(ms_Output);
return;
}
void CFLUpdaterDlg::OnBnClickedStartserver()
{
if(!serverstarted)
{
TCHAR PortNumber[260];
m_PortTxT.GetWindowTextA(PortNumber,260);
m_Port = atoi(PortNumber);
Print("Server Started on port %i\n",m_Port);
serverstarted=true;
AfxBeginThread( ServerEXE,(LPVOID)m_Port, THREAD_PRIORITY_NORMAL);
}
else
{
Print("Server Allready Running\n");
}
}
UINT CFLUpdaterDlg::ServerEXE(LPVOID param)
{
CFLUpdaterDlg out;
int host_port = (int)param;
out.Print("port = %i\n",host_port);
return 0;
}
i seem to be geting memory overflows it prints out OnBnClickedStartserver info no problem but when i try to print from the thread instant overflow
|
|
|
|
|
kosacid wrote: m_Port = atoi(PortNumber);
Is m_Port a pointer?
kosacid wrote: AfxBeginThread( ServerEXE,(LPVOID)m_Port, THREAD_PRIORITY_NORMAL); Why are you casting an int to a pointer? If m_Port is a global int , you'd need something like:
AfxBeginThread(ServerEXE, (LPVOID) &m_Port, THREAD_PRIORITY_NORMAL);
kosacid wrote: int host_port = (int)param;
This does not look right. If param is supposed to be treated as a pointer to an int , you'd need:
int host_port = *((int *) param); or
int *host_port = (int *) param; Also, why are you having the secondary thread interact with a UI element? Only the primary thread (the one that owns the UI element) should do that.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
it passes the param ok its not that its definitly the print function seems to be
m_Print.SetWindowText(ms_Output);
ms_Output contains say "port = 100" if i set it to 100
seems that m_Print.SetWindowText(ms_Output); cant find the edit box its pointing to 0
|
|
|
|
|
kosacid wrote: cant find the edit box its pointing to 0
No surprise since you are attempting this from a secondary thread.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
that dosent realy help me out can you maby sugest a way on how to do it
maby give me a push in the right direction i mainly program in c++ and c
what works for that dosent seem to work in visal c++
|
|
|
|
|
Like I mentioned earlier, you should refrain from interacting with any UI element from any thread other than the one that actually owns the element. See here for more, specifically the "Worker threads and the GUI II: Don't touch the GUI" section.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
I work in VC6 and I need for some project atlimage.h to include in my project. My question is , where can I find it for download ? I mention that I search along for this , but I didn't find it ... can you help me ? Thank you.
|
|
|
|
|
|
Should I understand that is not enough to find somewhere altimage.h and include in foolder project ? Because my error is :
E:\Flaviu\Temp\ImageComparator\ImageComparator\stdafx.h(44): Could not find the file atlimage.h.
|
|
|
|
|
it cannot be included from external source, it is the part of atl library. And VC6 doesnot contains it.
atlimage.h is found from vs2003 or maybe vs2002 and above.
you can use WIN32 way to accomplish your task.
Regards,
Vishal
|
|
|
|
|
I think that I understand now thank you.
|
|
|
|
|
Hi, I am facing a strange font problem
<br />
Font Name : Aparajita<br />
Language : Hindi<br />
<br />
Platform : C++ Win32 (NO MFC)
I created a dialog with a simple edit control.
When i enter the path displayed below in the edit control,
Everything is displayed in correct size,
But only the hindi text is displayed very small. Just unreadable.
Path Entered: C:\Hello World\सरकारी\Files
I have tested this with Chinese Font. It is ok.
How to over come this problem. Please help.
Thanx 4 everyone, problem solved.
Regards,
Vishal
modified on Wednesday, June 8, 2011 12:11 AM
|
|
|
|
|
Make all the text smaller and no one will notice... 
|
|
|
|
|
i can't, becoz if i make all the text smaller the hindi text seems like dot dot dot...
Regards,
Vishal
|
|
|
|
|
I've never played with different texts... so can't help too much there...
|
|
|
|
|
1) Is Aparajita is Hindi font and
2) Is सरकारी is unicode string or ascii string?
If it is unicode than you must choose the font as Mangal and than check.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
SP 24 wrote: 1) Is Aparajita is Hindi font and
Yes
SP 24 wrote: 2) Is सरकारी is unicode string or ascii string?
Unicode String
SP 24 wrote: If it is unicode than you must choose the font as Mangal and than check.
Checked with Mangal. The result is same.
Actually the string contains both english and hindi.
Regards,
Vishal
|
|
|
|
|
I am facing this problem with Bengali and Oriya only but not in Hindi. Please check that you have Mangal font installed in your system?
It should be in SystemDrive:\Windows\Fonts folder. One more thing that I do is copy the font of mangal in Windows 7 or Vista and installed it in your pc. Might be your problem is resolved.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
can you check you aprajita font in font folder, what is the maximum size it's support?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi Alok ji,
Please ask this question to Vishal .
BTW the string is Unicode than there is no need to set the Hindi font. He can set Mangal instead.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
SP 24 wrote: Please ask this question to Vishal .
yeap.... thanks!
SP 24 wrote: there is no need to set the Hindi font. He can set Mangal instead.
some times it's project requirement to use some particular fonts and never depend on UNICODE based on size and shape they take
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ThatsAlok yeap.... thanks!
ThatsAlok some times it's project requirement to use some particular fonts and never depend on UNICODE based on size and shape they take
Yae but for English and Unicode font, I don't think so that it is being used.
For an example if I have English string might be "abcd" and I set some Hindi font. If any shape is mapped in that Hindi font than it might be a hindi value without meaning. So for English font we have to take care of it.
Example :
In some Hindi font "a is mapped with shape क" and in some other font may be "a is mapped with shape अ".
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
Aprajita Font maximum size is 72. I had tried Mangal Font also, but no success.
Regards,
Vishal
|
|
|
|