Hi All..
Am struck up in certain situation, Let me explain this.. My snippet code looks like this.
//CSampleDlg.cpp
void CALLBACK EXPORT MyTimerProc(HWND hWnd,UINT nMsg,UINT nIDEvent,DWORD dwTime)
{
if( SellA >= BuyB)
{
}
if( SellB >= BuyA )
{
}
}
I have to run MyTimerProc function continuously.After certain hours i have to quit that function.
UINT m_timer;
void CSampleDlg::OnOK()
{
m_timer=SetTimer(1, 2000, (TIMERPROC)MyTimerProc);
}
void CSampleDlg::OnCancel()
{
KillTimer(m_timer);
}
When i click on cancel button, Anyhow MyTimerProc function will quit. But My fear is.. When i click on cancel button & control is in the middle operation like Open_Position() OR Close_Position(). In such case, Open_Position() OR Close_Operation() will fail & application will not exit gracefully.
Is it possible, when user clicks on cancel button & if MyTimerProc function is doing Open_Position()/Close_position(), then can i get the any notifiction or just like alarm..
Please suggest me on this..
Thank you all.