Click here to Skip to main content
16,007,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to optimize this code? Pin
Christian Graus6-Feb-05 9:31
protectorChristian Graus6-Feb-05 9:31 
GeneralRe: How to optimize this code? Pin
Chris Losinger6-Feb-05 10:35
professionalChris Losinger6-Feb-05 10:35 
AnswerRe: How to optimize this code? Pin
Tim Smith6-Feb-05 17:12
Tim Smith6-Feb-05 17:12 
GeneralDisabling linker warning messages Pin
Tom Archer6-Feb-05 4:48
Tom Archer6-Feb-05 4:48 
GeneralToolbar double click Pin
Joris van der Pol6-Feb-05 4:10
Joris van der Pol6-Feb-05 4:10 
GeneralRe: Toolbar double click Pin
Neville Franks6-Feb-05 10:31
Neville Franks6-Feb-05 10:31 
GeneralRe: Toolbar double click Pin
Joris van der Pol8-Feb-05 2:42
Joris van der Pol8-Feb-05 2:42 
GeneralSuppressing AutoRun Programmatically Pin
Steve Messer6-Feb-05 3:46
Steve Messer6-Feb-05 3:46 
Does anyone know how to supress autorun programically?

I am using a C++ MFC Dialog based app in Visual Studio .Net 2003. I have tried the following code from MSDN but it doesn't work.
<code>
UINT g_uQueryCancelAutoPlay = 0;

BOOL DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 
{ 
    switch (uMsg) 
    { 
    ...
    default: 
        if (!g_uQueryCancelAutoPlay)
        {
            g_uQueryCancelAutoPlay = RegisterWindowMessage(TEXT("QueryCancelAutoPlay"));
        } 
        if (uMsg == g_uQueryCancelAutoPlay) 
        {
            SetWindowLong(hDlg, DWL_MSGRESULT, TRUE);          
            return 1;               
        }
    } 
}
</code>

It seems that the registered message QueryCancelAutoPlay is never being recieved by
<code>
    if (uMsg == g_uQueryCancelAutoPlay) 
    {
       SetWindowLong(hDlg, DWL_MSGRESULT, TRUE);          
       return 1;               
    }

</code>

Any solutions ?
GeneralRe: Suppressing AutoRun Programmatically Pin
Blake Miller7-Feb-05 5:04
Blake Miller7-Feb-05 5:04 
GeneralRe: Suppressing AutoRun Programmatically Pin
Steve Messer7-Feb-05 5:15
Steve Messer7-Feb-05 5:15 
GeneralRe: Suppressing AutoRun Programmatically Pin
Blake Miller7-Feb-05 5:19
Blake Miller7-Feb-05 5:19 
GeneralRe: Suppressing AutoRun Programmatically Pin
Steve Messer7-Feb-05 7:13
Steve Messer7-Feb-05 7:13 
GeneralRe: Suppressing AutoRun Programmatically Pin
Steve Messer7-Feb-05 8:23
Steve Messer7-Feb-05 8:23 
Questionis it possible to dynamically add image to menu on Win98? Pin
includeh106-Feb-05 3:26
includeh106-Feb-05 3:26 
AnswerRe: is it possible to dynamically add image to menu on Win98? Pin
Christian Graus6-Feb-05 9:32
protectorChristian Graus6-Feb-05 9:32 
AnswerRe: is it possible to dynamically add image to menu on Win98? Pin
PJ Arends6-Feb-05 9:40
professionalPJ Arends6-Feb-05 9:40 
GeneralRe: is it possible to dynamically add image to menu on Win98? Pin
includeh106-Feb-05 23:16
includeh106-Feb-05 23:16 
GeneralRe: is it possible to dynamically add image to menu on Win98? Pin
ThatsAlok6-Feb-05 23:24
ThatsAlok6-Feb-05 23:24 
GeneralVOICE OVER TAPI Pin
W1sd0m6-Feb-05 3:02
W1sd0m6-Feb-05 3:02 
GeneralImplementing low level UDP Pin
Member 17120606-Feb-05 2:25
Member 17120606-Feb-05 2:25 
GeneralRe: Implementing low level UDP Pin
Ryan Binns6-Feb-05 17:11
Ryan Binns6-Feb-05 17:11 
QuestionFlicker when doing dlg.DoModal() ? Pin
Dominik Reichl6-Feb-05 1:12
Dominik Reichl6-Feb-05 1:12 
AnswerRe: Flicker when doing dlg.DoModal() ? Pin
toxcct6-Feb-05 5:02
toxcct6-Feb-05 5:02 
GeneralRe: Flicker when doing dlg.DoModal() ? Pin
Dominik Reichl6-Feb-05 5:53
Dominik Reichl6-Feb-05 5:53 
GeneralRe: Flicker when doing dlg.DoModal() ? Pin
Ravi Bhavnani6-Feb-05 8:47
professionalRavi Bhavnani6-Feb-05 8:47 

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.