Click here to Skip to main content
16,005,162 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCDocument::SetTitle and split views? Pin
dazinith11-Sep-02 3:58
dazinith11-Sep-02 3:58 
GeneralCDHtmlDialog detecting NewWindow Pin
Anonymous11-Sep-02 3:52
Anonymous11-Sep-02 3:52 
GeneralOpen Saved Document Pin
Anonymous11-Sep-02 2:53
Anonymous11-Sep-02 2:53 
Generalgetting to a bitmap resource Pin
ns11-Sep-02 2:54
ns11-Sep-02 2:54 
GeneralRe: getting to a bitmap resource Pin
Tomasz Sowinski11-Sep-02 2:56
Tomasz Sowinski11-Sep-02 2:56 
GeneralRe: getting to a bitmap resource Pin
ns11-Sep-02 3:05
ns11-Sep-02 3:05 
GeneralRe: getting to a bitmap resource Pin
Tomasz Sowinski11-Sep-02 3:08
Tomasz Sowinski11-Sep-02 3:08 
GeneralRe: getting to a bitmap resource Pin
ns11-Sep-02 3:22
ns11-Sep-02 3:22 
No, it takes jpegs and tiffs too but it uses the same strategy (fread) and processes the pre-DIB section information in itself. But I have a bmp to deal with. I've not read up on DIB, DDB etc, and am learning as I go along. So I guess (sorry if I'm being unbelievably dense), what I want is somehow to get the pImage out from the resource. Is there something like:

char* pImage = Somefunction(IDB_BMP1);

Any links would be great. Meanwhile I'm hurrying along with my background reading. I did find how to get (I hope it works) to get at the colortable:

HGlobal pBMP =  ::LoadResource(NULL, ::FindResource(NULL, MAKEINTRESOURCE(ID), RT_BITMAP));

PBITMAPINFO pBMInfo = (PBITMAPINFO) (pBMP + sizeof(BITMAPFILEHEADER));

int bitCount = 8;
int clrUsed = 0; // use all 2^8

if (pBMInfo->bmiHeader.biBitCount != bitCount ||
    pBMInfo->bmiHeader.biClrUsed  != clrUsed    ) // return with no changes if not right size
    return;


memcpy(pPalette, pBMInfo->bmiColors, (4*clrUsed));




I havent tried it out yet. Surely this pBMP is not what I'm looking for? I need a char* back, and not sure what to do with an HGlobal.
GeneralRe: getting to a bitmap resource Pin
Tomasz Sowinski11-Sep-02 3:43
Tomasz Sowinski11-Sep-02 3:43 
GeneralRe: getting to a bitmap resource Pin
ns11-Sep-02 4:18
ns11-Sep-02 4:18 
GeneralRe: getting to a bitmap resource Pin
Tomasz Sowinski11-Sep-02 4:23
Tomasz Sowinski11-Sep-02 4:23 
Generalthanks!! Pin
ns11-Sep-02 4:37
ns11-Sep-02 4:37 
QuestionMapnetwork drive? Pin
Jawache11-Sep-02 2:22
Jawache11-Sep-02 2:22 
AnswerRe: Mapnetwork drive? Pin
Richard Jones11-Sep-02 4:18
Richard Jones11-Sep-02 4:18 
QuestionEquivalent of LineScroll for CStatics? Pin
Joaquín M López Muñoz11-Sep-02 2:22
Joaquín M López Muñoz11-Sep-02 2:22 
AnswerRe: Equivalent of LineScroll for CStatics? Pin
Tomasz Sowinski11-Sep-02 2:30
Tomasz Sowinski11-Sep-02 2:30 
GeneralRe: Equivalent of LineScroll for CStatics? Pin
Joaquín M López Muñoz11-Sep-02 2:33
Joaquín M López Muñoz11-Sep-02 2:33 
GeneralRe: Equivalent of LineScroll for CStatics? Pin
Tomasz Sowinski11-Sep-02 2:41
Tomasz Sowinski11-Sep-02 2:41 
GeneralRe: Equivalent of LineScroll for CStatics? Pin
Joaquín M López Muñoz11-Sep-02 2:45
Joaquín M López Muñoz11-Sep-02 2:45 
GeneralRe: Equivalent of LineScroll for CStatics? Pin
Tomasz Sowinski11-Sep-02 2:51
Tomasz Sowinski11-Sep-02 2:51 
GeneralRe: Equivalent of LineScroll for CStatics? Pin
Joaquín M López Muñoz11-Sep-02 2:52
Joaquín M López Muñoz11-Sep-02 2:52 
GeneralRe: Equivalent of LineScroll for CStatics? Pin
Tomasz Sowinski11-Sep-02 2:58
Tomasz Sowinski11-Sep-02 2:58 
GeneralRe: Equivalent of LineScroll for CStatics? Pin
Joaquín M López Muñoz11-Sep-02 3:03
Joaquín M López Muñoz11-Sep-02 3:03 
GeneralQuitting a wizard from within OnWizNext.. Pin
BigBear11-Sep-02 2:20
BigBear11-Sep-02 2:20 
GeneralRe: Quitting a wizard from within OnWizNext.. Pin
Simon.W11-Sep-02 3:35
Simon.W11-Sep-02 3:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.