|
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.
|
|
|
|
|
thanks
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
I have created property sheet with four pages.
I just want insert it into another dialog. How?
|
|
|
|
|
Call Create() function of the property sheet and pass the address of the dialog class as parent window.
|
|
|
|
|
|
Does this[^]help you ?
- Malli...!
|
|
|
|
|
Hi All
How can i get disk size?Plz help me
|
|
|
|
|
|
i am using CreateTimerQueue() funcation to create queue for timers and i have include windows.h and winbase.h files but compiler give error that CreateTimerQueue() is undeclared identifier
C:\Documents and Settings\Administrator\Desktop\radio_check_ selection\vep.cpp(344) : error C2065: 'CreateTimerQueue' : undeclared identifier
what can be reason and its solution
|
|
|
|
|
shaina2231 wrote: error C2065
Following are the reasons for Error C2065 from MSDN.
1. You are compiling with a debug version of the C runtime, declaring a Standard C++ Library iterator variable in a for loop, and then trying to use that iterator variable outside the scope of the for loop. Compiling Standard C++ Library code with a debug version of the C runtime implies /Zc:forScope. See Debug Iterator Support for more information.
2. You may be calling a function in an SDK header file that is currently not supported in your build environment.
3. Omitting necessary include files, especially if you define VC_EXTRALEAN, WIN32_LEAN_AND_MEAN, or WIN32_EXTRA_LEAN. These symbols exclude some header files from windows.h and afxv_w32.h to speed compiles. (Look in windows.h and afxv_w32.h for an up-to-date description of what's excluded.)
4. Identifier name is misspelled.
5. Identifier uses the wrong uppercase and lowercase letters.
6. Missing closing quote after a string constant.
7. Improper namespace scope. To resolve ANSI C++ Standard Library functions and operators, for example, you must specify the std namespace with the using directive. The following example fails to compile because the using directive is commented out and cout is defined in the std namespace:
shaina2231 wrote: what can be the solution
Please make sure that you are not doing any of them.
|
|
|
|
|
The CreateTimerQueue() will only be available only if _WIN32_WINNT is greater than or eual to 0x0500. So in the project settings->c/c++->Pre processor definition put _WIN32_WINNT=0x0500
or in the stdafx.h define the macro as
#define _WIN32_WINNT 0x0500
|
|
|
|
|
That function requires windows 2000 or above. So take Project settings, C/C++ tab and add _WIN32_WINNT=0x0500 to the preprocessor definitions. Hope at this time, it will compile.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
plz send me link regarding Queue Timer examples or Demos
|
|
|
|
|
|
Hi,
I just got a a New Lap Top same as OS as my Tower Windows XP service pack 2
However when I try to do a OpenProcess on the Parent Process (I am in the code) of the child process
I get zero for the process handle AND access denied for GetlastError
I am trying to jog my memory and see if changed the registery --> Local Security Dont remember
here is the Create Process
<br />
return_code = CreateProcess(NULL,<br />
(LPCSTR) &herc_buff[0],<br />
NULL,<br />
NULL,<br />
TRUE,<br />
NULL,<br />
NULL,<br />
NULL,<br />
&si,<br />
&pi);<br />
<br />
|
|
|
|
|
Add @err,hr to the watch window and check what is the last occurred error. Hopefully it can give you the hint.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Are you sure you're the exe has enough privilege? is it being blocked by security applications like firewall?
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|