|
Sorry, you are correct and it is there... interesting... eventhou I included this header...
// Attributes
COLORREF GetMonthCalColor(int iColor) const;
COLORREF SetMonthCalColor(int iColor, COLORREF ref);
BOOL SetFormat(LPCTSTR pstrFormat);
CMonthCalCtrl* GetMonthCalCtrl() const;
CFont* GetMonthCalFont() const;
void SetMonthCalFont(HFONT hFont, BOOL bRedraw = TRUE);
|
|
|
|
|
To answer your seconrd question:
This is a 3rd party app which has a switch for EURO Date Format or NOT. I support a DLL that interfaces with another system. Yes, like you I would have used Windows configuration.
thanks again...
|
|
|
|
|
Don Jones BNYMellon wrote: This is a 3rd party app which has a switch for EURO Date Format or NOT.
I understand that, but there's still no reason to perform both if() tests when only one of them can evaluate to true. I would imagine that the compiler would realize that and perform the necessary optimization, but still.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
I have a problem like i need to include a different header files depending on the linux kernel in a .cpp file. I have to check the linux kernel version and include the headerfile depending on that kernel. How can I do that?
I have ARCH variable in Makefile, can i make use of that?

|
|
|
|
|
Best way it to first include keranal version.h file in your project (ex:"/usr/include/linux/version.h"), and then put below checks in your code.
#if RHEL_MAJOR == 5
#include "xyx_5.h"
#else
#include "xyx.h"
#endif
Parag Patel
Sr. Software Eng, Varaha Systems
|
|
|
|
|
lOOKS LIKE this doesn't work for me. I saw the version.h file, it has got 3 lines as below.
#define UTS_RELEASE "2.4.20"
#define LINUX_VERSION_CODE 132116
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
And I want to differentiate kernels for 2.4 and 2.6. Is the above code still works with it.I've placed my code as below, but it seems not working.
#include "/usr/include/linux/version.h"
#if RHEL_MAJOR=2.4.20
#include "../../build/i686-Linux-2.4.32/ReleaseVersion.hh"
#else
#include "../../build/i686-Linux-2.6.21/ReleaseVersion.hh"
#endif
What went wrong in my case.
Thanks in advance 
|
|
|
|
|
Try below code,
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,0)
#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#endif // 2.4
#endif //2.6
Parag Patel
Sr. Software Eng, Varaha Systems
|
|
|
|
|
Thanks a lot man. It's working.
|
|
|
|
|
Hi All,
I have problem with my project linking. It fails and the errors are
error LNK2001: unresolved external symbol __RTC_Shutdown
error LNK2001: unresolved external symbol __RTC_InitBase
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z)
error LNK2001: unresolved external symbol ___security_cookie
and a lot such us.
Can anybody tell me what can be the reason?
Thanks
|
|
|
|
|
venera_soft wrote: Can anybody tell me what can be the reason?
Not linking with the correct library, perhaps?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
The strange part of this is that i could build the sources before installing the oldest version of WinDDK. And i have never changed any lib files that are linked to my project.
Thanks anyway.
|
|
|
|
|
Looks like you're linking against the wrong C/C++ run-time libraries. Check that the correct Visual Studio directories are in the VC++ library path (Tools->Options->Projects and Solutions->VC++ Directories and select 'Library files' for the 'Show directories for:' combobox).
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi. Thanks for answer but it's ok with the Library Files.
|
|
|
|
|
Hi all,
I have a customized ListCtrl, and Called SetTimer() but OnTimer() handler will execute only once..
And I does not called any KillTimer(),
My OnTimer is Like this
<br />
void ListCtrlEx::OnTimer( UINT nIDEvent_i )<br />
{<br />
if( 100 == nIDEvent_i )<br />
{<br />
}<br />
CListCtrl::OnTimer( nIDEvent_i );<br />
}<br />
<br />
SetTimer( 100, 300, 0 );<br />
Any possible reason for the same
Regards,
Radhakrishnan G.
|
|
|
|
|
Don't called default OnTimer of CListCtrl, for your timer ID.
void ListCtrlEx::OnTimer( UINT nIDEvent_i )
{
if( 100 == nIDEvent_i )
{
// Do some thing
}
else
{
CListCtrl::OnTimer( nIDEvent_i );
}
}
Parag Patel
Sr. Software Eng, Varaha Systems
|
|
|
|
|
Yes, Its working
Actually I made a mistake..
Thanks
Please find my 5 Votes.
|
|
|
|
|
I am using MFC Treeview control in my application. For each tree node has some images. usually the image is left side of the tree node but i would like to add this image after the text of the node.
Can you please suggest some ways to do this?
Thanks in advance.
|
|
|
|
|
You will probably need to have to handle NM_CUSTOMDRAW and do the drawing yourself.
This signature was proudly tested on animals.
|
|
|
|
|
|
For the matrix A size mxn. Allow change the marks in the same row or column of A. Algorithms to set up following a number of changes allowed to be the matrix A satisfying nature: Total number of
rank of each row and each column is greater than 0
|
|
|
|
|
And what's your problem exactly ?
|
|
|
|
|
Do you mean 'other than expression ones'?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
pls ! this problem here how to solove arithmetic above.
|
|
|
|
|
Hi there gys,
I'm looking for a way to update a crawler I 've created. Of course I want the update to be applied without system reboot plus the binary changes to be stored on disk. Can you give me some tips on how to do that?
Thanx
|
|
|
|
|
hi everybody!
I am writing Windows console application with Microsoft Visual Studio 2008 (using C only) which needs to allocate big amounts of RAM memory with malloc() anc calloc(). The execution of program can be stopped anytime by user pressing CTRL+C keys or by shutting down console window.
What happens to previously allocated memory when it happens? Is it freed up by the system automatically (I guess not?) or do I need to keep track of allocated memory blocks and free() them all myself when the application receives close signal? If this is the case can anybody direct me to any C code solving this problem?
Thank you in advance,Radek
|
|
|
|