Hi guys, again sorry if there is a post like this looked and couldn't see anything
what I need is to know how to give a static control a bitmap from a resource file. I can get the static control to display with text and with the bitmap style specified, but it wont display when the bitmap is set sending the STM_SETIMAGE message, my code for setting up the static control looks like this
thanks in advacnce for any help you can provideCode:void Setup_Button (Window* window, Button & button, char const * caption, int x, int y, int width, int height, DWORD exStyle) { button._style = WS_CHILD | WS_VISIBLE | SS_BITMAP | SS_NOTIFY; button._caption = caption; button._exStyle = exStyle; button._x = x; // horizontal position of Button button._y = y; // vertical position od Button button._width = width; // Button width button._height = height; // Button height button._hWndParent = window->hWnd; // handle to parent or owner Button button._data = 0; // pointer to Button-creation data Create_Button(window, button); } HWND Create_Button (Window* window, Button & button) { button.hwnd = ::CreateWindowEx ( button._exStyle, "STATIC", button._caption, button._style, button._x, button._y, button._width, button._height, button._hWndParent, NULL, window->init.application->hInstance, button._data); if (button.hwnd == 0) TerminateApplication(window); LRESULT lResult = SendMessage(button.hwnd, STM_SETIMAGE, IMAGE_BITMAP, IDB_BITMAP1); return button.hwnd; }



LinkBack URL
About LinkBacks


