LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM)里的变量设置成static是不是能节省下分配内存的时间??
我看<window编程>中看到在处理窗口函数时,变量基本上都都设置成static
static COLORREF crPrim[3] = {RGB(255,0,0),RGB(0,255,0),RGB(0,0,255)};
static HBRUSH hBrush[3], hBrushStatic;
static HWND hwndScroll[3], hwndLable[3], hwndValue[3], hwndRect;
这样是不是为了节省每次进入函数时重新分配内存的时间呀???
???