Click here to Skip to main content
15,911,360 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Lock a folder/Directory Pin
David Crow28-Feb-06 2:58
David Crow28-Feb-06 2:58 
AnswerRe: Lock a folder/Directory Pin
Ankush Mehta28-Feb-06 18:51
Ankush Mehta28-Feb-06 18:51 
GeneralRe: Lock a folder/Directory Pin
David Crow1-Mar-06 2:37
David Crow1-Mar-06 2:37 
QuestionHow to set only integer value property for an edit control Pin
BiswaR27-Feb-06 22:20
BiswaR27-Feb-06 22:20 
AnswerRe: How to set only integer value property for an edit control Pin
Nibu babu thomas27-Feb-06 22:26
Nibu babu thomas27-Feb-06 22:26 
AnswerRe: How to set only integer value property for an edit control Pin
Naveen27-Feb-06 22:29
Naveen27-Feb-06 22:29 
AnswerRe: How to set only integer value property for an edit control Pin
Naveen27-Feb-06 22:38
Naveen27-Feb-06 22:38 
GeneralRe: How to set only integer value property for an edit control Pin
BiswaR27-Feb-06 22:56
BiswaR27-Feb-06 22:56 
GeneralRe: How to set only integer value property for an edit control Pin
toxcct27-Feb-06 23:03
toxcct27-Feb-06 23:03 
GeneralRe: How to set only integer value property for an edit control Pin
Naveen27-Feb-06 23:16
Naveen27-Feb-06 23:16 
AnswerRe: How to set only integer value property for an edit control Pin
toxcct27-Feb-06 22:39
toxcct27-Feb-06 22:39 
QuestionHow to attach a menu to a Window? Pin
Mahhouraaaaaa27-Feb-06 22:03
Mahhouraaaaaa27-Feb-06 22:03 
AnswerRe: How to attach a menu to a Window? Pin
Nibu babu thomas27-Feb-06 22:07
Nibu babu thomas27-Feb-06 22:07 
General[Message Deleted] Pin
Mahhouraaaaaa27-Feb-06 22:17
Mahhouraaaaaa27-Feb-06 22:17 
GeneralRe: How to attach a menu to a Window? Pin
Nibu babu thomas27-Feb-06 22:18
Nibu babu thomas27-Feb-06 22:18 
GeneralRe: How to attach a menu to a Window? Pin
Mahhouraaaaaa27-Feb-06 22:29
Mahhouraaaaaa27-Feb-06 22:29 
GeneralRe: How to attach a menu to a Window? Pin
Nibu babu thomas27-Feb-06 22:52
Nibu babu thomas27-Feb-06 22:52 
AnswerRe: How to attach a menu to a Window? Pin
toxcct27-Feb-06 22:35
toxcct27-Feb-06 22:35 
AnswerRe: How to attach a menu to a Window? Pin
Mahhouraaaaaa27-Feb-06 22:41
Mahhouraaaaaa27-Feb-06 22:41 
Questionhelp, about waveinopen on w2k Pin
black frank27-Feb-06 20:47
black frank27-Feb-06 20:47 
AnswerRe: help, about waveinopen on w2k Pin
black frank1-Mar-06 13:26
black frank1-Mar-06 13:26 
Questionhow to load bitmap image in a sub-window? Pin
adiilah27-Feb-06 20:30
adiilah27-Feb-06 20:30 
AnswerRe: how to load bitmap image in a sub-window? Pin
Naveen27-Feb-06 20:51
Naveen27-Feb-06 20:51 
AnswerRe: how to load bitmap image in a sub-window? Pin
Hamid_RT27-Feb-06 21:04
Hamid_RT27-Feb-06 21:04 
AnswerRe: how to load bitmap image in a sub-window? Pin
Stephen Hewitt27-Feb-06 21:23
Stephen Hewitt27-Feb-06 21:23 
Here's one way (I assume you want to load from a file):

1. Add a picture control to the dialog, be sure to set its type to "bitmap". Change to ID to something meaningful.

2. Using the ClassWizard add a member variable of type CStatic for the control, call it m_Picture.

3. Add the following to your class declaration:
HBITMAP m_hBM;

4. Add the following code to the dialog's OnInitDialog handler:
HBITMAP m_hBM = reinterpret_cast<HBITMAP>(
     LoadImage(
         NULL,
         _T("C:\\130x130.bmp"),
         IMAGE_BITMAP,
         0,
         0,
         LR_LOADFROMFILE
     )
);
m_Picture.SetBitmap(m_hBM);


5. Add the following in a WM_DESTROY handler:
DeleteObject(m_hBM);


Steve

Steve

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.