|
I'm not following the problem here. What is happening versus what you think should happen?
john john mackey wrote:
calling _tzset() then calling the fns (yielded)
GetTimeZoneInformation(&tzInfo) ==> TIME_ZONE_STANDARD and
GetTimeZoneInformation(&tzInfo) ==> TIME_ZONE_DAYLIGHT
How does calling GetTimeZoneInformation(&tzInfo) yield TIME_ZONE_STANDARD and TIME_ZONE_DAYLIGHT ? Did tzInfo change in between calls?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
With the "Automatically adjust for daylight saving changes" set (checked), even if I select Greenwich Mean Time (UTC, Zulu, etc...) the GetTimeZoneInformation(&tzInfo) still returns either TIME_ZONE_STANDARD or TIME_ZONE_DAYLIGHT (depending on the time setting).
It is my assumption that Greenwich Time does NOT observe daylight saving (do the Brits in Greenwich observe Daylight Saving). I thought that Greenwich or UTC is the reference point for time in the world, and thus the time zones. I thought UTC should not itself distinguish its time between TIME_ZONE_STANDARD or TIME_ZONE_DAYLIGHT.
The test i tried were with times on 09 Sep 2004 (or a "daylight time") and 09 November 2004 (a "standard time"). I expected to see only one result from GetTimeZoneInformation(&tzInfo).
Johnny, (still )
|
|
|
|
|
The confusion is the double use of GMT to define 'time' and 'time zones'.
I am in London - UK (10 miles from Greenwich). My Windows time zone is set to (GTM). Local time here is 18:15:31. But GMT is 17:15:31, an hour behind. This is because in the UK (like the US) we observe 'day light saving', so in the 'summer half' of the year we are one hour ahead of GMT. But this does not change our time zone which is still (GMT)
General rule is that your local time only corresponds to your selected Windows GMT timezone during the winter months. For the summer months it is your GMT zone + 1.
|
|
|
|
|
Thanks for the clarification. I had thought that Microsoft had a time zone for "GMT" or UTC, aka, "Zulu" time - the one that does not switch due to Daylight Saving.
Anyways, still looking for a programmatic way to set the "Automatically adjust clock for daylight saving changes" check-box in Date/Time, Time Zone properties.
Regards,
Johnny
USA
|
|
|
|
|
Thanks for the clarification. I had thought that Microsoft had a time zone for "GMT" or UTC, aka, "Zulu" time - the one that does not switch due to Daylight Saving.
Anyways, still looking for a programmatic way to set the "Automatically adjust clock for daylight saving changes" check-box in Date/Time, Time Zone properties.
Regards,
Johnny
USA
|
|
|
|
|
I have the following code to set one of the menu items as a default one (it should go bold), however the menu item is not displayed bold for some reason:
MENUITEMINFO menuItemInfo;<br />
menuItemInfo.cbSize = sizeof(MENUITEMINFO);<br />
menuItemInfo.fMask = MIIM_STATE;<br />
VERIFY(pSubMenu->GetMenuItemInfo(IDC_SHOWWINDOW,&menuItemInfo));<br />
menuItemInfo.fMask = MIIM_STATE;<br />
menuItemInfo.fType = MFS_ENABLED|MFS_DEFAULT;<br />
VERIFY(pSubMenu->SetMenuItemInfo(IDC_SHOWWINDOW,&menuItemInfo));
Both GetMenuItemInfo() and SetMenuItemInfo() are successful as they return 1, but I cannot figure out why it doesn't display the menu item as bold.
Any help would be greatly appreciated
Thanks
|
|
|
|
|
Try to change menuItemInfo.fType = MFS_ENABLED|MFS_DEFAULT; // Type has MFT_
with fState = MFS_ENABLED|MFS_DEFAULT;
|
|
|
|
|
I have tried that but for some reason it does not seem to work, that is why I asked the question in the 1st place.
Thanks
|
|
|
|
|
I suggest you that you can use another function like this in API: SetMenuDefaultItem(hMenu,IDM_,FALSE);
|
|
|
|
|
My question deals with writing a managed wrapper interface for a native C++ class such that it can be used by an application that I've written in C#.
The native C++ code has a class, cDSP, which in turn contains four other nested classes:
class cDSP
{
class c1 {}; // and so on to
class c4 {};
};
The C# code deals with only cDSP objects, which access, "behind the scene" so to speak, objects and methods of classes c1 to c4.
My questions is this:
In my managed wrapper class, is it necessary for me to declare pointers to each of these classes or is it sufficient to declare just one pointer to cDSP?
Thanks,
Nikhil
|
|
|
|
|
First off im a VB man not VC so this is all very new to me,
Ok got a resource file that fails to compile:
Compiling resources...
C:\Documents and Settings\Gaz\Desktop\sig2dat3.11.a-src\sig2dat.rc (13): error RC2104 : undefined keyword or key name: WS_DLGFRAME
Error executing rc.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\giFThash.sbr': No such file or directory
Error executing bscmake.exe.
sig2dat.exe - 2 error(s), 0 warning(s)
Now i presume the first part is a c**k up somewhere in the code, but not a clue whats up with the second one,
I presume this is ok:
IDD_ABOUT DIALOGEX DISCARDABLE 0, 0, 350, 350
STYLE WS_DLGFRAME | WS_POPUP | WS_CAPTION | DS_CENTERMOUSE
FONT 8, "MS Sans Serif"
So what am i missing?
Thanks
Sorry about the n00bishness
Gaz
|
|
|
|
|
Whiterat wrote:
C:\Documents and Settings\Gaz\Desktop\sig2dat3.11.a-src\sig2dat.rc (13): error RC2104 : undefined keyword or key name: WS_DLGFRAME
Winuser.h has not been included.
Whiterat wrote:
...but not a clue whats up with the second one,
Try
here.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Oh you are a life saver, thank you thank you thank you, worked perfect, and i only posted it like an hour ago very quick!!!! thanks!!!
|
|
|
|
|
hi again,
....yeh ok im sure you are probably gettin a bit bored by my n00bishness by now, but got yet another problem......
Ok, now when i try to compile i only get 1 error and 0 warnings,
now from the looks of the error it looks like i have missed yet another include tag off,
C:\Documents and Settings\Gaz\Desktop\sig2dat3.11.a-src\sig2dat.rc (25): error RC2104 : undefined keyword or key name: IDC_STATIC
Currently i only have the following include tags:
<br />
#include <Winuser.h><br />
#include "sig2dat.h" <br />
Thanks
Gaz
|
|
|
|
|
#include "resource.h"
#include "afxres.h"
put this code into the .rc file!
Don't try it, just do it!
|
|
|
|
|
If i know the thread id, how could i get the thread handle?
In the Win2000 i can use the OpenThread API, but it's not supported in the Win98.
What could i do under the Win98?
thx.
|
|
|
|
|
What are you doing that is differentiating between the two? If the thread is the current one, use GetCurrentThread() . Otherwise, use OpenThread() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
It is THE question!
There is no way I know about. You could check how windows ME is doing it.
But I propose that you redesign your software. Where did you get the ThreadId from?
Don't try it, just do it!
|
|
|
|
|
hello i want to know the meaning of:
%u
%s
%d
%..
how many %.. symbol in c++?
thanks for the information
|
|
|
|
|
The info you're looking for is all in MSDN: printf Type Field Characters[^].
The use of the rest of the format specifiers can be found by searching through MSDN for printf or sprintf.
-----
In the land of the blind, the one eyed man is king.
|
|
|
|
|
thanks Vineas for the information,
i've found it in msdn, and i know the meaning know
|
|
|
|
|
Can anyone tell me how to discover the full path of the associated program by known extension via windows registry.
|
|
|
|
|
How about AssocQueryString() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
I dont know whether this is the right place for this question, Please excuse if it is not so,.
I have just started programming in winsock.
How is my server intimated that one of the clients has sent it some data?
should I have a loop with the recv(....) function so that it checks continuously for incoming data?
Or are there anyother options?
(Windows is my OS)
Thanks,
Deepak Samuel.
|
|
|
|
|
Use accept() . I had a little server application that used the following functions:
WSAStartup()
socket()
bind()
listen()
accept() in loop
closesocket()
WSACleanup()
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|