|
Rob Manderson wrote:
you can read morse code?
Mmmmm... no. But my ham license is coming up for renewal next year and I'd like to upgrade. I passed the General class written test on a lark 8 years ago when I tested for the Technician grade, and the Extra class test doesn't add much to it, so I figure I might as well go all the way next year. But Morse is still required for all licenses above Technician, so I still have to learn it. Rather than forking out $30 for training software I thought I'd spend a day creating my own, and getting more C++ practice while I'm at it. It looks like it's going to take 2 days, though...
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
...fer gosh sakes:
void TD_Hlp_SoundNote(short nNoteIndex, short duration) {
#if defined(_X86_)
int notes[] = { 9121, 8609,
8126, 7670, 7239, 6833, 6449, 6087, 5746, 5423,
5119, 4831, 4560, 4304, 4063, 3834, 3619, 3416,
3224, 3043, 2873, 2711 , 2559, 2415, 2280, 2152,
2031, 1917, 1809, 1715, 1612, 1521, 1436, 1355,
1292, 1207, 1140
};
short note = notes[nNoteIndex];
_asm {
mov al, 182;
out 43h, al;
mov ax, note;
out 42h, al;
mov al, ah;
out 42h, al;
in al, 61h;
or al, 00000011b;
out 61h, al;
mov bx, duration;
pause1:
mov cx, 65535;
pause2:
dec cx;
jne pause2;
dec bx;
jne pause1;
in al, 61h;
and al, 11111100b;
out 61h, al;
}
#else
#pragma message("TDHlpFns.c: i386 specific speaker code removed")
#endif // defined(i386)
Download and modify the _TestDrv1.sys driver code here[^] - add some new DeviceControl call functionality and away you go.
Sigh... these kids today. Now when I was a little girl...
Well, yes, it is a bit of a blatant plug but sometimes when you post an article that starts with a 'Y' on a busy day it doesn't ge into the latest updates and tends to languish in obscurity pining for the fjiords and stuff so what the heck...
|
|
|
|
|
Sweet... Nice article, too, the 1.64% of it I could understand. I guess maybe it's time to install this Windows Driver Development Kit CD I've been using as a coaster for the past 6 months. The asm code above looks lovely - how I miss real programming, the kind where you turn the individual bits on and off yourself. It also looks to be highly dependent on clock speed and processor instruction cycle counts and so would probably not do a great job of sounding a tone for a specified number of mSecs without some additional tweaking.;P
Tim Deveaux wrote:
tends to languish in obscurity pining for the fjiords and stuff
Yes, I do that a lot myself some weeks...
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
I _think_ the 8253 programmable timer operates on its own 14.31818 frequency, so this code should port.
Still, might sound a bit different depending on your speaker.
And be careful - people who use DDK CDs as coasters run the risk of becoming project managers...
|
|
|
|
|
Tim Deveaux wrote:
the risk of becoming project managers...
I did that for many years - BOOOORRRRRIIINNNGGGGG!!!
Hmmmm, now that you mention it, I think you're right about the 8253.
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
Hi everyone....
hey friends.... i would like to know that how to make an application like notepad....that is how it opens an already existing text file and how does it save.....how to use cut copy paste....with the application....I want to do that without using the the application wizard (exe); I wanna do that manually....if there are examples on the net then do help me....
Please help me regarding the above.
Regards,
Ruchit Sharma. R
|
|
|
|
|
One solution is to simply create a new MFC project that utilizes a CEditView. You will have to manage the text data in the document class.
Kuphryn
|
|
|
|
|
Hi all,
How can I change caption on Ok, Cancel, ... on AfxMessageBox, but I don't like create a new class.
Thanks all,
Best regards
|
|
|
|
|
How about creating a custom dialog box?
Kuphryn
|
|
|
|
|
Hi All,
There are any one knows "maximum item in CListCtrl"
Thanks all,
|
|
|
|
|
Are you wanting to know the count of items currently in a list control, or the maximum number of items that can be inserted into a list control? For the former, use GetItemCount() . For the latter, I assume it's governed by the amount of available RAM. Stuffing a list control with that many items is suspect in terms of practicality.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hi all. Recently I have asked how to load a JPEG file in my currently written MFC programming and some have reply on using cximage or GDI+. However I face difficulties in implementing them in my application because the example I found contains lots and lots of code and I do not know what to do with them. I just need to load a JPEG file and then do some image processing with it. Can anyone give me a more clearer idea of how to do it? Thank you for any advise.
|
|
|
|
|
Please look out the link below It uses win32.Hope it will help you.
http://forums.devshed.com/t63516/s.html
|
|
|
|
|
try CxImage here in CP wonderfull class
Should get the job done
Hope it Helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Hallo,
currently I am working on an application with a status bar. For the displayed text it uses strings from a resource string table in the project file by using the "SetIndicators" function.
Unfortunately these constant strings are in German and it is my task to make the application able to change languages dynamically. How do I change the texts displayed by the status bar without reprogramming the entire control?
Thanks,
StHubi
"Have no fear, the saint is here!"
|
|
|
|
|
I have exited my application,why the process still lives in the "Windows Task manager"???
Plese help me!
Rap off for you,for me,for our human.
|
|
|
|
|
Are You using some Third Party Lib ?
It happened to me When i was programming Dialogic Boards as it turned out the SDK was Buggy
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Two reasons I can think of. One is common, another is more rare.
The common reason is that you haven't actually posted a quit message to the thread, so the thread is blocked waiting for a message that will never arise. This is more common in Win32 SDK programs. You should PostQuitMessage in response to a WM_NCDESTROY message. If using MFC, it should have done this for you, unless you've overloaded PostNcDestroy and not called the base class, IIRC.
The rare reason is that something has deadlocked in DllMain. You can get this problem if you try to wait for an object in DllMain, or sometimes if you release a COM object in a static object's destructor. Check the rules for DllMain. Destructors for static objects run in the scope of DllMain for static objects in DLLs.
|
|
|
|
|
hi!...
i have two view-drived class in my app.
and i use these two views on either pane of my splitted-window SDI app.
i have a treeCtrl on one view and a property sheet (tab view) on other view pane.
i would like to change tab pages when i chose a treeCtrl item.
how will i handle 2. view handle and set the right tab page?
how is that possible to pass data between two classes that are not child of the same parent in the same application?
is there an easy step to get handles of whatever window, child, controls in an application (SDI or Dialog based?)
thanks for all,,,
atilla.
just listening to you...
|
|
|
|
|
In
CMainFrame::OnCreateClient(..)
{
CMYView1 *pView1 = (CMyView1*)m_wndSplitter.GetPane(0,0);
pView1->m_pView2 = (CMyView2*)m_wndSplitter.GetPane(0,1);
}
Hope it Helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
thanks..worked!
wish god helps u too!
atilla.
just listening to you...
|
|
|
|
|
Hi All,
I want to know whether there is any limit on number of lines i write in any c or c++ program.
Is there any limit after which if i compile program compiler will give me fatal error.
If i get any links related to Compiler limitations regarding program length limitations etc will be helpful.
Thanks and Regards
Tushar Mahajan
|
|
|
|
|
humm, dont know but i do remember when i used to program in Turbo C and i didnt know much about modularising of code, all the code was in one .c file one day the compiler cried about it being too long.
but i guess its all compiler dependend, and may be memory dependend also.
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
Hi,
I am writiing AVStream Driver for capturing Video.
Being a novice in this field of device drivers I need some help, Some tutorials.
So if anyone of you has any link for online resources please help me with that.
Also can anybody tell me how can my Driver talk to other Video capture drivers.
Thanks in advance
Sohail Kadiwala
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hello
I am doing a keybaord hook and i need to ignore the keystrokes going into the applicaiton.
Like if user type A i have to make this A null
Thanks in advance
with regards
vimal
|
|
|
|
|