There are two pointers, both points on controls of type
COleDateTime* pIN = (COleDateTime*)
The second control is on another dialog window
COleDateTime* pDest = (COleDateTime*)
The first pointer to point date ’27.05.1953’
How do with help the second pointer receive date ’27.05.1953’ ?
Is this your real code ? Because you cannot cast a CDateTimeCtrl (which is the control on your dialog) to a COleDateTime. You can't do something like that, you will end up will something totally invalid (it strange that it didn't even crash). So, cast it to a CDateTimeCtrl instead of a COleDateTime.
There is control on the dialog window
DDX_DateTimeCtrl(pDX, IDC_DATETIMEPICKER1, m_date);
m_sBD have format ‘dd.mm.yyyy’
for example m_sBD = L”19.05.1849”;
How do show date into control
that identifier is IDC_DATETIMEPICKER1?
I have a USB device (SDM modem) that uses a usb port to connect to a computer running any version of windows. I want to be able to figure out what port the device is on and read information from it. Which is the Windows API i need to use? In device manager, it gets listed with name as "USB COM Port (COMX)", where X is the COM port number available.
So, your USB device is USB-to-serial device ? If yes, you will need to retrieve the COM port number from the registry (but I never did that myself , so I can't really help there), and then you can open it like any other COM port (CreateFile, ReadFile, WriteFile, ... ). Then of course you need to know the protocol that your device is using (so, what to send,...)
If it is not a virtual COM port, the procedure is a bit different.
What about the 'trial and error' experimental approach (iterate on ports, trying to open them and start communicating with your device)? It might not work if there are bad-behaving-virtual-COM-drivers on your system, though.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
Into event NM_CLICK
Of modal dialog window chose row into control CListCtrl
int row; For example row = 6;
Modeless window is opened. In event WM_LBUTTONDOWN
( on surface of modeless) set:
CMainDlg2 dlgModal; // modal
m_sWorkModeless.Format(L"row = %d",dlgModal.row);
Result: row = 0 , but must be = 6
How to receive 6?
When the user is killing your app with the task manager, he really does want your app to die *immediately*. Not to show any messages, not to execute one more line of code. Therefore, Windows does not allow you to do such a thing.
It is a crappy thing, but it's life -^Carlo Pallini
As said in some of the other posts, task manager will call TerminateProcess to kill the process.
But there is one thing I have noticed. TerminateProcess takes an exit code as parameter.
You can retrieve this exit code using GetExitCodeProcess after the process is killed if you have the handle to the process.
And task manager always sets this to 1.
But again, any application can use TerminateProcess to kill a process and give the exit code as 1.
So, if you don't have a return 1; statement in your application entry function, you have a good chance of knowing that it was terminated using task manager.
«_Superman_» I love work. It gives me something to do between weekends.
Last Visit: 31-Dec-99 19:00 Last Update: 29-Jan-23 23:05