In this particular case I don't see a real benefit for seperating the for loops, perhaps the author thought it to be easier to read? However, if there comes a time when Bstruct.aa/Btable.aa has a different number of entries than Bstruct.bb/Btable.bb then this would be easier IMO to maintain.
The key is "embedded". Some CPUs, many in the embedded space, throw exceptions for misaligned data access EXCEPT for byte access. This is one way to copy data with unknown alignment (say from a socket or file) to an aligned data structure. (The original ARM chips would throw an exception, which some embedded OSs would catch and then do exactly the above internally.)
I need to display 8 roads video at the same time.
But I find that the DrawDibDraw is too slow, it need 16ms to draw one frame data.
it nearly cannot be accepted.
Then I try to use the directdraw to draw the YUV data to windows, but I cannot get a right answer after google half a day. Is there some one know how to draw the YUV or RGB data to a form using the directdraw? thanks.
The CreateFont[^] function creates a logical font based on the request parameters and the actual font files that are loaded on your system. Most fonts include Unicode characters for various different languages and there are fonts that handle Asian type alphabets.
Creating a new font from scratch requires a number of other tools; Google will help you to find articles on the subject.
One of these days I'm going to think of a really clever signature.
dear all,I have a question,when I write files,like pdf,i want to popup a dialog with animation to show
that the writing operation is working.
I don't know how to do with that ,it may need a avi file ,use CAnimateCtrl,is it need multithread,please
help me.this is my code
// TODO: Add your command handler code here
ExPro = new CExportPro();
CFileDialog dlg(FALSE,TEXT("txt"),NULL,OFN_HIDEREADONLY|OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST|OFN_OVERWRITEPROMPT,_T("TXT (*.txt) |*.txt|"));
filePath = dlg.GetPathName();
m_filepathname = dlg.GetPathName();
if ( !filePath.IsEmpty())
CString str(TEXT("hello this is the test for write process"));
Perform all your file writing operations in a background thread, and compute and post messages on the operation progress from the worker thread to your main window. Your main window procedure should handle this message and display the progress accordingly.
Thanks,but I use CAnimateCtrl,this is a control,I initial it in dialog CExportPro::OnInitDialog(),I think
when modalless diaolog appear,the control should be appear ,but the fact is that when writing it appear modalless diaolog without CAnimateCtrl,and after writing,the CAnimateCtrl show,why,it maybe the thread
hang_up.how to do with it.
You cannot run Windows unmanaged programs on Linux. You can do the base development as long as your code is POSIX compliant, but you would be better getting access to a Linux system and using the Linux development tools.
One of these days I'm going to think of a really clever signature.
People, I met a rather strange situation. I deleted a small memory block and after it was not able to allocate another one. Operator "new" presented me with "out of memory" exception. But without previous call of "delete" "new" gave me what I asked it for (I'm talking about small blocks, something like 10KB). At that very time VirtualAlloc() successfully allocated required memory. How could it be?
Yeah, of course I thought about it, but was not able to detect where this sorrowful situation took place. Usually when I wrote something outside of allocated memory block, I got a message when "delete" operator was called, but not now. I tried to check surrounding memory, allocated larger then I needed block, wrote canary words before and after memory that I used and found that these canary words remained intact.
Situation is worse, than I expected. Some malicious code is running at my comp. For the beginning, my Visual Studio 2005 refused to create the Project Property window and gave me something like "failed to create Net. Framework property grid". Trying to understand, why my prog refuses to open files, which it was able to open some days ago I found that in my process's address space was downloaded libraries like urlmon.dll, netapi.dll, crypt32.dll and modemInst.dll (!!!). People, I write prog which is intended to work with aerial images and I have no intention to counteract with the Net. The most interesting is the last library- it was taken not from system32 catalog, but from folder where HSPA USB Modem was placed.
Is there any tool to findout memory leaks in an ActiveX (build using C++/MFC). This ActiveX is loaded through a webpage in IE. I want to find out leaks at run time on certain operation in the ActiveX specially during unload. I tried bound checker but there is no such option to attach IE with it.
There is no reasonable scenario in which a QA department could be expected to verify those and no way that Operations/Support could be expected to put thousands into production at the same time.
Thus a planned rollout involving small sets is required. And small sets can be upgraded manually.
Even if everything went smoothly with say the first 100 one would still want to have a grace period between production and the next batch to insure that some serious problem didn't develop. Attempting to rollback tens versus thousands of apps is obviously very different.
It might be part of a bigger process to upgrade their code-base to a newer compiler/system; maybe a year long process (not uncommon for large systems).
Maybe they have a unit test system in place to validate all their code and system tests to validate the outputs.
I think thinking about a way to automatize converting their project files is good thinking; I would not want to have to double click on 1000s of dsw/dsp in VS2010 and manually upgrade the project files.
Restating what I already said...the mas rollout cannot be done all at once.
Maybe they have a unit test system in place to validate all their code and
system tests to validate the outputs.
Anyone that relies on that as their sole production test deserves the problems that can occur.
I would not want to have to double click on 1000s of dsw/dsp in VS2010 and
manually upgrade the project files.
A phased rollout means that you must support the current production set, not what might be in a year from now. And using a branch (with the older versions) to support most of production for a year just so you don't have to click a few buttons once a week doesn't seem cost effective to me.
Unit testing is only one of many validation tools when updating code to newer compilers.
Maybe they have tons of small and simple libraries (.lib) projects that need to be upgraded and when all tests are passed and validated they will be released. (AFAIK) The library are not compatible between VC6 and VS2010; so they might have to do it "all at once" (an exe build with VC cannot use a VS2010 library and vice-versa).
In the OP's particular case, coming from VC6, it might be the least of their problems if they have been doing C++ and MFC; just fixing all of the compilation errors and warning will probably take forever.
Just updating the project files will be at best hard, even if they can automatize them.
After developing in C#, PHP and several other programming/scripting language I thought I'd give C a try last week. After a week of coding I'm beginning to get the hang of it. I wrote a simple, incomplete HTTP client in C. Since I never coded in C before last weeek I don't know what I'm doing wrong, do I use stuff that is considered bad practice? My code compiles fine and it works fine, I'm just wondering if somebody can take a look and tell me what I could improve. Don't be nice, just tell me what is wrong and what sucks.
Before you get flamed, I thought I'd point out that the Lounge is not the place to post programming questions. If I were you, I would possibly look to split out parts of your application into bite sized chunks and post questions in the Q and A forum asking whether the code follows good practices. I certainly wouldn't link to it in the lounge.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
I need to create a component which will be callable from a browser when it sees an object tag like the following
<object width="400" height="400" data="helloworld.swf" type="application/x-shockwave-flash"></object>
My plugging will display an image file and give some response to user interactions like zoom-in, zoom-out, rotate etc.
I don't know start from where? I know c++ and c#. The library for the image processing that I need to use written with c++.
If any guru out there can guide me the road-map that I should follow, will be appreciated in a highly tonnage.
Thank in advance.