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

C / C++ / MFC

 
AnswerRe: C, Win32 API: painting on a tabcontrol Pin
Richard MacCutchan21-Feb-16 23:03
mveRichard MacCutchan21-Feb-16 23:03 
GeneralRe: C, Win32 API: painting on a tabcontrol Pin
Member 1213944222-Feb-16 2:38
MemberMember 1213944222-Feb-16 2:38 
GeneralRe: C, Win32 API: painting on a tabcontrol Pin
Richard MacCutchan22-Feb-16 3:11
mveRichard MacCutchan22-Feb-16 3:11 
GeneralRe: C, Win32 API: painting on a tabcontrol Pin
Richard MacCutchan22-Feb-16 4:20
mveRichard MacCutchan22-Feb-16 4:20 
AnswerRe: C, Win32 API: painting on a tabcontrol Pin
Graham Breach21-Feb-16 23:13
MemberGraham Breach21-Feb-16 23:13 
GeneralRe: C, Win32 API: painting on a tabcontrol Pin
Member 1213944222-Feb-16 4:43
MemberMember 1213944222-Feb-16 4:43 
GeneralRe: C, Win32 API: painting on a tabcontrol Pin
Richard MacCutchan22-Feb-16 5:28
mveRichard MacCutchan22-Feb-16 5:28 
AnswerRe: C, Win32 API: painting on a tabcontrol [Solved] Pin
Member 1213944222-Feb-16 12:31
MemberMember 1213944222-Feb-16 12:31 
NewsCAysncSocket Notifications Pin
ForNow19-Feb-16 6:39
MemberForNow19-Feb-16 6:39 
GeneralRe: CAysncSocket Notifications Pin
Victor Nijegorodov23-Feb-16 2:50
MemberVictor Nijegorodov23-Feb-16 2:50 
GeneralRe: CAysncSocket Notifications Pin
ForNow23-Feb-16 3:10
MemberForNow23-Feb-16 3:10 
GeneralRe: CAysncSocket Notifications Pin
Victor Nijegorodov24-Feb-16 0:01
MemberVictor Nijegorodov24-Feb-16 0:01 
GeneralRe: CAysncSocket Notifications Pin
ForNow24-Feb-16 4:17
MemberForNow24-Feb-16 4:17 
GeneralRe: CAysncSocket Notifications Pin
Victor Nijegorodov24-Feb-16 6:36
MemberVictor Nijegorodov24-Feb-16 6:36 
QuestionOpening a Second File from Explorer Pin
wdolson19-Feb-16 0:02
Memberwdolson19-Feb-16 0:02 
AnswerRe: Opening a Second File from Explorer Pin
Jochen Arndt19-Feb-16 0:51
professionalJochen Arndt19-Feb-16 0:51 
GeneralRe: Opening a Second File from Explorer Pin
wdolson19-Feb-16 1:31
Memberwdolson19-Feb-16 1:31 
GeneralRe: Opening a Second File from Explorer Pin
Jochen Arndt19-Feb-16 1:55
professionalJochen Arndt19-Feb-16 1:55 
GeneralRe: Opening a Second File from Explorer Pin
Richard MacCutchan19-Feb-16 2:02
mveRichard MacCutchan19-Feb-16 2:02 
GeneralRe: Opening a Second File from Explorer Pin
wdolson19-Feb-16 21:42
Memberwdolson19-Feb-16 21:42 
GeneralRe: Opening a Second File from Explorer Pin
wdolson4-Mar-16 15:29
Memberwdolson4-Mar-16 15: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 14:20
MemberForNow16-Feb-16 14:20 
AnswerRe: CAsyncSocket::connect ipaddr ? Pin
Richard MacCutchan16-Feb-16 23:12
mveRichard MacCutchan16-Feb-16 23:12 
GeneralRe: CAsyncSocket::connect ipaddr ? Pin
ForNow17-Feb-16 4:39
MemberForNow17-Feb-16 4:39 
GeneralRe: CAsyncSocket::connect ipaddr ? Pin
Richard MacCutchan17-Feb-16 5:22
mveRichard MacCutchan17-Feb-16 5:22 

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.