Solved

Clipboard Cut, Copy, Paste Handlers

Posted on 1998-02-16
3
285 Views
Last Modified: 2013-11-20
I am working on a MDI client/server appliaction where if I am calling the OnEditCut, OnEditPaste and OnEditCopy while running the application at Windows Nt 4.0  it loses focus. The same handlers are working okay if the application is run on Windows 95.
0
Comment
Question by:shye
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Expert Comment

by:jtwine100697
ID: 1316236
No idea WHY that is happening, but you might be able to kludge it by calling SetForegroundWindow() after your calls to OnExitXxxx().  Or maybe a short duration timer...

(Just so you can make it work in the meantime.)

-=- James.
0
 
LVL 11

Accepted Solution

by:
mikeblas earned 100 total points
ID: 1316237
Why would you call those functions?  They're message handlers, designed to be called by MFC in response to a message.  It doesn't make much sense to call them directly yourself, and depending on exactly how you do so, you can crash or corrupt your system.

You should be calling the CEdit::Copy() or CEdit::Cut(), or CEdit::Paste() methods. You shoudln't call event handlers.

.B ekiM
0
 
LVL 4

Expert Comment

by:jtwine100697
ID: 1316238
Hmmm..  I shoulda read the question closer...  Mikeblas is correct.  Usually, any OnXxxx() functions are called by the framework in response to a message (action).

That actually might be your problem!

-=- James.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
windows 10 how make picture as desktop background 2 73
VBA "SendKeys" Syntax for Multiple Keystrokes 7 133
ShiftLeft challenge 21 96
scoreUp challenge 14 74
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question