And if I have a button in ReBar how can I change state of it? Nulla dies sine linea !!!
Darked developer
Posts
-
ReBar - how to set button state on it? -
ReBar - how to set button state on it?Good Day. Please, can you give me an example how can I change state of the button with some id? I do like this: m_wndReBar.Create(this); m_wndReBar.AddBar(&m_wndToolBar); ... m_wndToolBar.SendMessage(TB_SETSTATE, ID, MAKELONG(TBSTATE_ENABLED, 0)); ... But nothing changes. What's wrong? Or what another ways exists to change the state? Nulla dies sine linea !!!
-
How can I create a colour btimap ?TNX, That helped me. I did it. Nulla dies sine linea !!!
-
How can I create a colour btimap ?Hi everyone. Recently I've began to study WTL programming and I 've got a question. Please explain me how can I create a colour bitmap from array of bits? Not colour bitmap I create like this: HBITMAP btmp; LPBITMAPINFO pbi; LPBITMAPINFOHEADER pbmph; bool CDisplay::initBmp(byte* Img) { if(pbi != NULL) delete [] pbi; if(btmp != NULL) DeleteObject(btmp); int headerSize = sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * 256; try { pbi = (LPBITMAPINFO)new char [headerSize]; pbmph = &(pbi->bmiHeader); memset(pbmph, 0, headerSize); pbmph->biSize = sizeof(BITMAPINFOHEADER); pbmph->biPlanes = 1; pbmph->biCompression = BI_RGB; pbmph->biClrUsed = 256; pbmph->biClrImportant = 256; pbmph->biBitCount = 8; // fill RGBQUAD LPRGBQUAD pRGBQ = (LPRGBQUAD)((LPSTR)pbmph + pbmph->biSize); for( int i = 0; i < 256; i++ ) { pRGBQ[i].rgbBlue = pRGBQ[i].rgbGreen = pRGBQ[i].rgbRed = i; } } catch(...) { return false; } pbmph->biWidth = MaxX[0]; pbmph->biHeight = MaxY[0]; pbmph->biSizeImage = MaxX[0]*MaxY[0]; btmp = CreateDIBitmap(GetDC(), pbmph, CBM_INIT, Img, pbi, DIB_RGB_COLORS); return true; } How create colour bitmap? P.S.: Sorry for my english if I wrote with errors. Nulla dies sine linea !!!