You either want to use D3D10_MAP_READ_WRITE (remember that reading from GPU memory is SLOW) or re-generate the vertices from scratch.
Oh wow totally missed that. mdias is right. The data in your Vertex* v is undefined. Your code v[i].pos+displacement adds a value to v[i] which is undefined. You should have the position value, along with the rest of the data in your vertex buffer, saved in system memory then use those values to assign it to v.
So it should look something like this:
// This is stored somewhere in system memory
Vertex* v = 0;
mVB->Map(D3D10_MAP_WRITE_DISCARD, 0, (void**)&v );
for(int i = 0;i < mNumVertices;i++)
// Update position
m_vertices[i].pos += displacement;
// Replace new data
v[i].pos = m_vertices[i].pos;
// Also replace the rest of the attributes as well.. (color, normal, texCoord, etc...)
The reason why its probably flickering is that the api will give you a system memory with the values you initially assigned to the vb in one frame then the next frame the api will give you a totally different system memory with garbage values (resulting in a position with crazy values off the screen).
Thanks for the heads up mdias!
if the data is undefined so why does the box still moving when i press a key ?