Unless you absolutely have to have ONLY 3 views why don't you use standard CSplitter CreateStatic and create CSplitter frame with 4 views? Than let the MFC do the dirty work. No need to customize anything.
Inherit your application view class from CFormView. This enables you to have controls on the view just like you would have on a dialog. For your usage I think this is suitable and it saves time. Check for online samples too...
I have a question about how to hook HW interrupt in flat memory mode...Maybe you can give me some directions...
@ about my application...
- created by combining Watcom C and DOS32/A.
- written for running on DOS mode( not on OS mode )
- with DOS32/A now I can access >1M memory and allocate large memory to use...(running in flat memory mode !!!)
@ current issue...
- I want to write an ISR(interrupt service routine) for one PCI card. Thus I need to "hook" the HW interrupt to test...
- For example, the PCI card's interrupt line(0x3C) = 0xE in DOS mode. That means this device will issue interrupt via 8259's IRQ 14.
But... I did not how to achieve my goal to hook this interrupt in "flat mode" ?
@ reference I found...
- in watcom C's library doc, there is one sample using _dos_getvect, _dos_setvect, and _chain_intr to hook INT 0x1C...I tested this code and found OK.
But when I apply it to my case: INT76 ( where IRQ 14 is "INT 0x76" due to (14-8) + 0x70 )then nothing happened...
* I have checked HW interrupt is truly generated but my own ISR did NOT invoked...
Do I lose something ? or are there any functions I can use (in DOS32/A) to achieve my goal ?
With your sample app that hooks INT 0x1C, was that also running in flat-mode?
That is to say - the 80x86 family run in two modes - one that has a flat address-space and the other that has segmented memory space.
When in segmented mode (DOS) there's a table that holds the address of all of the ISRs. To hook an interrupt, you simply grab the table entry you want then overwrite it with the address of your own routine. Inside your routine you do what you need, calling the original routine before, after your code or not at all. When you want to remove the hook, you simply re-write the table entry.
While in protected mode (win,linux,dos4gw/dos32a) memory is arranged quite differently. You don't have a globally accessable place that you can just read and write in quite the same way. You have the beasts known as Interrupt Descriptor Table.
I spent a long time 15 years ago trying to roll-my-own code that would enter protected mode. I've got vague memories of having trouble wrapping my head around the IDT & GDT.
What I'm getting at, is that I can't be sure that the functions you're calling are intended for flat-mode. If the ISR is running in flat-mode, you can't even address it in the 4 bytes that each entry has in a real-mode IDT.
I also don't quite follow the formula you've used to come up with int 0x76
You know what I'd probably be doing? Downloading the source-code for some old games that used the dos4g/w extended and looking there for some hints. You should find something in either the timing or the sound code. The one that immediately comes to mind is Doom. Don't remember if Duke Nukem 3d was too I beleive Rise Of The Triad - ROTT used the watcom compiler. A lot of games by iD, Apogee & 3dRealms of the era used the extender.
My app runs at "flat memory mode" in DOS(by DOS extender -DOS/32A). I added the sample code to hook INT 0x1C in my app then found OK ! Thus that code should be running in flat mode ^_^
Another example demonstrating if app is in flat mode maybe: if allocating memory on this mode, get the offset address of this pointer then I got 4-byte address ! ( If in real mode, the offset address will be 2byte because real mode is SEG:OFF format...)
As you said memory is arranged quite differently with dos extender BUT I think there must be handy APIs provided by DOS/32A to achieve this goal because it is a common demand...
And 0x76 comes in below statement: "DOS/32 Advanced will install real mode IRQ callbacks for all 16 hardware interrupts (IRQ 0-7, IRQ 8-15 = INT 08-0Fh, INT 70-77h)"
Because my device use IRQ14 thus (14-8)+0x70 = 0x76 and it is the interrupt number CPU got to calculate the entry of ISR !
I feel hard, since the width of the string in the input file is not fixed varying from 50 character to 120, so how to specify the buffer size.
If the size varies, you have to specify the maximum size, the smaller string will fit just fine in the larger strings array.
I used 'scanf' to read input, I do not need to specify the length of the string.
Yes, but this was a frequent cause of crashes due to buffer overflows, you don't HAVE to use scanf_s, if the previous version worked just fine for you, you can disable the warning with a pragma comment.
i am stuck with a problem while working with Windows CE 5.0 on handheld device.I am using Embedded VC++(eVC++) with programming in C++(MFC).
i want to set the value "Never" to a Switch state to Suspend dropdown programmatically.
This dropdown is located in settings>>Power properties.
Hi,everyone,Can i use vc++6.0 with aforge(from aforgenet.com)? i see there are framework in aforget,so i am not sure if it is possible to use vc6.0 and aforge together?looking forwards to reply,thanks.
I implemented a multi touch application. I follow MSDN tutorial using manipulation interface, here: http://msdn.microsoft.com/en-us/library/windows/desktop/dd371408(v=vs.85).aspx[^]
But I have many problems when panning or zooming, is not redrawing and glitches in scrren. I need to limit my CView and do panning when screen is bigger than CFrameWnd, because CFramewnd does not redraw. I don't know how to get frame size and limit CView to don't pass CFrameWnd size. I tried an anchor or dock window but did not work.
Please, I need any help.
I'm using GetWindowRect like MSDN example. But I have problems when panning. I have a CView with same size as CFrameWnd, if I move the screen beyond origin the screen does not redraw. What I need is do a panning only if my CVIew is bigger than my parent frame, and don't if Cview is in origin. I tried getting screen limits but does not work. Example:
________________ --->CFrameWnd - Glitches and does not redraw | | | ___________|____ ---> CView - out of screen origin | | | | | | | | | | | | | | | |__|_______________|
Hey, everyone! I want to use one of the Find() methods with a richtextbox(RichTextmethod.Find Method(String, RichTextBox)) and i'd like to no if i might use a textbox's text instead of the string used in this method. thanks
You should at least try doing your homework yourself.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
What appears to be the quick and easy way now, i. e. copying the solution from any of the links provided here, is in fact the path of enduring pain:
Copying does not teach you anything. When you're asked to do your next homework, you will not be prepared to do that either, because you are lacking the basic knowledge. You could of course repeatedly copy your homework from others, but that will just exacerbate the problem. As a result, you will eventually fail in the exams.
The longer you wait to actually do your assignments yourself, the harder it will be to catch up on the lost knowledge. And the harder it will be to be motivated about it.
OTOH, if you keep doing your homework and manage to solve it successfully yourself, that success will offer a sense of accomplishment that you'll never experience when copying other people's work.
If you have truly a problem to arrive at the solution, write down what you did so far and where, exactly, you are stuck. We will gladly offer help to make you understand and solve the problem. But - in your own best interest - we will not simply post the full solution without further comment.
Know that the only way to learn programming is practice! No amount of reading (or copying) can make up for the experience you gain from actually writing a program and seeing it work (or fail, more likely).
You can not copy experience: only you can collect it!