|
I think you need to look at the Win32 Structured Exemption Handling (SEH). I'm sure you'll find articles here on SEH and of course on MSDN.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Thanks,
Got the answer in Handling Exceptions, Part 17 in MSDN by using a 'Translator Function' to bind SEH to the more friendly C++ Exception handling mechanism.
Work's perfectly!
John
|
|
|
|
|
I'm using CADORecordset class by Carlos Antollini.
I'm not able to delete a record in the recordset
or to change its content.
When I try these operations it generates an
exception and says "Query is too complex".
Can someone help me ???
Thanks a lot
|
|
|
|
|
I think the MFC idea od passinf just the CPritInfo* for OnPreparePrinting is bad because we cannot print anything any where,especially like in my case where I need to measure the diagram and span it across the pages and inform the user the equired number of pages.I just cannot do it.Attaching/Fromhandle ing of the dc from pOnfo->m_Pd->m_pd.hDC asserts false. I have to use the inelegant m_bContinuePrinting to check the pages during print.
Any help.
-Goran
|
|
|
|
|
If you need a DC in OnPreparePrinting(), you can get one for the default printer for your application by doing:
AfxGetApp()->GetPrinterDC();
I cover the topic in my article Printing Tricks And Tips[^]
It should be of help.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
how to get just the folders path like the app wizard does
-julian
|
|
|
|
|
What do you mean by the folders path?
|
|
|
|
|
Hi
i have the following bit of code which i use to pull
the 'date_in' field from my database, using ado
variant v_Time_Issued
vTime_Issued = cpSet->GetCollect(L"date_in");
date_in has the value 2003-04-22 10:19:18.000
i need to be able to format the vTime_Issued so that im just left with the
time
so all i want from date_in is 10:19
any ideas ?????
Si
|
|
|
|
|
You can create a COleDateTime with the vTime_Issued and then you can use the member function GetDay() and GetHour() to extract the required info.
Bye
|
|
|
|
|
You can create a COleDateTime with the vTime_Issued and then you can use the member function GetMinute() and GetHour() to extract the required info.
Bye
|
|
|
|
|
Use COleDateTime in your app or modify the SQL getting the date_in from the database to only show the time.
Jason Henderson My articles
"The best argument against democracy is a five-minute conversation with the average voter." - Winston Churchill
|
|
|
|
|
If you are using MFC, read on.
COleDateTime datetime;<br />
datetime.ParseDateTime("2003-04-22 10:19:18.000");<br />
TRACE("%s\n", datetime.Format("%H:%M"));
|
|
|
|
|
I’ll like to do, in Microsoft Visual C++, a user interface for W2000 OS with meters, button, indicators etc. self-made, same LabView interface.
Where I can find free tutorials, sample or book on this argument?
Thank you, Andrea.
acaselli@rolandeur.com
|
|
|
|
|
You want to make a UI for Windows 2000? I'm not sure I understand what you want.
|
|
|
|
|
I need to write a programm to visualize, for example, a fan that rotate with the indication of rpm (revolutions per minute), an analogic tachometer with the
needle, or a thermometer whit the column of mercury and a seven segment display. I know the article "Analog Meter Class" by Mark C. Malburg, but I'll like study in depth the argument.
Thank you, Andrea.
|
|
|
|
|
Hi, everyone!
When reading the following codes and after referencing the help of
TIME_ZONE_INFORMATION and GetTimeZoneInformation in MSDN. I
find I can hardly understand the meaning of the two data
structures. What puzzled me most is what means "DaylightDate" and
"StandardDate". So I want to know whether there are some tutorials
about this topic which is easy to understand?
Codes:
--------
TIME_ZONE_INFORMATION tzi;
int nTZBias;
if (GetTimeZoneInformation(&tzi) == TIME_ZONE_ID_DAYLIGHT)
{
nTZBias = tzi.Bias + tzi.DaylightBias;
}
else
{
nTZBias = tzi.Bias;
}
--------
Thanks in advance,
George
|
|
|
|
|
In some countries, one hour is added or removed depending on the current season. For example, in France, we have GMT+1 in summer and GMT+2 in winter. This is supposed to spare some energy to fit work hours with daylight, but it is very controversal.
So the Standard Date is the date when the time is actually set to your local time (which depends on your location on the planet). The Daylightdate is the date when the time is actually increased with an offset (usually 60 minutes) which can be negative.
On these two dates, Windows automatically updates the system time using whether the standard bias or the daylightbias. It also prompts the user on startup to let him know about it.
If you're not concerned about changing hours according to seasons, simply do not use the daylightdate.
Another word about the strings : these are simple info strings, nothing is really done with tehm, so you can put in them everything you want.
Hope this helps.
~RaGE();
|
|
|
|
|
Rage wrote:
. For example, in France, we have GMT+1 in summer and GMT+2 in winter.
Isn't it the other way 'round?
GMT+1 in Winter and GMT+2 in Summer?
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
I wrote it the other way round, then corrected it. Honestly, I think you're right. Anyway, I guess even if I had written it right, someone would have wondered if it were not the contrary
~RaGE();
|
|
|
|
|
Hi, Rage buddy!
I have another question, I have referenced that
function "GetTimeZoneInformation" return value can
be TIME_ZONE_ID_UNKNOWN, TIME_ZONE_ID_STANDARD and
TIME_ZONE_ID_DAYLIGHT. I want to know why sometimes
it is TIME_ZONE_ID_DAYLIGHT and why sometimes it is
TIME_ZONE_ID_STANDARD? By what the return value is
determined?
Can you show me an example?
Thanks in advance,
George
|
|
|
|
|
George2 wrote:
By what the return value is
determined?
MSDN
Return Values
If the function succeeds, the return value is one of the following values:
Value Meaning
TIME_ZONE_ID_UNKNOWN The system cannot determine the current time zone. This error is also returned if you call the SetTimeZoneInformation function and supply the bias values but no transition dates.
Windows NT: This value is returned if daylight savings time is not used in the current time zone, because there are no transition dates.
TIME_ZONE_ID_STANDARD The system is operating in the range covered by the StandardDate member of the TIME_ZONE_INFORMATION structure.
Windows 95: This value is returned if daylight savings time is not used in the current time zone, because there are no transition dates.
TIME_ZONE_ID_DAYLIGHT The system is operating in the range covered by the DaylightDate member of the TIME_ZONE_INFORMATION structure.
If the function fails, the return value is TIME_ZONE_ID_INVALID. To get extended error information, call GetLastError.
So, the return value tells you if the system time is currently the standard one or the daylight one. If your system date is between SYSTEMTIME DayLightDay and SYSTEMTIME StandardDate, it will return you TIME_ZONE_ID_DAYLIGHT. If your system date is between SYSTEMTIME StandardDate and SYSTEMTIME DayLightDay it will return you TIME_ZONE_ID_STANDARD. (Maybe that's the other way round, but I think you have got the idea, now). The SYSTEMTIME I'm talking about are the one retrieved with GetTimeZoneInformation()
~RaGE();
|
|
|
|
|
Thanks, Rage buddy!
George
|
|
|
|
|
Thanks, Rage buddy!
George
|
|
|
|
|
Hey Lads,
Just trying touse IsPwrHibernateAllowed() . The files all compile fine but gives me LNK2019 error when it tries to link. The function is in the header file Powrprof.h and this works fine in VS 6 [Well it did for me before. Don't have VS 6 installed on this machine]
Any ideas??
I'm using VS.NET 2003
error
error LNK2019: unresolved external symbol "unsigned char __stdcall IsPwrHibernateAllowed(void)" (?IsPwrHibernateAllowed@@YGEXZ) referenced in function "private: void __thiscall CShutdownManagerDlg::CheckStates(void)" (?CheckStates@CShutdownManagerDlg@@AAEXXZ)
Regards,
Brian Dela
|
|
|
|
|
Try linking to Powrprof.lib.
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|