Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6770783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:21:14+00:00 2026-05-26T15:21:14+00:00

For some reason, I try to call AdjustWindowRect, or GetClientRect, and the parameters I

  • 0

For some reason, I try to call AdjustWindowRect, or GetClientRect, and the parameters I provide are fine. I get around 30 errors, none of which relate to the call to the WinAPI function.

What could cause such a thing?

Thanks

For example:

The following code:

   case WM_GETMINMAXINFO:
          {
              LPMINMAXINFO p_info = (LPMINMAXINFO)lParam;
              RECT rc = {0,0,d->w,d->h};
              DWORD dwStyle = GetWindowLongPtr( hWnd, GWL_STYLE ) ;
              AdjustWindowRect(&rc,dwStyle,FALSE);
              int total_border_width = 2 * GetSystemMetrics( SM_CXFRAME ) + 4;
              int total_border_height = 2 * GetSystemMetrics( SM_CYFRAME ) + 
                 GetSystemMetrics( SM_CYCAPTION ) - GetSystemMetrics( SM_CYBORDER ) + 5;
              POINT min,max;

              min.x = d->min_w > 0 ? d->min_w + total_border_width : p_info->ptMinTrackSize.x;
              min.y = d->min_h > 0 ? d->min_h + total_border_height : p_info->ptMinTrackSize.y;
              max.x = d->max_w > 0 ? d->max_w + total_border_width : p_info->ptMaxTrackSize.x;
              max.y = d->max_h > 0 ? d->max_h + total_border_height : p_info->ptMaxTrackSize.y;

              p_info->ptMinTrackSize = min;
              p_info->ptMaxTrackSize = max;
          }

Produces:

Error   6   error C2065: 'max' : undeclared identifier  c:\Users\Josh\Documents\AL51\src\win\wwindow.c  844
Error   13  error C2065: 'max' : undeclared identifier  c:\Users\Josh\Documents\AL51\src\win\wwindow.c  848
Error   16  error C2065: 'max' : undeclared identifier  c:\Users\Josh\Documents\AL51\src\win\wwindow.c  849
Error   21  error C2065: 'max' : undeclared identifier  c:\Users\Josh\Documents\AL51\src\win\wwindow.c  852
Error   5   error C2065: 'min' : undeclared identifier  c:\Users\Josh\Documents\AL51\src\win\wwindow.c  844
Error   7   error C2065: 'min' : undeclared identifier  c:\Users\Josh\Documents\AL51\src\win\wwindow.c  846
Error   10  error C2065: 'min' : undeclared identifier  c:\Users\Josh\Documents\AL51\src\win\wwindow.c  847
Error   19  error C2065: 'min' : undeclared identifier  c:\Users\Josh\Documents\AL51\src\win\wwindow.c  851
Error   12  error C2065: 'total_border_height' : undeclared identifier  c:\Users\Josh\Documents\AL51\src\win\wwindow.c  847
Error   18  error C2065: 'total_border_height' : undeclared identifier  c:\Users\Josh\Documents\AL51\src\win\wwindow.c  849
Error   9   error C2065: 'total_border_width' : undeclared identifier   c:\Users\Josh\Documents\AL51\src\win\wwindow.c  846
Error   15  error C2065: 'total_border_width' : undeclared identifier   c:\Users\Josh\Documents\AL51\src\win\wwindow.c  848
Error   1   error C2143: syntax error : missing ';' before 'type'   c:\Users\Josh\Documents\AL51\src\win\wwindow.c  841
Error   2   error C2143: syntax error : missing ';' before 'type'   c:\Users\Josh\Documents\AL51\src\win\wwindow.c  842
Error   4   error C2146: syntax error : missing ';' before identifier 'min' c:\Users\Josh\Documents\AL51\src\win\wwindow.c  844
Error   8   error C2224: left of '.x' must have struct/union type   c:\Users\Josh\Documents\AL51\src\win\wwindow.c  846
Error   14  error C2224: left of '.x' must have struct/union type   c:\Users\Josh\Documents\AL51\src\win\wwindow.c  848
Error   11  error C2224: left of '.y' must have struct/union type   c:\Users\Josh\Documents\AL51\src\win\wwindow.c  847
Error   17  error C2224: left of '.y' must have struct/union type   c:\Users\Josh\Documents\AL51\src\win\wwindow.c  849
Error   3   error C2275: 'POINT' : illegal use of this type as an expression    c:\Users\Josh\Documents\AL51\src\win\wwindow.c  844
Error   20  error C2440: '=' : cannot convert from 'int' to 'POINT' c:\Users\Josh\Documents\AL51\src\win\wwindow.c  851
Error   22  error C2440: '=' : cannot convert from 'int' to 'POINT' c:\Users\Josh\Documents\AL51\src\win\wwindow.c  852
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:21:15+00:00Added an answer on May 26, 2026 at 3:21 pm

    Visual C++ only supports C90 (not C99), so when compiling a C program, you must place all variable declarations at the top of the block, before any statements.

    The declarations of min, max, total_border_height and total_border_width all come after at least one statement in the block.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason if I try to get the actual size of mystruct I
For some reason the following code causes a SIGSEGV when I try to call
I'm getting undefined for some reason when I try to return the html via
For some reason every time I try to count the number of rows in
For some reason, when I try to install SQL Server 2008 Express , I
For some reason, when I try to animate textColor , it won't work. The
Roxygen works fine from within R, but for some reason it craps out when
Emacs noob here, For some reason, when I try to Open a existing C++
For some reason, onreadystatechange call back function is not being called in asynchronous mode.
I'm querying a DB using MS SQL and for some reason I get the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.