Click here to Skip to main content
16,005,037 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralExchange variables betweeen CPPs. Pin
Anonymous19-Apr-05 10:35
Anonymous19-Apr-05 10:35 
GeneralRe: Exchange variables betweeen CPPs. Pin
ThatsAlok20-Apr-05 0:30
ThatsAlok20-Apr-05 0:30 
GeneralADO Database connect with MS acces Pin
Member 166386919-Apr-05 10:33
Member 166386919-Apr-05 10:33 
GeneralC++ Builder/ Client Server Pin
brilliant10119-Apr-05 10:14
brilliant10119-Apr-05 10:14 
GeneralIE Proxy Switcher Deskband Pin
Matthew Devine19-Apr-05 9:56
Matthew Devine19-Apr-05 9:56 
GeneralRe: IE Proxy Switcher Deskband Pin
Gerald Schwab19-Apr-05 10:26
Gerald Schwab19-Apr-05 10:26 
GeneralRe: IE Proxy Switcher Deskband Pin
Matthew Devine20-Apr-05 10:32
Matthew Devine20-Apr-05 10:32 
GeneralRe: IE Proxy Switcher Deskband Pin
Gerald Schwab20-Apr-05 14:43
Gerald Schwab20-Apr-05 14:43 
RegNotifyChangeKeyValue monitors the registry key for you. If you use the RegNotifyChangeKeyValue synchronously, then it waits until a subkey has changed before continuing execution. You could use a loop and continue to moniter. If you use RegNotifyChangeKeyValue asynchronously, then you wait on the event instead.

Run the code below. It will wait during the call to RegNotifyChangeKeyValue. Then change your proxy setting through IE and click ok. Then you will see the MessageBox.

#include <tchar.h>
#include <windows.h>


INT WINAPI
  _tWinMain (
    HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPTSTR lpCmdLine,
    INT nCmdShow
)
{
    LONG l = 0L;
    HKEY hKey = {0};
    
    l = RegOpenKeyEx (
            HKEY_CURRENT_USER,
            _T("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"),
            0, 
            KEY_NOTIFY,
            &hKey );
            
            
    if(l == ERROR_SUCCESS)
    {
        // The following call will wait until a change is made to the registry key.
        l = RegNotifyChangeKeyValue ( 
                hKey,
                FALSE,
                REG_NOTIFY_CHANGE_LAST_SET,
                NULL,
                FALSE );
                
        MessageBox(NULL, _T("Registry key changed"), _T("Registry key changed"), 0);
        RegCloseKey(hKey);                
    }                

    return 0;
}

Questionhow can i add 3D world scene into movie Pin
Tifa_Mido19-Apr-05 8:51
Tifa_Mido19-Apr-05 8:51 
GeneralExternal mode problem Pin
John Shaw19-Apr-05 7:54
John Shaw19-Apr-05 7:54 
GeneralQuestion about GDI+ Pin
Member 178245019-Apr-05 7:24
Member 178245019-Apr-05 7:24 
GeneralRe: Question about GDI+ Pin
Michael Dunn19-Apr-05 8:53
sitebuilderMichael Dunn19-Apr-05 8:53 
GeneralRe: Question about GDI+ Pin
David Crow19-Apr-05 9:52
David Crow19-Apr-05 9:52 
GeneralHi,I have done as PJ Arends said in that thread Pin
Member 178245019-Apr-05 19:19
Member 178245019-Apr-05 19:19 
GeneralRe: Hi,I have done as PJ Arends said in that thread Pin
David Crow20-Apr-05 2:11
David Crow20-Apr-05 2:11 
GeneralRS-232 Pin
ika219-Apr-05 7:00
ika219-Apr-05 7:00 
GeneralRe: RS-232 Pin
John Shaw19-Apr-05 7:25
John Shaw19-Apr-05 7:25 
GeneralMS-DOS Press any key to continue Pin
Anonymous19-Apr-05 5:47
Anonymous19-Apr-05 5:47 
GeneralRe: MS-DOS Press any key to continue Pin
David Crow19-Apr-05 7:06
David Crow19-Apr-05 7:06 
GeneralRe: MS-DOS Press any key to continue Pin
Shog919-Apr-05 7:10
sitebuilderShog919-Apr-05 7:10 
GeneralRe: MS-DOS Press any key to continue Pin
Anonymous19-Apr-05 7:29
Anonymous19-Apr-05 7:29 
GeneralPDF File Generation Pin
heman15419-Apr-05 5:19
heman15419-Apr-05 5:19 
GeneralRe: PDF File Generation Pin
David Crow19-Apr-05 5:43
David Crow19-Apr-05 5:43 
GeneralRe: PDF File Generation Pin
heman15419-Apr-05 10:44
heman15419-Apr-05 10:44 
GeneralRe: PDF File Generation Pin
ThatsAlok19-Apr-05 22:20
ThatsAlok19-Apr-05 22:20 

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.