home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!flop.ENGR.ORST.EDU!flop.ENGR.ORST.EDU!usenet
- From: viswanm@jasper.CS.ORST.EDU (Mahesh Viswanathan)
- Newsgroups: comp.os.ms-windows.programmer.misc
- Subject: List of Tasks, or Modules
- Message-ID: <1dujniINN55j@flop.ENGR.ORST.EDU>
- Date: 12 Nov 92 21:52:50 GMT
- Article-I.D.: flop.1dujniINN55j
- Distribution: usa
- Organization: Computer Science Department, Oregon State University
- Lines: 74
- NNTP-Posting-Host: jasper.cs.orst.edu
-
- Hi,
-
- I am fairly new to MS-Windows, and am programming under BC++ 3.1.
-
- I have a question. I am trying to write a simple program that will
- let me use the left mouse button to CUT, and the right button
- to PASTE. I hate going up to the edit menu to do a Send, every time.
-
- So, basically, this is what I want to do:
-
- write a program that will look for the Terminal module, and if it
- exists, it will filter all mouse messages to that window, and
- substitute them with that, and the keystrokes for a CUT operation
- for the left button, and similarly a PASTE operation for the
- right button.
-
- If this strategy is right, I have further problems.
- 1. When I try using the ModuleFirst/ModuleNext functions to find
- "Terminal", I don't get any listing of Modules at all!! And,
- it is the same thing if I do the TaskFirst/TaskNext thing.
- Here's the piece of code I am using......
-
- ________________________________________________________________
-
- long FAR PASCAL WndProc (HWND hWnd, WORD iMessage, WORD wParam,
- LONG lParam)
-
- <stuff deleted....>
- static MODULEENTRY meModule;
- static char szBuffer[40];
- static BOOL notalldone;
- static MODULEENTRY FAR* pmeModule = &meModule;
-
- <stuff deleted....>
- switch (iMessage)
- {
- case WM_PAINT:
-
- hDC = BeginPaint(hWnd, &PtStr);
- x = 1; y = 1;
- notalldone = ModuleFirst(pmeModule);
- while (notalldone)
- {
- wsprintf(szBuffer, "%s %d", meModule.szModule,
- meModule.hModule);
- TextOut(hDC, x, y, meModule.szModule, 40);
- y +=nYChar;
- notalldone = ModuleNext(pmeModule)
- | (y >= PtStr.rcPaint.bottom);
- }
-
- EndPaint(hWnd, &PtStr);
- return 0;
-
- <stuff deleted...>
-
- __________________________________________________________________________
-
-
- Any pointers would be much appreciated. Also, since I don't read this
- newsgroup on a frequent basis (yet :-) ) , could you mail me a reply
- to
- viswanm@research.cs.orst.edu?
-
- Thanks!!
-
- Mahesh
-
-
-
- --
- Mahesh Viswanathan | viswanm@research.cs.orst.edu
- 279B SE Lilly | (503)-752-0779
- Corvallis OR 97333 |
-