# Identifier not found?



## ste2425 (Mar 22, 2011)

i need a little help with my code on MFC.

I created a function in doc which when called takes the pointer value from on on LButton down function which i can then set through another function ive created called set value in the ciew doc. But the problem is when i compile it it says identifier not found, lists the name of the function but without the brackets.  I set the function up using the add function wizard so i thought it should create all that code itself?

hope this makes sense


----------



## streetfighter 2 (Mar 22, 2011)

http://sscce.org/

Maybe someone else can troubleshoot it with that amount of info but I (probably) can't.  

Nevertheless "Identifier not found" is usually because you forgot to include a header file.  However, since you created the function, you may need to prototype the function at the top of your code or in an included header file:

```
void myfunc(&CVar);
```


----------



## ste2425 (Mar 22, 2011)

sorry the code is on my laptop but ill create the needed stuff then post


----------



## W1zzard (Mar 22, 2011)

need to see some code


----------



## ste2425 (Mar 22, 2011)

i dont understand what happened but i went to a backed up version, didnt have to replace much code then created the function again through the wizzard and now it works fine. I dont get it, but not complaining.

Seeing as i have a thread open are there any guides for using the CBrush functions? i dont understand the selectingobject() and the whole selecting oldbrush new brush thing.


----------



## streetfighter 2 (Mar 22, 2011)

ste2425 said:


> Seeing as i have a thread open are there any guides for using the CBrush functions? i dont understand the selectingobject() and the whole selecting oldbrush new brush thing.


I got a lot of my info about GDI drawing from codeproject.com.

Try this:
http://www.codeproject.com/KB/GDI/drawtechniques.aspx

This one might not contain MFC:
http://www.codeproject.com/KB/graphics/gditutorial.aspx


----------



## ste2425 (Mar 22, 2011)

thats great thanks im just confused about how to make the different brushes take effect on different shapes/objects plus how deselecting brushes works to free up memory, i know the code but dont understand how it works meaning i cannot implement it properly

but thanks mate


----------

