Google Answers Logo
View Question
 
Q: Microsoft Windows status bar displays unwanted size grip ( No Answer,   0 Comments )
Question  
Subject: Microsoft Windows status bar displays unwanted size grip
Category: Computers > Programming
Asked by: tjboemker-ga
List Price: $10.00
Posted: 04 Aug 2003 11:55 PDT
Expires: 03 Sep 2003 11:55 PDT
Question ID: 238947
The following program displays a window with a status bar.  Both the
window and the status bar display size grips (the /// in the lower
right corners), but I think it is incorrect for the status bar to
display one since I did not specify SBARS_SIZEGRIP in the status bar's
CreateWindow.

I am looking for an answer that does either of the following:

1) Uses official Microsoft documentation or publications to explain
why the observed behavior is correct & how to get the desired behavior
without resorting to a workaround (I already know that clearing
WS_THICKFRAME when creating the main window & setting it later is a
workaround), or
2) Uses official Microsoft documentation or publications to show that
this is a known bug.

#include <windows.h>
#include <tchar.h>
#include <commctrl.h>

int APIENTRY _tWinMain(HINSTANCE hInstance,
                       HINSTANCE hPrevInstance,
                       LPTSTR    lpCmdLine,
                       int       nCmdShow)
{
        InitCommonControls();
        WNDCLASSEX wcex;
        wcex.cbSize = sizeof(WNDCLASSEX);
        wcex.style                      = 0;
        wcex.lpfnWndProc        = DefWindowProc;
        wcex.cbClsExtra         = 0;
        wcex.cbWndExtra         = 0;
        wcex.hInstance          = hInstance;
        wcex.hIcon                      = LoadIcon(hInstance,
(LPCTSTR)IDI_APPLICATION);
        wcex.hCursor            = LoadCursor(NULL, IDC_ARROW);
        wcex.hbrBackground      = (HBRUSH)
GetStockObject(WHITE_BRUSH);
        wcex.lpszMenuName       = 0;
        wcex.lpszClassName      = "MyWindowClass";
        wcex.hIconSm            = LoadIcon(wcex.hInstance,
(LPCTSTR)IDI_APPLICATION);
        RegisterClassEx(&wcex);
        HWND hWnd = CreateWindow("MyWindowClass","MyWindow",
                WS_VISIBLE | WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN |
WS_HSCROLL | WS_VSCROLL,
                0, 0, 300, 300, NULL, NULL, hInstance, NULL);
        HWND hStatusBar = CreateWindow(STATUSCLASSNAME, "StatusBar",
                WS_VISIBLE | WS_CHILD, 0, 0, 0, 0, hWnd, NULL,
hInstance, NULL);
        MSG msg;
        while(GetMessage(&msg, NULL, 0, 0)) {
                TranslateMessage(&msg);
                DispatchMessage(&msg);
        }
        return (int) msg.wParam;
}
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy