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

C / C++ / MFC

 
AnswerRe: QueryDosDevice() throws ERROR_ACCESS_DENIED for Windows universal apps Pin
Richard Andrew x6422-Feb-16 8:41
professionalRichard Andrew x6422-Feb-16 8:41 
GeneralRe: QueryDosDevice() throws ERROR_ACCESS_DENIED for Windows universal apps Pin
vikramlinux23-Feb-16 5:41
Membervikramlinux23-Feb-16 5:41 
GeneralRe: QueryDosDevice() throws ERROR_ACCESS_DENIED for Windows universal apps Pin
Richard Andrew x6423-Feb-16 5:51
professionalRichard Andrew x6423-Feb-16 5:51 
GeneralRe: QueryDosDevice() throws ERROR_ACCESS_DENIED for Windows universal apps Pin
vikramlinux29-Feb-16 5:10
Membervikramlinux29-Feb-16 5:10 
Questionhow to disable uac prompt programmatically Pin
shanmugarajaa21-Feb-16 23:33
Membershanmugarajaa21-Feb-16 23:33 
AnswerRe: how to disable uac prompt programmatically Pin
Richard MacCutchan21-Feb-16 23:43
mveRichard MacCutchan21-Feb-16 23:43 
AnswerRe: how to disable uac prompt programmatically Pin
Jochen Arndt21-Feb-16 23:52
professionalJochen Arndt21-Feb-16 23:52 
GeneralRe: how to disable uac prompt programmatically Pin
shanmugarajaa22-Feb-16 0:08
Membershanmugarajaa22-Feb-16 0:08 
GeneralRe: how to disable uac prompt programmatically Pin
Jochen Arndt22-Feb-16 0:26
professionalJochen Arndt22-Feb-16 0:26 
QuestionC, Win32 API: painting on a tabcontrol [Solved] Pin
Member 1213944221-Feb-16 12:21
MemberMember 1213944221-Feb-16 12:21 
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
MemberMember 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 
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
MemberGraham Breach21-Feb-16 22:13 
GeneralRe: C, Win32 API: painting on a tabcontrol Pin
Member 1213944222-Feb-16 3:43
MemberMember 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
MemberMember 1213944222-Feb-16 11:31 
NewsCAysncSocket Notifications Pin
ForNow19-Feb-16 5:39
MemberForNow19-Feb-16 5:39 
GeneralRe: CAysncSocket Notifications Pin
Victor Nijegorodov23-Feb-16 1:50
MemberVictor Nijegorodov23-Feb-16 1:50 
GeneralRe: CAysncSocket Notifications Pin
ForNow23-Feb-16 2:10
MemberForNow23-Feb-16 2:10 
GeneralRe: CAysncSocket Notifications Pin
Victor Nijegorodov23-Feb-16 23:01
MemberVictor Nijegorodov23-Feb-16 23:01 
GeneralRe: CAysncSocket Notifications Pin
ForNow24-Feb-16 3:17
MemberForNow24-Feb-16 3:17 
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 
I'm working in MFC under Visual Studio 2010.

I've got my program associated with a file extension and clicking on a file of that type in Windows Explorer will open the program and load that file. All's well so far. Now I need to be able to click on another file of the type from WE and load that file into the same instance of the program already running. What happens now when I click on another file is the focus just switches to the program and nothing loads.

When the program isn't running and you click on a file associated with it, the program starts and in the loading of the App instance you check the command line, which is loaded into a CCommandLineInfo structure and the program deals with the command. I can't figure out how to get the second file to load when the program is already running by selecting it in WE (opening a file from within the program has been working fine from the start).

I have looked at WM_ACTIVATE and WM_ACTIVATEAPP which are called when the program gets focus while running, but I don't know how you would get the information about the file just selected in Windows Explorer. I'm probably missing some key terminology in my searches. I can't find any information on how to do this. Maybe I'm slow kid in class today...

Additionally if I select multiple files in Windows Explorer and open them at the same time, it opens multiple instances of the program instead of opening one instance any loading those files into that one instance. Is there any way to handle that?

Thanks

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.