Click here to Skip to main content
15,913,836 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C, Win32 API: painting on a tabcontrol Pin
Richard MacCutchan21-Feb-16 22:03
mveRichard MacCutchan21-Feb-16 22:03 
GeneralRe: C, Win32 API: painting on a tabcontrol Pin
Member 1213944222-Feb-16 1:38
Member 1213944222-Feb-16 1:38 
GeneralRe: C, Win32 API: painting on a tabcontrol Pin
Richard MacCutchan22-Feb-16 2:11
mveRichard MacCutchan22-Feb-16 2:11 
GeneralMessage Closed Pin
22-Feb-16 3:16
Member 1213944222-Feb-16 3:16 
GeneralRe: C, Win32 API: painting on a tabcontrol Pin
Richard MacCutchan22-Feb-16 3:20
mveRichard MacCutchan22-Feb-16 3:20 
AnswerRe: C, Win32 API: painting on a tabcontrol Pin
Graham Breach21-Feb-16 22:13
Graham Breach21-Feb-16 22:13 
GeneralRe: C, Win32 API: painting on a tabcontrol Pin
Member 1213944222-Feb-16 3:43
Member 1213944222-Feb-16 3:43 
GeneralRe: C, Win32 API: painting on a tabcontrol Pin
Richard MacCutchan22-Feb-16 4:28
mveRichard MacCutchan22-Feb-16 4:28 
AnswerRe: C, Win32 API: painting on a tabcontrol [Solved] Pin
Member 1213944222-Feb-16 11:31
Member 1213944222-Feb-16 11:31 
NewsCAysncSocket Notifications Pin
ForNow19-Feb-16 5:39
ForNow19-Feb-16 5:39 
GeneralRe: CAysncSocket Notifications Pin
Victor Nijegorodov23-Feb-16 1:50
Victor Nijegorodov23-Feb-16 1:50 
GeneralRe: CAysncSocket Notifications Pin
ForNow23-Feb-16 2:10
ForNow23-Feb-16 2:10 
GeneralRe: CAysncSocket Notifications Pin
Victor Nijegorodov23-Feb-16 23:01
Victor Nijegorodov23-Feb-16 23:01 
GeneralRe: CAysncSocket Notifications Pin
ForNow24-Feb-16 3:17
ForNow24-Feb-16 3:17 
GeneralRe: CAysncSocket Notifications Pin
Victor Nijegorodov24-Feb-16 5:36
Victor Nijegorodov24-Feb-16 5:36 
QuestionOpening a Second File from Explorer Pin
wdolson18-Feb-16 23:02
wdolson18-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
wdolson19-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
wdolson19-Feb-16 20:42 
GeneralRe: Opening a Second File from Explorer Pin
wdolson4-Mar-16 14:29
wdolson4-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
ForNow16-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
ForNow17-Feb-16 3:39 

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.