If you want to use integer arithmetic without floating point then do it this way:
unsigned__int64 size = 524285686;
constunsigned MEG = 1024*1024;
unsigned megs = (unsigned)(size / MEG);
// If you want 3 digits in the fraction then change 100 to 1000 and change %02u to %03u in the format string.
unsigned fraction = (unsigned)((size % MEG) * 100u / MEG);
printf("%u.%02u\n", megs, fraction);
EDIT: changed from signed integers to unsigned integers
I want to develop a DLL that has a web browser embedded in it. In the past i have created MFC dialog app using CDHtmlDialog. With that experience what i want to achieve is create a DLL that has browser embedded in it, and then load this DLL into a web browser like IE, Chrome or Firefox.
Is this possible to do?
The reason why i want it this way is because the C++ code in the DLL will talk with another C++ DLL and take instructions on how and when to show the HTML/JS controls.
As i said earlier, i have worked with CDHtmlDialog in MFC Dialog app. But in this case i don't need any MFC controls. All i need is a Web Browser capability like the one CDHtmlDialog provided. And also this should be launchable from with in another web browser like IE or Chrome or Firefox.
Please let me know of any examples that does similar things.
Your question is too broad for a technical forum; we deal here with specific problems. For general "how to" questions you need to do the research and find the samples and articles that will help to build your project.