thebarslider
Programmer
I am trying to pass a double variable to a function in my main thread by using PostMessage.
My code is as follows:
AfxGetMainWnd()->PostMessage(MY_WM_MESSAGE_FREQUENCY,m_RecordingProgrammeFrequency,0);
This works fine an executes the following function:
LRESULT COneDlg::OnUpdateFrequency(WPARAM RecordFrequency, LPARAM lParam)
{
m_pWinTV->SetFrequency(RecordFrequency);
return (LRESULT) 1;
}
The problem i am having is that the computer cuts off my double.
For example: 95.95 becomes 95
My first thoughts are that i should pass a pointer to the double instead but am having problems doing this too.
Does anyone have any suggestions?
Mark.
My code is as follows:
AfxGetMainWnd()->PostMessage(MY_WM_MESSAGE_FREQUENCY,m_RecordingProgrammeFrequency,0);
This works fine an executes the following function:
LRESULT COneDlg::OnUpdateFrequency(WPARAM RecordFrequency, LPARAM lParam)
{
m_pWinTV->SetFrequency(RecordFrequency);
return (LRESULT) 1;
}
The problem i am having is that the computer cuts off my double.
For example: 95.95 becomes 95
My first thoughts are that i should pass a pointer to the double instead but am having problems doing this too.
Does anyone have any suggestions?
Mark.