Its something about DAO can’t initialize, the error code is AFX_DAO_ERROR_ENGINE_INITIALIZATION , I can recall that we have to put something like initialization function before starting using DAO, is that right, but I can’t remember the syntax
It throws the same exception when I tried to do so,
I know that DAO is not working well in multithreaded environment, but I heard that this is fixed if I turn my DLL to UNICODE version, which I‘ve done, but still not working.
i am using the code below which i copied from somewhere for an application which uses a vertical scrollable child. now i realise my application need a horizontal scroll also.....can i use back the same code ?
void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
int nMaxPos = m_rcOriginalRect.Height() - m_nCurHeight;
if (m_nScrollPos >= nMaxPos)
there are several way to calc it. it depends on what kind of coordinate system you are using. you have to consider whether absolute or relative, whether integer or float, whether zoom in/out feature will be added or not, and etc.
scrollbar control has its absolute coordinate like 'range' like 0~255 or 0~32767. this is physical coordinate. So your logical coordinate in your mind has to be matched to physical coordinate as correct ratio. for example, if the maximum size of logical map is 327680 pixel and physical scroll range is 0~32767, then current pixel position to draw to screen has to be scrollbar position * 10. so if the scrollbar position is 16384 (1/2 of range), then current map position is 16384 * 10 = 163840.
and you also have to consider view window width, height.
anyway, scroll bar controling is a little complex and i'd like to suggest you to research formal way. there are lectures on the internet.
>hello i want to make an overload of the assignement operator in C++ but it generated this
>error ... someone help please
>this is the code:
>friend CMot& operator = (const CMot); --> in CMot.h
>CMot& operator = (const CMot m) --> in CMot.cpp
It's been a while since I've dealt with this but my guess would be that "friend" indicates an external function or class. Since the only entitity you're dealing with is the object itself, both as object and returned value, you don't need the "friend" designation. It puts it outside the class.
I have never seen anyone post a joke/game message so I'm going to now. Here are three games that I have written. There on my web site and I know there not that great but I want to shere them any way. You probably will not be interested in "grace game" but the other two may be kinda neat. Any comments are welcome.
"To an optimist the glass is half full.
To the pessimist the glass is half empty.
To the programmer the glass is twice as big as it needs to be."
GC13: "Mature-Ages 16 and up. 'your mature, right?'"
FARGORE: "no, but I am over 16."