Click here to Skip to main content
15,885,366 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionShockwave object questions - strange behaviour, very frustrating Pin
sgergo25-Dec-10 23:15
sgergo25-Dec-10 23:15 
Questionresizing a dialog Pin
Krauze25-Dec-10 13:57
Krauze25-Dec-10 13:57 
AnswerRe: resizing a dialog Pin
Richard MacCutchan25-Dec-10 23:10
mveRichard MacCutchan25-Dec-10 23:10 
AnswerRe: resizing a dialog Pin
Maximilien26-Dec-10 4:11
Maximilien26-Dec-10 4:11 
QuestionHow to print from a service? Pin
martinergb24-Dec-10 21:19
martinergb24-Dec-10 21:19 
AnswerRe: How to print from a service? Pin
Dr.Walt Fair, PE25-Dec-10 7:54
professionalDr.Walt Fair, PE25-Dec-10 7:54 
GeneralRe: How to print from a service? Pin
martinergb26-Dec-10 2:04
martinergb26-Dec-10 2:04 
GeneralRe: How to print from a service? Pin
Ralf.Bue26-Dec-10 4:50
Ralf.Bue26-Dec-10 4:50 
The installed printer is a user profile property. If your service is running under SYSTEM account (see service property login), there is no printer available. You can verify this by running REGEDIT.EXE with the tool SrvAny under SYSTEM account. There is no key HKEY_CURRENT_USER\Printers for the user SYSTEM. It's the same with network drives.
Two solutions:
1. Configure your service to run under any local administrator account. So you can manually login with this account and config the printer before using it.
2. Run your service under SYSTEM account, open the explorer process and use this handle to call ImpersonateLoggedOnUser(), do printing and finally call RevertToSelf (some examples are available in MSDN). In this way the current logged on users printer (and all other settings) will be used.

Under Windows7/Vista/W2k8 interactive services are no more supported. That means you can not show any window or message box at current users desktop from within your service.
GeneralRe: How to print from a service? Pin
martinergb26-Dec-10 8:06
martinergb26-Dec-10 8:06 
GeneralRe: How to print from a service? Pin
Ralf.Bue30-Dec-10 8:22
Ralf.Bue30-Dec-10 8:22 
QuestionImage Flicker Pin
john563224-Dec-10 0:31
john563224-Dec-10 0:31 
GeneralRe: Image Flicker Pin
Luc Pattyn24-Dec-10 1:00
sitebuilderLuc Pattyn24-Dec-10 1:00 
AnswerRe: Image Flicker Pin
followait24-Dec-10 5:14
followait24-Dec-10 5:14 
AnswerRe: Image Flicker Pin
LunaticFringe24-Dec-10 7:10
LunaticFringe24-Dec-10 7:10 
AnswerRe: Image Flicker Pin
Stephen Hewitt25-Dec-10 1:11
Stephen Hewitt25-Dec-10 1:11 
AnswerRe: Image Flicker Pin
Rozis25-Dec-10 5:36
Rozis25-Dec-10 5:36 
Questionproblem with outlook application object Pin
dharani24-Dec-10 0:31
dharani24-Dec-10 0:31 
AnswerRe: problem with outlook application object Pin
Richard MacCutchan24-Dec-10 2:31
mveRichard MacCutchan24-Dec-10 2:31 
AnswerRe: problem with outlook application object Pin
Roger Broomfield24-Dec-10 4:19
Roger Broomfield24-Dec-10 4:19 
GeneralRe: problem with outlook application object Pin
Richard MacCutchan24-Dec-10 5:11
mveRichard MacCutchan24-Dec-10 5:11 
GeneralRe: problem with outlook application object Pin
Roger Broomfield24-Dec-10 5:38
Roger Broomfield24-Dec-10 5:38 
QuestionHow to check the memory leak Pin
yu-jian23-Dec-10 22:03
yu-jian23-Dec-10 22:03 
AnswerRe: How to check the memory leak Pin
jk chan23-Dec-10 22:39
jk chan23-Dec-10 22:39 
AnswerRe: How to check the memory leak Pin
Hadi Dayvary23-Dec-10 22:47
professionalHadi Dayvary23-Dec-10 22:47 
AnswerRe: How to check the memory leak Pin
T210224-Dec-10 2:37
T210224-Dec-10 2:37 

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.