quosta
asked on
How do you load a BMP into CStatic
I've been looking at the docs in MSVC++ 5 and can only find rough inferances to the how to's of loading a bitmap into a Cstatic control in a form view. How do I load this BMP from file and then enter it into the static ctrl?? I need to be able to load dynamically as the bitmap will change as the user inputs data.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I guess I missed something.
I tried your solution, but I get a compile error that states : error C2039: 'LoadImageA' : is not a member of 'CStatic'
I have a control on my DialogBox with the name of "IDC_Selected_Pic"
In my code I execute the command:
CStatic* Pic2 = (CStatic*) GetDlgItem(IDC_Selected_Pi c);
Then I execute the statement:
intpBLError = Pic2->LoadImage(NULL,TheFi le,IMAGE_B ITMAP,cxDI B,cyDIB,LR _LOADFROMF ILE);
The above code generates the error: error C2039: 'LoadImageA' : is not a member of 'CStatic'
The control that I placed on the form came from the tool box as a "picture", which I gave the "Type" of "Bitmap" on the "General" tab.
Please help...............
I tried your solution, but I get a compile error that states : error C2039: 'LoadImageA' : is not a member of 'CStatic'
I have a control on my DialogBox with the name of "IDC_Selected_Pic"
In my code I execute the command:
CStatic* Pic2 = (CStatic*) GetDlgItem(IDC_Selected_Pi
Then I execute the statement:
intpBLError = Pic2->LoadImage(NULL,TheFi
The above code generates the error: error C2039: 'LoadImageA' : is not a member of 'CStatic'
The control that I placed on the form came from the tool box as a "picture", which I gave the "Type" of "Bitmap" on the "General" tab.
Please help...............
P.S.
My operating system is NT. Is this the reason that it does not work?
My operating system is NT. Is this the reason that it does not work?
ASKER
Thanks for the help.