Click here to Skip to main content
15,924,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Creating an escaped windows path? Pin
hyling22-Sep-04 9:45
hyling22-Sep-04 9:45 
GeneralStruggling with multiple views Pin
Budric B.22-Sep-04 8:09
Budric B.22-Sep-04 8:09 
GeneralRe: Struggling with multiple views Pin
Jeff Bogan22-Sep-04 8:30
Jeff Bogan22-Sep-04 8:30 
GeneralRe: Struggling with multiple views Pin
Budric B.22-Sep-04 8:45
Budric B.22-Sep-04 8:45 
GeneralRe: Struggling with multiple views Pin
Jeff Bogan22-Sep-04 9:02
Jeff Bogan22-Sep-04 9:02 
GeneralRe: Thanks Pin
Budric B.22-Sep-04 9:50
Budric B.22-Sep-04 9:50 
GeneralRe: Thanks Pin
Jeff Bogan22-Sep-04 9:53
Jeff Bogan22-Sep-04 9:53 
GeneralCannot display bitmap using LoadImage() function! Pin
YooVeeAy22-Sep-04 7:55
YooVeeAy22-Sep-04 7:55 
I am trying to display three different bitmaps on my dialog form. On my dialog, I have designated 3 picture controls where these bitmaps should appear. I am having trouble using LoadImage to display the bitmap, however.

Here I create handles to each bitmap:

HANDLE PICTUREONE = ::LoadImage(
NULL,
MAKEINTRESOURCE(IDB_PICTUREONE),
IMAGE_BITMAP,
0,
0,
LR_DEFAULTCOLOR);

HANDLE PICTURETWO = ::LoadImage(
NULL,
MAKEINTRESOURCE(IDB_PICTURETWO),
IMAGE_BITMAP,
0,
0,
LR_DEFAULTCOLOR);

etc...


Then in a switch statement, I decide which bitmap to display for each control on my dialog...

switch (PictureToDisplayCondition)
{
case 1:
GetDlgItem(IDC_CONTROL1)->SendMessage(
STM_SETIMAGE,
(WPARAM) IMAGE_BITMAP,
(LPARAM) PICTUREONE);
break;

case 2:
GetDlgItem(IDC_CONTROL2)->SendMessage(
STM_SETIMAGE,
(WPARAM) IMAGE_BITMAP,
(LPARAM) PICTURETWO);
break;

case OAS_D_FULL_OPEN:
GetDlgItem(IDC_CONTROL3)->SendMessage(
STM_SETIMAGE,
(WPARAM) IMAGE_BITMAP,
(LPARAM) PICTURETHREE);
break;

default:
break;
}

I tried to pass AfxGetResourceHandle() as the first parameter in my LoadImage()function but I get an assertion error... Can someone tell me what I am doing wrong here? Thanks!!!!

GeneralRe: Cannot display bitmap using LoadImage() function! Pin
Jeff Bogan22-Sep-04 8:15
Jeff Bogan22-Sep-04 8:15 
GeneralRe: Cannot display bitmap using LoadImage() function! Pin
YooVeeAy22-Sep-04 9:03
YooVeeAy22-Sep-04 9:03 
GeneralRe: Cannot display bitmap using LoadImage() function! Pin
Jeff Bogan22-Sep-04 9:34
Jeff Bogan22-Sep-04 9:34 
GeneralBitMap to RGN Window Pin
KciNKh22-Sep-04 7:42
KciNKh22-Sep-04 7:42 
GeneralRe: BitMap to RGN Window Pin
Alexander M.,22-Sep-04 10:33
Alexander M.,22-Sep-04 10:33 
GeneralVisual Studio 6.0 against C++.Net Pin
Jeff Bogan22-Sep-04 7:31
Jeff Bogan22-Sep-04 7:31 
Generaldelete Array function logic error Pin
Anonymous22-Sep-04 7:20
Anonymous22-Sep-04 7:20 
GeneralRe: delete Array function logic error Pin
David Crow22-Sep-04 9:39
David Crow22-Sep-04 9:39 
GeneralRe: delete Array function logic error Pin
ISUstudent22-Sep-04 13:32
ISUstudent22-Sep-04 13:32 
GeneralCustom control based on Uri Mellshior crashes Pin
greanie22-Sep-04 6:47
greanie22-Sep-04 6:47 
GeneralHelp : Save 4 & 8 bits Bitmap image Pin
ardhendu12322-Sep-04 5:17
ardhendu12322-Sep-04 5:17 
GeneralHelp : Bitmap of 24-bit to 4 and 8-bits Pin
ardhendu12322-Sep-04 5:06
ardhendu12322-Sep-04 5:06 
GeneralPostMessage from Service Pin
Anonymous22-Sep-04 4:32
Anonymous22-Sep-04 4:32 
GeneralRe: PostMessage from Service Pin
Jonathan [Darka]22-Sep-04 5:23
professionalJonathan [Darka]22-Sep-04 5:23 
GeneralProblem with COptionTree Pin
Delphin5122-Sep-04 3:59
sussDelphin5122-Sep-04 3:59 
GeneralRe: Problem with COptionTree Pin
Jeff Bogan22-Sep-04 8:20
Jeff Bogan22-Sep-04 8:20 
GeneralRe: Problem with COptionTree Pin
Delphin5122-Sep-04 10:37
sussDelphin5122-Sep-04 10:37 

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.