Hi,

Is there a way to stop the user from rezising to window ; so the user won't be able to make the window any bigger or smaller just the size i give to the window.

I tried looking it up on this forum and MSDN , but MSDN is way too big so i cant really find my information on there.

Is there a simple function to implent so you cannot resize?

greets,
Roel

Recommended Answers

All 2 Replies

Either change the style of the window, or add this to your windows procedure:

case WM_GETMINMAXINFO:
  {
    MINMAXINFO *mmi = (MINMAXINFO*) lParam;
    mmi->ptMinTrackSize.x = mmi->ptMaxTrackSize.x = 500; // Width
    mmi->ptMinTrackSize.y = mmi->ptMaxTrackSize.y = 500; // Height
  }
  break;

Hope this helps.

Thank you =) your job is done here :D

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.