Click here to Skip to main content
15,904,817 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can I print in dialog based? Pin
FearlessBurner7-Oct-03 0:04
FearlessBurner7-Oct-03 0:04 
AnswerRe: How can I print in dialog based? Pin
Mike Danberg7-Oct-03 17:26
Mike Danberg7-Oct-03 17:26 
GeneralProblem with MsChart-Ctrl Pin
AnTri6-Oct-03 21:12
AnTri6-Oct-03 21:12 
GeneralHelp with HTML help using RTF Pin
Azghar Hussain6-Oct-03 21:06
professionalAzghar Hussain6-Oct-03 21:06 
Generalthrow or throw new?; Pin
Bo Hunter6-Oct-03 19:50
Bo Hunter6-Oct-03 19:50 
GeneralRe: throw or throw new?; Pin
ZoogieZork6-Oct-03 20:22
ZoogieZork6-Oct-03 20:22 
GeneralRe: throw or throw new?; Pin
jhwurmbach6-Oct-03 22:45
jhwurmbach6-Oct-03 22:45 
QuestionHow to programmatically setting power button action? Pin
Member 3993596-Oct-03 19:30
Member 3993596-Oct-03 19:30 
Does anyone knows how to set power button action in Window2000 & WinXP? I found the API WriteGlobalPwrPolicy() to do that. But, it can't work properly. After I involved this API the return value is nonzero. This is means this API is success. Even so, the system's global power button action doesn't have been change. The following code is my testing code, please help me to check it if it has any wrong. Or, you can tell me any tip to do it.

Testing code:
GLOBAL_POWER_POLICY gpp;<br />
 ReadGlobalPwrPolicy(&gpp); // get current setting.<br />
 gpp.user.PowerButtonAc.Action = (POWER_ACTION)2; //2:Sleep<br />
   <br />
 if(WriteGlobalPwrPolicy(&gpp) == 0)<br />
    TRACE(_T("Failed!\n"));<br />
 else<br />
    TRACE(_T("Successful!\n"));<br />
 ReadGlobalPwrPolicy(&gpp);<br />
 TRACE(_T("PowerButtonAc.Action:%d\n"), gpp.user.PowerButtonAc.Action);


Relation resource:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/power/base/power_management_functions.asp

Thanks for your help!
Best regards,
Ryan
GeneralRe: (MFC) Need a list w/ multiple columns and children Pin
Mike Dimmick6-Oct-03 23:28
Mike Dimmick6-Oct-03 23:28 
GeneralExcel Locale Issue Pin
Derek Waters6-Oct-03 17:39
Derek Waters6-Oct-03 17:39 
GeneralRe: Excel Locale Issue Pin
David Crow7-Oct-03 3:04
David Crow7-Oct-03 3:04 
Generalhelp me Pin
don7cry6-Oct-03 17:36
don7cry6-Oct-03 17:36 
GeneralRe: help me Pin
xxhimanshu7-Oct-03 0:34
xxhimanshu7-Oct-03 0:34 
Generalload picture example Pin
azusakt6-Oct-03 16:03
azusakt6-Oct-03 16:03 
GeneralRe: load picture example Pin
xxhimanshu7-Oct-03 0:21
xxhimanshu7-Oct-03 0:21 
GeneralVT_CY and VT_DECIMAL Pin
Rome Singh6-Oct-03 15:25
Rome Singh6-Oct-03 15:25 
GeneralRe: VT_CY and VT_DECIMAL Pin
Mike Dimmick6-Oct-03 23:44
Mike Dimmick6-Oct-03 23:44 
GeneralRe: VT_CY and VT_DECIMAL Pin
Rome Singh7-Oct-03 0:40
Rome Singh7-Oct-03 0:40 
GeneralRe: VT_CY and VT_DECIMAL Pin
Mike Dimmick7-Oct-03 0:45
Mike Dimmick7-Oct-03 0:45 
GeneralRe: VT_CY and VT_DECIMAL Pin
Rome Singh7-Oct-03 0:49
Rome Singh7-Oct-03 0:49 
GeneralRe: VT_CY and VT_DECIMAL Pin
Rome Singh7-Oct-03 3:09
Rome Singh7-Oct-03 3:09 
GeneralRe: VT_CY and VT_DECIMAL Pin
Rome Singh7-Oct-03 2:49
Rome Singh7-Oct-03 2:49 
GeneralAutomatic dllname change in VC++ ide Pin
xylan6-Oct-03 15:03
xylan6-Oct-03 15:03 
GeneralRe: Automatic dllname change in VC++ ide Pin
FearlessBurner7-Oct-03 0:29
FearlessBurner7-Oct-03 0:29 
GeneralMaple !!! Help !!! Pin
tankhoasp6-Oct-03 15:02
tankhoasp6-Oct-03 15:02 

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.