I had written programs using TURBO C & C++ IDE. These were written for MS-DOS OS. When ever i talk about these programs i refer them as "16 bit programs (MS-DOS)". Is it right? cause MS-DOS is an os which could manipulate up to 16bits of information so a program written using its api should be 16bit programs besides DPMI(dos protected mode interface) or the TURBO C++ IDE.
I would like to have any kind of reply which could give more information about this and to conclude my doubt.
It depends on what you mean by MS-DOS, keep in mind since Windows XP MS-DOS is no longer part of the OS. I believe that is the first Windows version that ran a console rather then MS-DOS inside windows (or the other way around). And in Windows XP+ the console is a true 32bit application. In the 64bit version of Windows it depends on the program, but the default console is 64bit then.
A note on the 64bit Windows, I believe that if an application is 32bit it will start the WOW32 emulator.
Oh... So the virtual machine works like a 32 bit system isn't it?
What in Windows 98? I hope that virtual machine works as 16 bit.
I am using dosbox an emulator in windows xp because this xp 32bit version virtual machine does not render c graphics as expected.
I hope dosbox should run an emulator which is 16bit. Because i get all my outputs as expected. i have used EGAVGA.BGI Borland Graphics Library and i use lot of outport and inport function which interact with the keyboard and video card.
so can i still say that my programs are 16bit apps because they cannot access more memory than that unless we use memory managers which i have tried a lot but could not successfully use them. now we are far away form those concepts... i am documenting my old work . so is the reason for the flashback.
BESIDES I READ THIS AS FIRST REPLY AND I AM RESPONDING TO IT. I DID NOT READ THE OTHER REPLIES UNTILL I COMPLETED THIS REPLY. ANY WAY THANKS FOR ALL EXPERTS WHO HAD REPLIED TO ME.
It depends which Turbo C++ you are using. If it is the ancient character-based one (looks like a DOS screen), then it generates 16-bit code. If, however, you use the more modern one (ca 2005, looks like a real Windows IDE), then it generates 32 bit code, even for console apps.
It's not a bad description to start with as all DOS programs start life as 16 bit programs. The calling convention for DOS was all real mode and register based so most parameters had to be 16 bit. If you wanted to pass 32 you had to use a structure or pack them in two registers.
However while all DOS programs start execution as 16 bit, by the early 90s most were starting to branch out a bit and would switch to either 16 or 32 bit protected mode fairly quickly, switching back to 16 bit real (or V86) mode when they needed to make system calls. it was a complete rat's nest and you're better off ignoring it unless you're interested in how the whole sorry mess evolved in the name of compatability.
oh. haha. hhmmm... nice. i am already out of that for the past 4 years. but still just a little love on it cause i have lived a lot with Turbo C++ and trying to mimic the same in windows like the interrupts for monitoring processes like file system.
I am using default scrollbar for window. In OnSize i am calling SetScrollInfo() function whenever i am resizing the window. But in some situation the scrollbar is getting hidden, if i reduce or increase the size again scrollbar is becoming visible again. I checked the min and max position values but they are correct.
Are you also resetting your scroll ranges in your paint routine? You need to do this in order to take account of the current client window size and the amount of information you can display relative to the amount of information available. Remember that these values can change just by using a different size font for text or zooming an image.
Just say 'NO' to evaluated arguments for diadic functions! Ash
I am creating a application using GDI/PLus to save tiff as multiPage.
I got the Image object And tried
And its working fine
Then I used
to add other images.but its not working.
And It is accepting one parameter as EncoderParameter which is having option to set multi Frame as I think as I found tht type in c#.
Do anyone is having idea how can I add image as MultiPage.
It should be easy enough. Just make sure when calling the vendor supplied DLL to use explicit specialisations of CStringT e.g. CStringT< char, ChTraitsCRT<char> >. It might be a good idea to use a typedef for this.
Oh, one other thing - make sure that around including the header for the library TCHAR is defined as char and not wchar_t or the functions won't link properly.
PS: Looks like there are already typedefs in MFC for this sort of thing. Have a look in Alain's answer below for their names!