|
I'm might be missing something here, but if it just uninitialised variables, the following might help you out.
try
{
dValue = *dPtr;
}
catch( . . . )
{
dValue = 0.0;
}
Chris Meech
We're more like a hobbiest in a Home Depot drooling at all the shiny power tools, rather than a craftsman that makes the chair to an exacting level of comfort by measuring the customer's butt. Marc Clifton
VB is like a toolbox, in the hands of a craftsman, you can end up with some amazing stuff, but without the skills to use it right you end up with Homer Simpson's attempt at building a barbeque or his attempt at a Spice rack. Michael P. Butler
|
|
|
|
|
yes, it seems it will end this way
just comment if someone will read this:
call _clearfp (or similar) before = 0.0
t!
|
|
|
|
|
Take a look at _isnan, _finite and _fpclass.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hi,
I want to be able to catch any mouse and keyboard event from my MFC program.
The PreTranslateMessage(MSG* pMsg) function helps catching keyboard events that happen when the application window is active and for mouse events the mouse should also be over the application window.
I think there should be some way to do it.
What I actually want to do is to associate this with a timeout event. Just like the timeout windows uses to activate a screensaver. So I want to know the last time any mouse or keyboard event has occured.
I will be very grateful if someone could tell me how to do it.
Thanks...
|
|
|
|
|
Check SetWindowsHookEx
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
i want splitter window like the style |---
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/,
CCreateContext* pContext)
{
if(!(m_wndSplitter.Create(this,1, 2, CSize(10, 10),pContext))) return FALSE;
else
if (!(m_wndSplitter1.CreateStatic(&m_wndSplitter,2,1,WS_CHILD|WS_VISIBLE,m_wndSplitter.IdFromRowCol(0,1))))
return FALSE;
}
|
|
|
|
|
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT , CCreateContext* pContext)
{
if(!m_wndSplitVert.CreateStatic(this, 1, 2))
return FALSE;
if (!m_wndSplitVert.CreateView(0,0,RUNTIME_CLASS(CTreeView),CSize(125,100),pContext))
{
m_wndSplitVert.DestroyWindow();
return FALSE;
}
if(!m_wndSplitHorz.CreateStatic(&m_wndSplitVert, 2, 1, WS_CHILD | WS_VISIBLE, m_wndSplitVert.IdFromRowCol(0, 1)))
{
m_wndSplitVert.DestroyWindow();
return FALSE;
}
CRect rect;
GetClientRect(rect);
if( !m_wndSplitHorz.CreateView(0,0,RUNTIME_CLASS(CTopView), CSize(100,rect.Height() / 2 - 64),pContext) ||
!m_wndSplitHorz.CreateView(1,0,RUNTIME_CLASS(CBottomView), CSize(100,100),pContext))
{
m_wndSplitVert.DestroyWindow();
m_wndSplitHorz.DestroyWindow();
return FALSE;
}
return TRUE;
}
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
I'm still developping this ISAPI FILTER for an ISA SERVER:
I would like to catch the event PREPROC_HEADERS; I wrote this code:
static DWORD OnPreprocHeaders (PHTTP_FILTER_CONTEXT pfc, PHTTP_FILTER_PREPROC_HEADERS pHeaderInfo);
BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
{
pVer->dwFilterVersion = HTTP_FILTER_REVISION;
pVer->dwFlags = SF_NOTIFY_ORDER_HIGH | SF_NOTIFY_SECURE_PORT |
SF_NOTIFY_NONSECURE_PORT
| SF_NOTIFY_PREPROC_HEADERS
return TRUE;
}
DWORD WINAPI HttpFilterProc(
PHTTP_FILTER_CONTEXT pfc,
DWORD NotificationType,
LPVOID pvNotification
)
{
DWORD dwRet = SF_STATUS_REQ_NEXT_NOTIFICATION;
switch (NotificationType)
{
case SF_NOTIFY_PREPROC_HEADERS:
dwRet = OnPreprocHeaders(pfc, (PHTTP_FILTER_PREPROC_HEADERS) pvNotification);
break; default:
// We cannot reach here, unless Web Filter support has a BAD ERROR.
dwRet = SF_STATUS_REQ_ERROR;
break;
};
static DWORD OnPreprocHeaders (PHTTP_FILTER_CONTEXT pfc, PHTTP_FILTER_PREPROC_HEADERS pHeaderInfo)
{
char buffer[256];
DWORD buffSize = sizeof(buffer);
BOOL bHeader = pHeaderInfo->GetHeader(pfc, "URL", buffer, &buffSize);
return WriteIntoFile(pfc, "Evento OnPreprocHeaders " + *buffer);
}
The last method WriteIntoFile, it should write something, but it seems that any client request passes through this filter's method/event. Why?
|
|
|
|
|
SuzannaS wrote:
return WriteIntoFile(pfc, "Evento OnPreprocHeaders " + *buffer);
The second parameter being passed to WriteIntoFile() is wrong. It should look like:
char buffer2[281];
wsprintf(buffer2, "Evento OnPreprocHeaders %s", buffer);
return WriteIntoFile(pfc, buffer2);
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Thanks... it seems that works, but I sould still test all my code.
Thank you very much
|
|
|
|
|
Hi
I just have a general question about setting up
timers. How would I go about setting up timers in
C++?? Basically, I would like to set timers to wait
for certain events, once the timers pop, I want the
program to take a different route.
Any ideas???
Pls tell me some useful links for Timers sample code
Thanks in advance
Ram
|
|
|
|
|
set the timer to the duration you need (have a look at Cwnd::SetTimer() and Cwnd::KillTimer() ).
also override the events you need to catch. when the message it catched, set a flag.
this way, when the timer times out, if the flag is set, the event appeared, otherwise, it didn't.
TOXCCT >>> GEII power
|
|
|
|
|
Hi
Thanks for the reply.
But i need help on without using MFC in C++
Thnks agian
ram
|
|
|
|
|
ok, but the philosophy is the same...
TOXCCT >>> GEII power
|
|
|
|
|
Hello,
where can i set the timer(SetTimer()) in the main() function.
I tried but the Timer procedure(the call back routine) never got invoked.
Pls help..
Thanks agin
Ram
|
|
|
|
|
are you programming with Win32 ?
if so, you call SetTimer() in your events handler, into the event switch case relative to the action that must start the timer up.
TOXCCT >>> GEII power
|
|
|
|
|
Hello toxcct,
sorry for the delayed reply.
Anyway you have a good idea..on invoking timers.
Thanks a lot
Ram
|
|
|
|
|
cberam wrote:
I tried but the Timer procedure(the call back routine) never got invoked.
What does the relevant code look like?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Check:
SetTimer
KillTimer
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hello,
Thanks for help.
where can i set the timer(SetTimer()) in the main() function.
I tried but the Timer procedure(the call back routine) never got invoked.
Pls help..I'm struggling
Thanks agin
Ram
|
|
|
|
|
You will receive a message WM_TIMER each time the timer is consumed
You can catch it in your mail loop, (GetMessage ...)
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
And you will need a message loop.
Jens
|
|
|
|
|
SetTimer() and KillTimer() are still used.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hallo,
I'm developping an ISAPI FILTER for an ISA SERVER. How can I get the client's browser's session ID?
For each browser does an ID exist?
|
|
|
|
|
hi.. i was wondering if anyone in here could help me with my little problem.
I need to create a console application (in MS Visual C++ 6) which will launch in full screen, not maximized, and i cant figure out how to do this.
|
|
|
|