|
You are not handling WM_SETCURSOR in the child window, I suppose? That would otherwise be the reason for your problem. Is the cursor changed when you move the mouse, that is, if you do the action leading to MouseManoMoverTrue , will the cursor stay as it was, but change as soon as you move it? If that is the case, you might want to call SetCursor with the special cursor in MousManoMoverTrue as well.
|
|
|
|
|
Johan Rosengren wrote:
You are not handling WM_SETCURSOR in the child window
that was the problem. Solved it. thanks!!
|
|
|
|
|
Hi,all
I am a newcomer here, would you like tell me what problem is? When i download some source codes here, I can not always compile or link them successfully. it always tells me some errors like this:
:\program files\microsoft visual studio\vc98\mfc\include\afx.h(1483) : error C2629: unexpected 'class CTimeSpan ('
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(1483) : error C2238: unexpected token(s) preceding ';'
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(1527) : error C2146: syntax error : missing ';' before identifier 'm_timeSpan'
........
How can i deal with it?
Thanks very much
henry
|
|
|
|
|
Maybe you have not include some header files.
|
|
|
|
|
Yes, I just downloaded from here:
http://www.codeproject.com/bitmap/tonyjpeglib.asp
But I can not compile and link it sucefully. Would you like do me a favor and try it see what is the problem?
Thanks
david
|
|
|
|
|
give us the erroring line 1483...
TOXCCT >>> GEII power
|
|
|
|
|
Thanks, the code as follow, but I do not think the code has any problem because it is standard and other source codes use it well. it is inside the AFX.H file.
class CTimeSpan
{
public:
// Constructors
CTimeSpan();
CTimeSpan(time_t time);
CTimeSpan(LONG lDays, int nHours, int nMins, int nSecs);
CTimeSpan(const CTimeSpan& timeSpanSrc);
const CTimeSpan& operator=(const CTimeSpan& timeSpanSrc);
|
|
|
|
|
and did you try to include time.h yourself ?
TOXCCT >>> GEII power
|
|
|
|
|
Thanks, I did not find time.h file in the fold I have downloaded. where can i find the time.h file. I think these time.h files are different from different sources. right?
thanks
|
|
|
|
|
just #include <time.h>
it is in the compiler includes folder...
TOXCCT >>> GEII power
|
|
|
|
|
Thanks
I have included the time.h file inside .cpp files. but still errors over there.
I just downloaded source codes from here:
http://www.codeproject.com/bitmap/tonyjpeglib.asp
But I can not compile and link it sucefully. Would you like do me a favor and try it see what is the problem?
Thanks
david
|
|
|
|
|
i would do it if i had time, but at the moment, i already take on my time to post on codeproject, but i'm sorry, i cannot do this for you at the moment...
TOXCCT >>> GEII power
|
|
|
|
|
Thanks Geii power
I wait for your reply when you are availiable.
Thanks again
|
|
|
|
|
wow, GEII is the studies i am currently on... it's not me
call me toxcct, i'll be fine for me
TOXCCT >>> GEII power
|
|
|
|
|
Sorry, toxcct;P
I will wait
|
|
|
|
|
I have the following class:
template<typename FLAGTYPE> // may be BYTE, WORD, ULONG...
class Flags {
public:
/**
The boolean indexing operator returns true if the indexed flag bit
is a one.
*/
bool operator[] (long ix) const
{
assert((long)ix >= 0 && (long)ix < 8*sizeof(FLAGTYPE));
return ((m_flags & (1<<ix)) != 0);
}
// ...
protected:
FLAGTYPE m_flags;
};
The bool operator[] makes it possible to write:
Flags<ULONG> f1 = 10;
bool b = f1[3]; // assigns bit 3 of f1, i.e. f1 & 0x08, to b
How do I define indexing and assignment operators that *set* bit 'ix' to a boolean value, so that I can write:
f1[3] = true;
|
|
|
|
|
You can't do that directly because the return value of a function can't be a bitfield. You would need to have operator[] return some object (probably a helper class) that has access to the members of Flags<> variable and an operator= that takes a bool parameter. That operator= would twiddle the right bit.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
If my rhyme was a drug, I'd sell it by the gram.
|
|
|
|
|
- I Want to detect a file which have received from other Computer on LAN. But I don't know way to approach.
--> What's should i do??
--> Can I use Shell Extentions??
thanks
|
|
|
|
|
*How* are you receiving it? If you've fetched it from the other computer, then look at the
application fetching the file.
If it is out of your control, (ie. you have a shared directory, and the other PC pushes the file),
then you may be able to use the FindFirstChangeNotification API function.
Iain.
|
|
|
|
|
I created a structure inside a function definition (which means that the structure will be destroyed when I leave that function scope). While I'm inside that function however, I would like to activate another function (let's call it 'DoSomethingWithStruct') to handle certain activities on that newly created structure.
In the class definition, I am able to get away declaring 'DoSomethingWithStruct' by using a 'void*' as the parameter to pass data between one function and the other.
My problem is, "How do I cast the 'void*' back to the structure when I'm inside 'DoSomethingWithStruct'? (Here's some code.)
class MyClass
{
...
void DoSomethingWithStruct(void* pMyStructure);
};
===============================
void MyClass::FirstFn()
{
struct MyStruct {...};
...
DoSomethingWithStruct(pMyStruct);
...
};
================================
void MyClass::DoSomethingWithStruct(void* pMyStructure)
{
// Here is where I need to cast 'pMyStructure' back from a 'void', to a 'MyStruct' type.
}
================================
I DO NOT want to declare 'MyStruct' as global.
Thanks for any insight.
William
Fortes in fide et opere!
|
|
|
|
|
This would be better
class MyClass
{
...
void DoSomethingWithStruct(MyStruct* pMyStructure);
};
|
|
|
|
|
Thanks for replying.
'MyClass' does not know of 'MyStruct' as a type, hence the reason I used 'void'.
William
Fortes in fide et opere!
|
|
|
|
|
Maybe you can just define the struct inside the class declaration instead of inside the function definition? You can make the struct private, so only members of the class can access it.
|
|
|
|
|
Thanks for replying.
Your answer would presume that I own the class. (My error for referring to the class as 'MyClass'.)
William
Fortes in fide et opere!
|
|
|
|
|
Hi
If you don't own the class, how can you change DoSomethingWithStruct() function definition, since it's a MyClass member?
However, if DoSomethingWithStruct() is not member of MyClass, I don't know of any way (besides making a global structure) to make it aware of the struct. Sorry.
|
|
|
|