Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Clipboard Cut, Copy, Paste Handlers

Posted on 1998-02-16
3
Medium Priority
?
288 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 200 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

719 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