Re: Build Errors
- From: David Wilkinson <no-reply@xxxxxxxxxxxx>
- Date: Fri, 14 Oct 2005 17:34:31 -0400
Ross wrote:
Hi Victor!
The problem was, as you stipulated, the 2 functions had to be moved to the top of WINMAIN. However this is the first time in all my examples that I had to do this. Furthermore, the example in book was coded as I showed it.
Concerning the DPtoLP(hdc,(LPPOINT) &rect,2); line, I am curious to see where the
LPRECT type is defined. I will try to look in Windows.h later. Let me know if it is elsewhere!
Ross:
I think you are trying to learn Windows programming before you have learned C and/or C++. Not an easy thing to do.
In C and C++ every function must be defined OR DECLARED before it is used. Perhaps your book contains declarations of these 2 functions before WinMain()? The declarations should look like this:
void Show (HWND hwnd, HDC hdc, int xText, int yText, int iMapMode, TCHAR * szMapMode);
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
If you do this at the top, you can put the corresponding function definitions at the bottom.
HTH,
David Wilkinson .
- References:
- Build Errors
- From: Ross
- Re: Build Errors
- From: Victor Bazarov
- Re: Build Errors
- From: Ross
- Build Errors
- Prev by Date: Re: Build Errors
- Next by Date: Template compilation problem
- Previous by thread: Re: Build Errors
- Next by thread: Re: Problem with swprintf in VC++ 2003
- Index(es):
Relevant Pages
|