how can I assign this values then I could deside where and when to create and paint.

InvalidateRect() causes WM_PAINT message. CreateWindow() causes WM_CREATE message. You should not post either of those messages yourself but call the win32 api functions.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.