|
I did read his serie of articles.
Unfortunately the bug seems to appear in the MFC dll, so nothing I can do there to trace some code. And the stack does not include any of my functions.
There is also a very good article called Surving the release version, but I still have not found anything useful there either.
Thanks!
|
|
|
|
|
Found it!
I was simply using the index -1 in a std::vector... not a very good way to make your program work (and it does screw up your stack )!
I wish the STL had some ASSERTs like there are in MFC though!
|
|
|
|
|
hi,
i need to print cstring data to printer with out showing printdialog and printpreview i.e rawly print the data to the printer. any one help to me
thanks in advance
Murali.M
|
|
|
|
|
Try LPCTSTR operator witch overloaded by CString
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
|
Hi!
I need some help. I need to include milliseconds into my timestamp and I don't know how to do.
For Example:
12:10:47:123
If you even know how to get microseconds, that is also welcome
Thankful for your help,
|
|
|
|
|
Look at QueryPerformanceCounter() for high-precision timings.
"Sucks less" isn't progress - Kent Beck [^]
Awasu 1.1.3 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
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
|
|
|
|