Same thing. It compiles ok, but no status bar appear on the window.
Main Topics
Browse All TopicsFirst of all I am using the API not MFC, but since there is no API section, my question goes here.
I want to create a status bar on a dialog window. If I do:
CreateWindowEx(0, "msctls_statusbar32", NULL, WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hwnd_main, NULL, GetModuleHandle(NULL), NULL);
It works fine. But I want to create it in the resource file (.rc). I try (inside the DIALOG definition):
CONTROL "", IDC_STATUSBAR, "msctls_statusbar32", WS_CHILD | WS_VISIBLE, 0, 0, 0, 0
It compiles fine but no status bar appear. Any Ideas?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I found the problem: when I call SetMenu, it pushes all controls down to insert the menu, and the status bar is pushed outside the dialog. If I take out the SetMenu, the status bar appears fine. When I create the status bar using CreateWindowEx, the status bar is created after the menu is inserted, so the problem doesn't happen.
This is the cause of the problem, but I still have no solution.
I am trying this in Visual C++ 6.0, SDK app. Works fine for me even after i added the menu. What version of visual studio are you trying this in?
Here is my dialog resource -
IDD_ABOUTBOX DIALOG DISCARDABLE 22, 17, 230, 75
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "About"
MENU IDC_SDKTEST
FONT 8, "System"
BEGIN
ICON IDI_SDKTEST,IDC_MYICON,14,
LTEXT "SDKTest Version 1.0",IDC_STATIC,49,10,119,
LTEXT "Copyright (C) 2007",IDC_STATIC,49,20,119
DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_G
CONTROL "",IDC_STATUSBAR,"msctls_s
END
Business Accounts
Answer for Membership
by: PriyeshPosted on 2007-04-07 at 12:24:13ID: 18870206
Try this - tatusbar32 ",CCS_BOTT OM,11,52,1 47,30
CONTROL "",IDC_STATUSBAR,"msctls_s