Click here to Skip to main content
14,664,816 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CAysncSocket Notifications Pin
Victor Nijegorodov24-Feb-16 5:36
MemberVictor Nijegorodov24-Feb-16 5:36 
QuestionOpening a Second File from Explorer Pin
wdolson18-Feb-16 23:02
Memberwdolson18-Feb-16 23:02 
AnswerRe: Opening a Second File from Explorer Pin
Jochen Arndt18-Feb-16 23:51
professionalJochen Arndt18-Feb-16 23:51 
GeneralRe: Opening a Second File from Explorer Pin
wdolson19-Feb-16 0:31
Memberwdolson19-Feb-16 0:31 
GeneralRe: Opening a Second File from Explorer Pin
Jochen Arndt19-Feb-16 0:55
professionalJochen Arndt19-Feb-16 0:55 
GeneralRe: Opening a Second File from Explorer Pin
Richard MacCutchan19-Feb-16 1:02
mveRichard MacCutchan19-Feb-16 1:02 
GeneralRe: Opening a Second File from Explorer Pin
wdolson19-Feb-16 20:42
Memberwdolson19-Feb-16 20:42 
GeneralRe: Opening a Second File from Explorer Pin
wdolson4-Mar-16 14:29
Memberwdolson4-Mar-16 14:29 
It took me a few days to get back to this, then I ran into a few dead ends before hitting on the solution to get IDropTarget to work for my application. In the end Michael Dunn's article from here on CodeProject:

was the best way forward.

However once I got IDropTarget working, I ended up discovering my original problem had to do with locking my app down to one instance. A couple of years ago when this project was still in its infancy I used PJ Naughter's CSingleInstance class () to check and see if there was an instance of the program already running and if there was, switch to that instance.

A second instance would start when I double clicked on a file associated with the program when an instance was already running. When the second instance is detected, it sends a message to the original instance to take focus and quits. PJ Naughter conveniently created a means to send the command line from the second instance to the first before quitting, so I took advantage of that and now the first instance loads the file correctly on double click.

Implementing IDropTarget in the end turned out to not be necessary, but it will be a nice feature to allow users to drag and drop files into the program.

It also expanded my understanding of COM, which I may need to understand better down the road. I need to do a lot of communication between programs as part of this project and I will need to do a lot more inter-program communication down the road.

Just thought I would post an update for future reference if someone comes across a similar problem in the future and finds this thread.

Thanks for the help!
QuestionCAsyncSocket::connect ipaddr ? Pin
ForNow16-Feb-16 13:20
MemberForNow16-Feb-16 13:20 
AnswerRe: CAsyncSocket::connect ipaddr ? Pin
Richard MacCutchan16-Feb-16 22:12
mveRichard MacCutchan16-Feb-16 22:12 
GeneralRe: CAsyncSocket::connect ipaddr ? Pin
ForNow17-Feb-16 3:39
MemberForNow17-Feb-16 3:39 
GeneralRe: CAsyncSocket::connect ipaddr ? Pin
Richard MacCutchan17-Feb-16 4:22
mveRichard MacCutchan17-Feb-16 4:22 
QuestionMFC Fragility to multiple threads Pin
Bram van Kampen11-Feb-16 13:43
MemberBram van Kampen11-Feb-16 13:43 
AnswerRe: MFC Fragility to multiple threads Pin
Jochen Arndt11-Feb-16 21:19
professionalJochen Arndt11-Feb-16 21:19 
AnswerRe: MFC Fragility to multiple threads Pin
CPallini11-Feb-16 21:37
mveCPallini11-Feb-16 21:37 
GeneralRe: MFC Fragility to multiple threads Pin
Bram van Kampen15-Feb-16 14:32
MemberBram van Kampen15-Feb-16 14:32 
AnswerRe: MFC Fragility to multiple threads Pin
Albert Holguin12-Feb-16 3:53
professionalAlbert Holguin12-Feb-16 3:53 
GeneralRe: MFC Fragility to multiple threads Pin
Bram van Kampen16-Mar-16 14:15
MemberBram van Kampen16-Mar-16 14:15 
AnswerRe: MFC Fragility to multiple threads Pin
Leif Simon Goodwin14-Mar-16 5:09
mvaLeif Simon Goodwin14-Mar-16 5:09 
QuestionUSB3 port: Programmatically force it to operate in USB2 mode Pin
Leif Simon Goodwin11-Feb-16 2:55
mvaLeif Simon Goodwin11-Feb-16 2:55 
AnswerRe: USB3 port: Programmatically force it to operate in USB2 mode Pin
Richard MacCutchan11-Feb-16 4:09
mveRichard MacCutchan11-Feb-16 4:09 
GeneralRe: USB3 port: Programmatically force it to operate in USB2 mode Pin
Leif Simon Goodwin11-Feb-16 6:48
mvaLeif Simon Goodwin11-Feb-16 6:48 
GeneralRe: USB3 port: Programmatically force it to operate in USB2 mode Pin
Richard MacCutchan11-Feb-16 10:01
mveRichard MacCutchan11-Feb-16 10:01 
GeneralRe: USB3 port: Programmatically force it to operate in USB2 mode Pin
Leif Simon Goodwin16-Feb-16 3:20
mvaLeif Simon Goodwin16-Feb-16 3:20 
AnswerRe: USB3 port: Programmatically force it to operate in USB2 mode Pin
Kornfeld Eliyahu Peter11-Feb-16 7:29
mveKornfeld Eliyahu Peter11-Feb-16 7:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.