|
Hi Stuart,
Thanks for letting me know that the real issue is with VS2005 SP1 compiler. I will try to get hold of VS 2008 SP1 compiler and try on it.
In last two days I went crazy trying to figure out what is wrong with the declaration/definition, now I know the reason.
Do you think VS2008 SP1 compiler is the most complete one when it comes to templates specification implementation?
And does it supports export keyword for templates?
Thanks and Regards
|
|
|
|
|
psychedelic_fur wrote: Do you think VS2008 SP1 compiler is the most complete one when it comes to templates specification implementation?
It's not far off the top.
psychedelic_fur wrote: And does it supports export keyword for templates?
No - but then, which C++ compiler does
That's a trick question, 'cause here's the answers:
- Comeau C++[^]
- Intel C++ for Linux..but don't know about Windows.
- Possibly Borland C++
|
|
|
|
|
Hi all,
i have created a dialog similar to messagebox can somebody tell me what font should i use to display the message,so that look and feel is same for both .
vikas da
|
|
|
|
|
Simply set "Use System Font" in the dialog editor and the dialog will automatically use the default system font.
|
|
|
|
|
this to be done while creating font object...
vikas da
|
|
|
|
|
Then you should use SystemParametersInfo to retrieve information about the message box font and create a font object based on that. Something like this:
NONCLIENTMETRICS ncm;
ncm.cbSize = sizeof(ncm);
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
HFONT hSystemFont = CreateFontIndirect(&ncm.lfMessageFont);
|
|
|
|
|
Thank you very much for all the help .. but really not using such code to create the fond..
CreateFont(
16,
0,
0,
0,
FW_BOLD,
FALSE,
FALSE,
0,
ANSI_CHARSET,
OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH | FF_SWISS,
"Tahoma"));
and after creating the font am just using this to set for particular dlg item..
please let me know how can i use this ..
vikas da
|
|
|
|
|
You have to make your mind up... do you want to use the system's message font, or Tahoma?
As previously shown to you, get the NONCLIENTMETRICS structure, contaming lfMessageFont .
Then create a font with it.
CMyDialog dlg (blah);
dlg.m_MyFont.CreateFontIndirect (&ncm.lfMessageFont);
and use it to set your control's font...
BOOL CMyDialog::OnInitDialog ()
{
...
GetDlgItem (IDC_MYCONTROL)->SetFont (dlg.m_MyFont);
...
}
Tada!
Iain.
|
|
|
|
|
Dear all
I have two programs:
1. the source code of a dll suppose that a.dll
2. the source code of program which uses a.dll suppose b.exe.
both of them were written in vc6 IDE, and both are operational
now I compile the a.dll in visual C++ 2005.
but when I want to use a.dll with b.exe , when I call GetProcAddress to retrieve the address of functions , Null value is returned.
I dont know how to overcome this problem.
If u have any idea please let me know.
I must say that a.dll should be backward compatible , thus it is not possible to change b.exe program.
Regards
Mahdi
|
|
|
|
|
Gut Mikh Tappe wrote: when I call GetProcAddress to retrieve the address of functions , Null value is returned
Check the below two things.
1) Debug the application and when the GetProcAddress returns NULL, put err,hr in the watch window to find the last error occured.
2)Take the dependecy walker and open the dll. In the export section of the dll, check whether the function is exported or not.
|
|
|
|
|
thank you mr Nave
I found that I didnt export functions of dll.
But i dont know what dependency walker is.
whould you please let me know about it.
I download a tiny software to see the export list of the dll.
Regards
Mahdi
|
|
|
|
|
|
Thank you mr nave
you are my abroad friend.
Hope you to be successfull.
Regards
Mahdi
|
|
|
|
|
Always keep in mind there's nothing to do with which version of the VC compiler was used to make the dll. Always check for the dependency & exported functions ,that's it.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
In addition to the previous (good) answers, you'll want to look up "name decoration", and "extern "C" {" in the search engine of your choice.
Iain.
|
|
|
|
|
Hi,
I am dovelping a application that calculates the all folders size of a logical drives. But it is doing very slow. But in windows, calculation of folder size too fast, Please anybody tell me the algo behind fot fast calculatetion of size.
|
|
|
|
|
Check this[^]
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Member 4312898 wrote: Please anybody tell me the algo behind fot fast calculatetion of size.
Without seeing how you are currently doing it, any suggestion would mostly be in vain.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
i know we can use CRebar to make a background for ToolBar in MainFrame
i use a CToolBarCtrl object in View bottom.
i want to make a background for the CToolBarCtrl object,but i dont know how to do ?can you help me?
|
|
|
|
|
Is this[^] helpful ?
Regards,
Paresh.
|
|
|
|
|
thanks ,but that's not i'm waiting for.
|
|
|
|
|
Hi all,
i have two COleDateTime type variable, i want to calculate between them in terms of months.
i mean i want to calculate total months between them.
i m checking COleDateTimeSpan but there is no function for GetTotalMonths
please tell me how can i do this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
You can use GetDays () function of COleDateTimeSpan class.
If you divide Days by 30, you will get the approximate months.
The other option is to use int GetMonth() function of COleDateTime variables.
This will return the month value in int.
If you subtract the values, you can get the approximate month difference. (But you have to take care of the year also).
|
|
|
|
|
Thanks.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
COleDateTime has GetMonth, GetDay and GetYear methods that would allow you to determine the difference in real, calendar months:
int GetMonthsBetween(COleDateTime a, COleDateTime b)
{
if (a < b) return GetMonthsBetween(b, a);
const int aMonths = a.GetYear()*12 + a.GetMonth();
const int bMonths = b.GetYear()*12 + b.GetMonth();
const bool needToRoundDown = (aMonths>bMonths) && (a.GetDay() < b.GetDay());
return (aMonths - bMonths) - ( needToRoundDown? 1 : 0 );
}
This will round the month count down if necessary. For example, consider if a = June 12th and b = May 25th - you can see there's less than one full month between them.
|
|
|
|