|
Assuming that you need clock time rather than duration:
The SYSTEMTIME structure has a wMilliseconds member.
If you need even more resolution you could consider using GetSystemTimeAsFileTime which returns a FILETIME structure. This has a resolution of 0.1 microseconds.
If you need a duration - time elapsed between two points - follow Taka's suggestion.
|
|
|
|
|
According to the documentation, GetSystemTimeAsFileTime converts SYSTEMTIME in FILETIME format, i.e. the higher resolution is not real.
|
|
|
|
|
In Visual Studio 6, is it possible to remove a file from a project using a macro (DSM)?
Project.AddFile doesn't seem to have an inverse, which is odd, and annoying.
|
|
|
|
|
Simply highlight (select) it's name on the File View panel and press Del. Watch out, it does not even ask for confirmation!
|
|
|
|
|
I thought of that, but I can't figure out how to select it in the file view. I tried recording it as a macro but all it gives me is 'ExecuteCommand "Delete"' which isn't guaranteed to work.
Is there a way to interact more with the framework?
|
|
|
|
|
How can I prevent characters from being entered into control while using WM_KEYUP, WM_KEYDOWN, WM_CHAR?
I have to handle these messages inside WndProc() but only allow certain characters?
Thanks
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
simply subclass CEdit class and then override these evernts
|
|
|
|
|
How can i disable/enable a netcard with program! thank you!!
|
|
|
|
|
Check out MSDN.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/device_management_functions.asp
Kuphryn
|
|
|
|
|
have always used these classes with SOCK_STREAM option ,but i am not able to use these with SOCK_DGRAM option.
I want to broadcast a message to multiple ip's
on sender end i am doing
CSocket s;
s.Create(0,SOCK_DGRAM);
CString str="This is UDP";
s.SendTo(str,str.GetLength(),7000,"127.0.0.1");
CString strServerName="127.0.0.1";
CString strPort=7000;
CSocket s;
s.Create(0,SOCK_DGRAM);
s.RecieveFrom(pBuff,30,strServerName,strPort);
but no packet recieves , i might be missing some steps can any body help...
No Worries!
|
|
|
|
|
ur using multicast udp right?
forget it
nearly all routers on the internet block multicast udp datagrams
"there is no spoon" biz stuff about me
|
|
|
|
|
can u explain it little bit further , actually i want to broadcast bulk video data to multiple client , that is video broadcasting , but at the same time i want that i dont have to send it one by one to each client , as it will largely consume bandwidth.
can UDP make it possible to broadcast a message to multiple destinations , using only one Send ,if YES can u expain it , forget about internet i can try it atleast on LAN.Some code would be really helpful.
thanx...
No Worries!
|
|
|
|
|
look on cp for multicast udp and search google for it
i had some code that worked on a LAN but i deleted it i think
its not too hard
it wont work on the internet tho
"there is no spoon" biz stuff about me
|
|
|
|
|
I have created a Dialog based application using appwizard. now, i want to access a user defined function in the application class from my dialog class. how can i do that?
Shenthil
|
|
|
|
|
the application class object is taken global named theApp which you can see in your global list
simple extern that variable in the file where u want to use that variable
then call the user defined functions using the theApp object
|
|
|
|
|
|
Like the MFC Reference states, your application class is derived from CWinApp. There is a global MFC function AfxGetApp which returns a pointer to your class's parent CWinApp.
You can use the below method to access the class. Here, we assume that your the implementation of your dialog class (.cpp file) #includes the application class's header file. This is usually done for you when you create an application, but make sure just in case. If you have not included it, you will receive errors like 'Unknown variable'
CMyApp* ptrApp = DYNAMIC_DOWNCAST( CMyApp, AfxGetApp() );<DIV>
if ( !ptrApp )
TRACE0("Failed to get application pointer\n");<DIV>
UINT uiReturnValue = ptrApp->MyFunction(PARAM param1, PARAM param2);
The DYNAMIC_DOWNCAST macro does a safe downcast from CWinApp* returned by AfxGetApp into the CMyApp* type. As your application class is derived from CWinApp , the cast is perfectly legal and will yeild a pointer to your derived class.
You can use a similar method with any MFC class, for example, you can use GetParentFrame method of getting a view's parent frame (CFrameWnd* ) then cast it down to your derived CMyFrameWindow class.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
hello forum
I am working on one project.where i need to get external data in different format.
so i need to incorporate Excel's external data importer in my appn.
Can anyone give me any idea regarding this
thanx
|
|
|
|
|
Hello Friends,
I am Having a tree ctrl in a dialog box now when i set the checkbox property of the tree ctrl then there is a very Long Horizontal scroll bar at the bottom of the TreeCtrl. This scroll bar is very long even if the length of the string inserted in the treectrl is small
Can anyone help me out in removing the horizontal scroll, but i want the Vertical Scroll...
Thanx
TAKE CARE
|
|
|
|
|
Is your dialog based on a prepared resource ?
If it is, then override the OnCreate method of your dialog class, and first call the base class to create the dialog and control windows. Use Class Wizard to bind a control member for the tree control. When the base class call returns, use the member variable to check if the control window is created (m_hWnd member of variable is not null)
Set the window style flags using the member variable and ModifyStyle method to remove the WS_HSCROLL flag. This will remove the horizontal scrollbar.
If you create the list control dynamically, you can leave the WS_HSCROLL flag out from the Create method call. This will remove the horizontal bar. Including the WS_VSCROLL flag will ensure that the vertical scroll bar remains.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Antti Keskinen wrote:
Set the window style flags using the member variable and ModifyStyle method to remove the WS_HSCROLL flag. This will remove the horizontal scrollbar.
well but what if I really have something in my tree control which needs to have a horizontal scrollbar
|
|
|
|
|
I believe the only option for the tree control here is that the horizontal scrollbar is either on or off.
If you need a special implementation (variable on/off scrollbar), then derive from CTreeCtrl and draw the horizontal scrollbar yourself when necessary.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Thank you Friends it works....
Thanx
TAKE CARE
|
|
|
|
|
I want to use CxImage in my project, but i am not able to link the project files, i added CxImage workspace in my workspace and i get this following errors
error LNK2001: unresolved external symbol "public: virtual long __thiscall CxMemFile::GetC(void)" (?GetC@CxMemFile@@UAEJXZ)
13 other simlilar erros
i think i am providing the rite path, for the lib file but still i am not ale to resolve it
please help.
The World is getting smaller and so are the people.
|
|
|
|
|
Davide Pizzolato wrote:
The CxImgLib.dsw workspace shows the libraries required to build an application (demo.exe) including almost all the features and the formats available in CxImage. You must compile all the libraries before you can link the final application.
In the same workspace you'll find the projects to build different libraries and applications:
CxImage : cximage.lib - static library
CxImageCrtDll : cximagecrt.dll - DLL not using mfc
CxImageMfcDll : cximage.dll - DLL using mfc
Demo : demo.exe - program linked with cximage.lib and the C libraries
DemoDll : demodll.exe - program linked with cximagecrt.dll
j2k,jasper,jbig,jpeg,png,tiff,zlib : static C libraries
So from above you should look that whether u have build all of your libraries
|
|
|
|