Click here to Skip to main content
16,008,183 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to include a dll and a lib files into a VS project Pin
Garth J Lancaster23-May-10 12:56
professionalGarth J Lancaster23-May-10 12:56 
GeneralRe: How to include a dll and a lib files into a VS project Pin
Schehaider_Aymen23-May-10 12:57
Schehaider_Aymen23-May-10 12:57 
QuestionStarting a password protected NT Service [modified] Pin
pubis23-May-10 9:13
pubis23-May-10 9:13 
AnswerRe: Starting a password protected NT Service Pin
Aescleal23-May-10 9:59
Aescleal23-May-10 9:59 
GeneralRe: Starting a password protected NT Service Pin
pubis23-May-10 10:15
pubis23-May-10 10:15 
GeneralRe: Starting a password protected NT Service Pin
Aescleal23-May-10 10:24
Aescleal23-May-10 10:24 
GeneralRe: Starting a password protected NT Service Pin
pubis23-May-10 10:56
pubis23-May-10 10:56 
QuestionWM_QUERYENDSESSION problem on C++ Builder 2010 Pin
Member 88968923-May-10 7:06
Member 88968923-May-10 7:06 
I have the following code:

....
private:

void __fastcall WMQueryEndSession(TWMQueryEndSession& Message);
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(WM_QUERYENDSESSION, TWMQueryEndSession, WMQueryEndSession)
END_MESSAGE_MAP(TForm)

.....


void __fastcall TForm1::WMQueryEndSession(TWMQueryEndSession & Message)
{
Message.Result=0;
}

Compiled by C++ Builder 2010, the code works improperly. Although it prevents the computer from shut down, but it also closes my application. The code below fixes the problem, but it is not stable (sometimes does not work) and the such long delay in 10 seconds is not acceptable in my case:


void __fastcall TForm1::WMQueryEndSession(TWMQueryEndSession& Message)
{
Sleep(10000);
Message.Result=0;
}

Does enybody know how to fix the problem? Thanks.
AnswerRe: WM_QUERYENDSESSION problem on C++ Builder 2010 Pin
ARopo24-May-10 6:26
ARopo24-May-10 6:26 
GeneralRe: WM_QUERYENDSESSION problem on C++ Builder 2010 Pin
Member 88968924-May-10 13:36
Member 88968924-May-10 13:36 
QuestionC++ String Creation Pin
sikas_Cisco23-May-10 4:57
sikas_Cisco23-May-10 4:57 
AnswerRe: C++ String Creation Pin
Dr.Walt Fair, PE23-May-10 5:18
professionalDr.Walt Fair, PE23-May-10 5:18 
AnswerRe: C++ String Creation Pin
John R. Shaw23-May-10 7:21
John R. Shaw23-May-10 7:21 
GeneralRe: C++ String Creation Pin
sikas_Cisco23-May-10 8:55
sikas_Cisco23-May-10 8:55 
AnswerRe: C++ String Creation Pin
Aescleal23-May-10 9:36
Aescleal23-May-10 9:36 
QuestionIntel Compiler IA-32 11.0.061 installation on VS 2010 question Pin
Chesnokov Yuriy23-May-10 4:07
professionalChesnokov Yuriy23-May-10 4:07 
QuestionOLE interface for Crichedit Pin
ForNow22-May-10 19:27
ForNow22-May-10 19:27 
Questionnew vs free and malloc vs delete Pin
msr_codeproject22-May-10 18:24
msr_codeproject22-May-10 18:24 
AnswerRe: new vs free and malloc vs delete Pin
loyal ginger22-May-10 19:01
loyal ginger22-May-10 19:01 
AnswerRe: new vs free and malloc vs delete Pin
Stephen Hewitt22-May-10 22:11
Stephen Hewitt22-May-10 22:11 
AnswerRe: new vs free and malloc vs delete Pin
Aescleal23-May-10 5:39
Aescleal23-May-10 5:39 
AnswerRe: new vs free and malloc vs delete Pin
John R. Shaw23-May-10 6:23
John R. Shaw23-May-10 6:23 
AnswerRe: new vs free and malloc vs delete Pin
MS_TJ23-May-10 19:52
MS_TJ23-May-10 19:52 
GeneralRe: new vs free and malloc vs delete Pin
Aescleal24-May-10 4:25
Aescleal24-May-10 4:25 
Questionopen txt file form web or ftp ? Pin
da_22-May-10 3:38
da_22-May-10 3:38 

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.