   Drag-able vertical splitters
  How do I do drag-able vertical splitter in the Windows API?   
  If you're doing GUI stuff, hopefully you're using C#.  Win32 or MFC are death and should be avoided if you value your sanity.There should be a vertical splitter control that you can just drag out of the toolbox onto your form-item inside Visual Studio. (I haven't really done much C# work but I know it's what you want if you're doing windows GUI stuff [smile])Otherwise, give us a lot more details: what's your app?  what API are you using?  Is this an existing project or are you starting something from scratch? etc-me   ;  I'm using c++ and bare-bones win32 coding.I made attempt here in my winProc function:LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){int wmId, wmEvent;PAINTSTRUCT ps;static int x,y,w,h;static int divX, divY;static int mouse_x, mouse_y;HCURSOR hCursor = LoadCursor(NULL, MAKEINTRESOURCE(IDC_SIZEWE));static bool divXMoving = false;static RECT win;static RECT rsourceWin;switch (message){static SADE *sade;case WM_CREATE:sade= new SADE( hWnd);GetWindowRect( hWnd, &win);GetWindowRect( sade->rsource->hWnd, &rsourceWin);w=(int)win.right;h=(int)win.bottom;divX=256;sade->rsource->size(0, 0, 256, h);sade->edit->size(0, 0, (int)rsourceWin.right, h);break;case WM_SIZE:w=(int)LOWORD(lParam);h=(int)HIWORD(lParam);sade->rsource->size( 0, 0, divX, h);sade->edit->size(divX, 0, w, h);break;case WM_LBUTTONDOWN:if (mouse_x > divX-2 && mouse_x < divX+2){divXMoving=true;SetCapture(hWnd);}break;case WM_LBUTTONUP:ReleaseCapture();divXMoving=false;break;case WM_MOUSEMOVE:mouse_x=(int)LOWORD(lParam);mouse_y=(int)HIWORD(lParam);if (LOWORD(lParam) > divX-2 && LOWORD(lParam) < divX+2){SetCursor( hCursor);}if (divXMoving=true && wParam == MK_LBUTTON){divX=mouse_x;}break;case WM_COMMAND:wmId    = LOWORD(wParam);wmEvent = HIWORD(wParam);// Parse the menu selections:switch (wmId){case IDM_ABOUT:DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);break;case IDM_EXIT:DestroyWindow(hWnd);break;case IDM_OPEN:sade->fileOpen();break;case IDM_SAVE:sade->fileSave();break;case IDM_SAVEAS:sade->fileSaveAs();break;default:return DefWindowProc(hWnd, message, wParam, lParam);}break;case WM_PAINT:// TODO: Add any drawing code here...GetWindowRect( hWnd, &win);GetWindowRect( sade->rsource->hWnd, &rsourceWin);if (!divXMoving){divX=(int)rsourceWin.right;}break;case WM_DESTROY:PostQuitMessage(0);delete sade;break;default:return DefWindowProc(hWnd, message, wParam, lParam);}return 0;};  Well then MFC is only hope probably.  IIRC "bare bones windows" doesn't do any of that stuff; you'd have to build it completely from scratch: detect where the mouse is, render your own splitter, detect the click, change your rendered screen sizes, etc, etc.  MFC is a lot less of a nightmare than that but still a big PITA.  MFC is a library provided by Microsoft to do old skool UI work like that.  You can google around for tutorials and sample code.  "MFC vertical splitter"-me   ;  Heres my attept if you didn't see it in my edit:LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){int wmId, wmEvent;PAINTSTRUCT ps;static int x,y,w,h;static int divX, divY;static int mouse_x, mouse_y;HCURSOR hCursor = LoadCursor(NULL, MAKEINTRESOURCE(IDC_SIZEWE));static bool divXMoving = false;static RECT win;static RECT rsourceWin;switch (message){static SADE *sade;case WM_CREATE:sade= new SADE( hWnd);GetWindowRect( hWnd, &win);GetWindowRect( sade->rsource->hWnd, &rsourceWin);w=(int)win.right;h=(int)win.bottom;divX=256;sade->rsource->size(0, 0, 256, h);sade->edit->size(0, 0, (int)rsourceWin.right, h);break;case WM_SIZE:w=(int)LOWORD(lParam);h=(int)HIWORD(lParam);sade->rsource->size( 0, 0, divX, h);sade->edit->size(divX, 0, w, h);break;case WM_LBUTTONDOWN:if (mouse_x > divX-2 && mouse_x < divX+2){divXMoving=true;SetCapture(hWnd);}break;case WM_LBUTTONUP:ReleaseCapture();divXMoving=false;break;case WM_MOUSEMOVE:mouse_x=(int)LOWORD(lParam);mouse_y=(int)HIWORD(lParam);if (LOWORD(lParam) > divX-2 && LOWORD(lParam) < divX+2){SetCursor( hCursor);}if (divXMoving=true && wParam == MK_LBUTTON){divX=mouse_x;}break;case WM_COMMAND:wmId    = LOWORD(wParam);wmEvent = HIWORD(wParam);// Parse the menu selections:switch (wmId){case IDM_ABOUT:DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);break;case IDM_EXIT:DestroyWindow(hWnd);break;case IDM_OPEN:sade->fileOpen();break;case IDM_SAVE:sade->fileSave();break;case IDM_SAVEAS:sade->fileSaveAs();break;default:return DefWindowProc(hWnd, message, wParam, lParam);}break;case WM_PAINT:// TODO: Add any drawing code here...GetWindowRect( hWnd, &win);GetWindowRect( sade->rsource->hWnd, &rsourceWin);if (!divXMoving){divX=(int)rsourceWin.right;}break;case WM_DESTROY:PostQuitMessage(0);delete sade;break;default:return DefWindowProc(hWnd, message, wParam, lParam);}return 0;}I couldn't get it to work though.   