From: Larry on
Hi,

I am tring to create a regular status bar via C++ code, the following is
an excerpt:

[code]
#define STRICT
#include <windows.h>
#include <windowsx.h>
#pragma comment (lib, "comctl32.lib")
#include <commctrl.h>

(...)
#define IDC_STATUSBAR 600

HINSTANCE hInst; // Gloabl
(...)

// HANDLE_MSG (hWnd, WM_CREATE, Cls_OnCreate);
//
BOOL Cls_OnCreate(HWND hwnd, LPCREATESTRUCT lpCreateStruct)
{
InitCommonControls();
HWND hWndStatus = CreateWindowEx(0,TEXT("STATUSCLASSNAME"),NULL,
SBARS_SIZEGRIP | WS_CHILD | WS_VISIBLE,0, 0, 0, 0,
hwnd,(HMENU)IDC_STATUSBAR,hInst,NULL);

if (hWndStatus == NULL)
{
MessageBox (NULL, TEXT("Status Bar not created!"), NULL, MB_OK );
return false;
}
return true;
}
[/code]

I run the code and get the MessageBox() :-(

What am I doing wrong?

thanks

From: Christian ASTOR on
On 10 fév, 19:35, "Larry" <dontmewit...(a)got.it> wrote:

>  HWND hWndStatus = CreateWindowEx(0,TEXT("STATUSCLASSNAME"),NULL,

HWND hWndStatus = CreateWindowEx(0,STATUSCLASSNAME,NULL,