|
where can I find a list of the hex values for each key?
sj
|
|
|
|
|
http://www.asciitable.com/
Hx is the collumn you want, the key is in red
*.*
|
|
|
|
|
|
welcome
*.*
|
|
|
|
|
I have written a DLL which has a function defined as:
DllExport double getDouble( const char * );
In a C# class I have linked to the DLL as follows:
[DllImport( "CurrConv.dll", CharSet = CharSet.Ansi )]<br />
protected static extern double getDouble( IntPtr m_ptrDataBuffer );
The problem I am getting is that when I get to the line:
double number = getDouble( m_ptrDataBuffer );
I get the following error:
"Unable to find an entry point named getDouble in DLL CurrConv.dll"
Can someone please explain where I am going wrong, and how to resolve the problem.
|
|
|
|
|
The crux of the problem is likely in the C declaration of the function. This determines how the function name is exported.
I'd try:
extern "C" __declspec(dllexport) double getDouble( const char * );
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
Santa Cruz Networks
|
|
|
|
|
I construct a propery page which I added OnActive() and OnKillActive() by class wizard. When I added OnNotify() to the class, I have not received message to trigger OnActive() and OnKillActive() anymore. Is there anyway to both functions triggered even I use OnNotify()?
|
|
|
|
|
What messages does the program process in OnNotify()? I suspect that the message gets destroy inside OnNotify().
Kuphryn
|
|
|
|
|
All I did is I tried to detect right mouse click on richedit control located on my property page. It shoudn't intercept both OnSetActive() and OnKillActive() messages. Please let me know if I did something wrong here.
BOOL CPropertyPage::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
MSGFILTER * lpMsgFilter = (MSGFILTER *)lParam;
if ((wParam == IDC_RICHEDIT1) &&
(lpMsgFilter->nmhdr.code == EN_MSGFILTER)&&
(lpMsgFilter->msg == WM_RBUTTONDOWN))
{
.
.
.
.
}
return CDialog::OnNotify(wParam, lParam, pResult);
}
|
|
|
|
|
Relative C++ and especially VC++ and working with Windows newbie (most previous experience is embedded).
Here's the scenario:
Here's what I want: one class called MonitorClass, and this class should instantiate a bunch of specific montitors underneat underneath it.... monitor1, monitor2, monitor3, etc.....
The "system" will start up the Monitor class which runs in a loop all the time monitoring each specific monitor underneath.
We also have seperate tests that will come into existence that may need to monitor some of the same things....so these tests should go through the MonitorClass to get a Sample() from any specific monitor.
Since we want all to go through the same guy...I'm thinking we want MonitorClass in a DLL (I've never played with DLLs much) so that it is in memory only one time and all go through him.
Can I make a DLL that is essentially a class ? Or must it be nothing more than a collection of functions?
Or...can you understand the problem enough to give a better solution?
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
What are you going to do with the results of the sampling/monitoring? If it is just going to be logged somewhere (file/db), and you always need this running, you may want to consider developing this as a service.
onwards and upwards...
|
|
|
|
|
KingTermite wrote:
Can I make a DLL that is essentially a class ? Or must it be nothing more than a collection of functions?
The DLL can be a collection of exported functions, or it can be a collection of exported classes.
From what you describe, however, I see no reason why you need a DLL. Unless the code needs to be shared between two or more applications, you'd be fine putting it all in one EXE.
|
|
|
|
|
Yes, it was going to be shared by more than one exe.
We talked at more length with the designer of some other code (drivers) being used which was part of the reason we thought we needed it in a seperate DLL anyway.
It turns out the restrictions were not as deep as we thought and we can stick with the static libraries we already have for the monitors.
Thanks for the input all, regardless.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
Simple answer is "Yes, you can make a DLL export a class". It will tie you into only using one
compiler with that DLL, but this isn't a big restriction most of the time.
You'll want to look up __declspec(export) / __declspec(import) in the MSDN library.
But each instance (EXE / DLL) using your DLL would have a fresh "copy" of the DLL, so you would
get lots of monitors. You can do tricks to make them each refer to a single one, but that gets
a bit too deep.
This sounds like a good project for a COM object. This makes a singleton easier to implement
(look on this site for examples), and means you could use the Monitor from VC++, VB
etc.
I would also think about Event Sinks to inform interested programs of changes in the
real world stuff you are monitoring.
If you have to poll the real world to check on a change, try creating a separate thread which
wakes up at regular intervals briefly.
Good luck, as this is a non-trivial learning curve...
Your experience is the opposite of mine. I've been playing with windows for years, and only
recently had to attack an Arm board...
Iain.
|
|
|
|
|
I want to manage some of my radio buttons and some of my static texts have colored text when the dialog receive a certain message, but other controls donot.
How to do this?
thanx.
|
|
|
|
|
Take a look at CP, there are lots of articles regarding on this in the Static and into other sections...
Hope this helps...
|
|
|
|
|
What is the problem? What do you want to accomplish?
Kuphryn
|
|
|
|
|
make texts of the control or the static text have color
|
|
|
|
|
One solution is to add a handler for ON_WM_CTLCOLOR.
Kuphryn
|
|
|
|
|
Do you mean I should create a new class, inheriting from the orignal control class, for my control which I want to color its text. Then overridde the OnCtlColor function of the class, use CDC::SetTextColor to set the text color?
I am not good at programing, please say it somewhat detailedly.
Thanks a lot!
|
|
|
|
|
olinn wrote:
Do you mean I should create a new class, inheriting from the orignal control class, for my control which I want to color its text. Then overridde the OnCtlColor function of the class, use CDC::SetTextColor to set the text color?
Yes, that would work.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
I want to get my curent mouse position. I can't store is from WM_MOUSEMOVE because that just works for the time the mouse is on certain controll. What would be the best way to do this?
|
|
|
|
|
GetCursorPos() gets the current mouse position in screen coordinates.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
And how to I convert this point to a point on the control it's on? There's a function for this too but i just cant remember it's name...
|
|
|
|
|
ScreenToClient()
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|