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

C / C++ / MFC

 
QuestionHow to enable CHtmlView to capture the "Back" and "Forward" message from mouse buttons? Pin
Jason Liu1-Jan-08 19:07
Jason Liu1-Jan-08 19:07 
GeneralSynchronization and volatile Pin
George_George1-Jan-08 19:02
George_George1-Jan-08 19:02 
GeneralRe: Synchronization and volatile Pin
CPallini1-Jan-08 21:03
mveCPallini1-Jan-08 21:03 
GeneralRe: Synchronization and volatile Pin
George_George1-Jan-08 21:19
George_George1-Jan-08 21:19 
GeneralRe: Synchronization and volatile Pin
Florin Crişan2-Jan-08 0:05
Florin Crişan2-Jan-08 0:05 
QuestionHow to use GetTimeZoneInformation Pin
CodingLover1-Jan-08 18:54
CodingLover1-Jan-08 18:54 
AnswerRe: How to use GetTimeZoneInformation Pin
CodingLover1-Jan-08 22:42
CodingLover1-Jan-08 22:42 
GeneralRe: How to use GetTimeZoneInformation Pin
CodingLover2-Jan-08 0:05
CodingLover2-Jan-08 0:05 
One step more done. Read the registry as follows.

HKEY hKey;// Handle to the registry
DWORD dwType = REG_SZ;// Data type

char buf[255];// Data
DWORD dwBufSize = sizeof(buf);

// Sub handle to the registry
const char* subKey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones\\Afghanistan Standard Time";

// Open the handler
if(RegOpenKey(HKEY_LOCAL_MACHINE, subKey, &hKey) == ERROR_SUCCESS)
{
    // Do the processing, find the name
    if(RegQueryValueEx(hKey, "Display", 0, &dwType, (BYTE*)buf, &dwBufSize) == ERROR_SUCCESS)
    {
        AfxMessageBox(buf);
    }
    else
    {
        AfxMessageBox("Error in reading values.", MB_OK);
    }
    // Close the handler
    RegCloseKey(hKey);
}
else
{
    AfxMessageBox("Error in reading registry.", MB_OK);
}


As you can see, this code gives the values related to the Afghanistan Standard Time. I want to iterate through the list of Time Zones.

In this way each time zone I can compare the user time offset with register values.

I appreciate your help all the time...
Eranga Smile | :)

QuestionRe: How to use GetTimeZoneInformation Pin
David Crow2-Jan-08 2:52
David Crow2-Jan-08 2:52 
GeneralRe: How to use GetTimeZoneInformation Pin
CodingLover2-Jan-08 18:38
CodingLover2-Jan-08 18:38 
GeneralRe: How to use GetTimeZoneInformation Pin
dan o3-Jan-08 5:59
dan o3-Jan-08 5:59 
GeneralRe: How to use GetTimeZoneInformation Pin
CodingLover3-Jan-08 14:23
CodingLover3-Jan-08 14:23 
GeneralRe: How to use GetTimeZoneInformation Pin
dan o3-Jan-08 21:36
dan o3-Jan-08 21:36 
GeneralRe: How to use GetTimeZoneInformation Pin
CodingLover3-Jan-08 21:47
CodingLover3-Jan-08 21:47 
GeneralRe: How to use GetTimeZoneInformation Pin
dan o3-Jan-08 22:06
dan o3-Jan-08 22:06 
GeneralRe: How to use GetTimeZoneInformation Pin
CodingLover3-Jan-08 22:10
CodingLover3-Jan-08 22:10 
GeneralRe: How to use GetTimeZoneInformation Pin
CodingLover6-Jan-08 19:49
CodingLover6-Jan-08 19:49 
GeneralRe: How to use GetTimeZoneInformation Pin
dan o6-Jan-08 22:28
dan o6-Jan-08 22:28 
GeneralRe: How to use GetTimeZoneInformation Pin
CodingLover6-Jan-08 22:39
CodingLover6-Jan-08 22:39 
GeneralRe: How to use GetTimeZoneInformation Pin
dan o6-Jan-08 23:10
dan o6-Jan-08 23:10 
GeneralRe: How to use GetTimeZoneInformation Pin
CodingLover6-Jan-08 23:27
CodingLover6-Jan-08 23:27 
GeneralRe: How to use GetTimeZoneInformation Pin
dan o6-Jan-08 23:43
dan o6-Jan-08 23:43 
GeneralRe: How to use GetTimeZoneInformation Pin
CodingLover6-Jan-08 23:57
CodingLover6-Jan-08 23:57 
QuestionQuite similer application Pin
CodingLover7-Jan-08 18:33
CodingLover7-Jan-08 18:33 
GeneralRe: Quite similer application Pin
dan o8-Jan-08 1:05
dan o8-Jan-08 1:05 

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.