Click here to Skip to main content
15,912,897 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: convert CString to HEX Pin
Gary R. Wheeler23-Feb-03 4:42
Gary R. Wheeler23-Feb-03 4:42 
Generalcheck box Pin
dudic23-Feb-03 1:05
dudic23-Feb-03 1:05 
GeneralRe: check box Pin
Hans Ruck23-Feb-03 3:28
Hans Ruck23-Feb-03 3:28 
QuestionHow to use Microsoft Layer for Unicode with MFC app Pin
Valera24117623-Feb-03 0:03
Valera24117623-Feb-03 0:03 
AnswerRe: How to use Microsoft Layer for Unicode with MFC app Pin
dan o23-Feb-03 23:32
dan o23-Feb-03 23:32 
GeneralBitmaps again... Pin
Dennis L22-Feb-03 22:46
Dennis L22-Feb-03 22:46 
GeneralRe: Bitmaps again... Pin
Joaquín M López Muñoz23-Feb-03 5:10
Joaquín M López Muñoz23-Feb-03 5:10 
GeneralRe: Bitmaps again... Pin
MAAK23-Feb-03 9:44
MAAK23-Feb-03 9:44 
As I understand you want to change the bitmaps of the control on clicking a button.
You may do this by storing the bitmaps in HBITMAP array and sending the STM_SETIMAGE on each click after changing the bitmaps array counter.

This code may illustrate.

HBITMAP hBitmaps[4];  //load your bitmaps to this array
int index = 0         //the index of the bitmap to be loaded
.
.
.
case IDC_YOURBUTTON: //the button click handler
        index++;
        index = index < 4 ? index : 0;
        HWND hWnd = ::GetDlgItem(hDlg, IDC_MYPICTURE);
  	::SendMessage(hWnd, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hBitmaps[index]);
.
.
.

note that we do not delete the current bitmap in the control as in the last post becaues we want to preserve the bitmaps to continue the switching.
GeneralSplitting a CString Pin
ROK_RShadow22-Feb-03 21:38
ROK_RShadow22-Feb-03 21:38 
GeneralRe: Splitting a CString Pin
Pavel Klocek23-Feb-03 1:25
Pavel Klocek23-Feb-03 1:25 
GeneralRe: Splitting a CString Pin
Big Art23-Feb-03 10:48
Big Art23-Feb-03 10:48 
GeneralRe: Splitting a CString Pin
ROK_RShadow23-Feb-03 12:36
ROK_RShadow23-Feb-03 12:36 
GeneralRe: Splitting a CString Pin
Big Art24-Feb-03 5:21
Big Art24-Feb-03 5:21 
GeneralNeed help on some weird errors Pin
Abin22-Feb-03 20:23
Abin22-Feb-03 20:23 
GeneralRe: Need help on some weird errors Pin
Michael Dunn22-Feb-03 20:35
sitebuilderMichael Dunn22-Feb-03 20:35 
Generalstoring and accessing file names from FindNextFile() Pin
kiken22-Feb-03 18:11
kiken22-Feb-03 18:11 
GeneralRe: storing and accessing file names from FindNextFile() Pin
valikac22-Feb-03 18:19
valikac22-Feb-03 18:19 
GeneralRe: storing and accessing file names from FindNextFile() Pin
Michael Dunn22-Feb-03 18:24
sitebuilderMichael Dunn22-Feb-03 18:24 
GeneralToolbars Pin
boon kian22-Feb-03 17:14
boon kian22-Feb-03 17:14 
GeneralRe: Toolbars Pin
ROK_RShadow22-Feb-03 17:41
ROK_RShadow22-Feb-03 17:41 
GeneralRe: Toolbars Pin
boon kian22-Feb-03 18:43
boon kian22-Feb-03 18:43 
GeneralRe: Toolbars Pin
ROK_RShadow22-Feb-03 19:12
ROK_RShadow22-Feb-03 19:12 
GeneralCommand Routing Pin
ROK_RShadow22-Feb-03 16:21
ROK_RShadow22-Feb-03 16:21 
GeneralRe: Command Routing Pin
Taka Muraoka23-Feb-03 0:43
Taka Muraoka23-Feb-03 0:43 
GeneralHelp me please,Urgent!! Pin
ucc80122-Feb-03 15:25
ucc80122-Feb-03 15:25 

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.