Click here to Skip to main content
16,007,472 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCreateWindow Pin
Nick Armstrong12-Sep-01 3:12
Nick Armstrong12-Sep-01 3:12 
GeneralRe: CreateWindow Pin
12-Sep-01 3:20
suss12-Sep-01 3:20 
GeneralRe: CreateWindow Pin
Nick Armstrong12-Sep-01 3:38
Nick Armstrong12-Sep-01 3:38 
GeneralRe: CreateWindow Pin
Steen Krogsgaard12-Sep-01 4:19
Steen Krogsgaard12-Sep-01 4:19 
GeneralRe: CreateWindow Pin
Nick Armstrong12-Sep-01 5:01
Nick Armstrong12-Sep-01 5:01 
GeneralRe: CreateWindow Pin
Carlos Antollini12-Sep-01 3:34
Carlos Antollini12-Sep-01 3:34 
GeneralRe: CreateWindow Pin
Tomasz Sowinski12-Sep-01 3:36
Tomasz Sowinski12-Sep-01 3:36 
GeneralRe: CreateWindow Pin
Nick Armstrong14-Sep-01 3:39
Nick Armstrong14-Sep-01 3:39 
How do I get this child window ID?

So far I have the following code:

CreateWindow( "BUTTON",
"sample",
WS_CHILD | WS_VISIBLE | BS_BITMAP,
5,
5,
20,
20,
m_hWnd,
/*the child window ID will go here*/,
NULL,
NULL);

HBITMAP hBmp = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), "c:\\1.bmp", IMAGE_BITMAP, 16, 16, LR_LOADFROMFILE);

::SendMessage((HWND)hButton, BM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)hBmp);

Thanks for the help so far

Nick
GeneralRe: CreateWindow Pin
Tomasz Sowinski14-Sep-01 3:49
Tomasz Sowinski14-Sep-01 3:49 
GeneralRe: CreateWindow Pin
Nick Armstrong14-Sep-01 3:59
Nick Armstrong14-Sep-01 3:59 
GeneralRe: CreateWindow Pin
Tomasz Sowinski14-Sep-01 4:18
Tomasz Sowinski14-Sep-01 4:18 
GeneralRe: CreateWindow Pin
Nick Armstrong14-Sep-01 4:30
Nick Armstrong14-Sep-01 4:30 
GeneralRe: CreateWindow Pin
uzziah012-Feb-09 11:57
uzziah012-Feb-09 11:57 
Generalallocate memory Pin
Gérald Mercet11-Sep-01 23:41
Gérald Mercet11-Sep-01 23:41 
GeneralRe: allocate memory Pin
Bernhard12-Sep-01 0:09
Bernhard12-Sep-01 0:09 
GeneralRe: allocate memory Pin
Gérald Mercet12-Sep-01 0:16
Gérald Mercet12-Sep-01 0:16 
GeneralRe: allocate memory Pin
Joaquín M López Muñoz12-Sep-01 0:27
Joaquín M López Muñoz12-Sep-01 0:27 
GeneralRe: allocate memory Pin
Gérald Mercet12-Sep-01 0:35
Gérald Mercet12-Sep-01 0:35 
GeneralRe: allocate memory Pin
Bernhard12-Sep-01 0:27
Bernhard12-Sep-01 0:27 
GeneralRe: allocate memory Pin
Gérald Mercet12-Sep-01 0:36
Gérald Mercet12-Sep-01 0:36 
GeneralRe: allocate memory Pin
Tomasz Sowinski12-Sep-01 0:57
Tomasz Sowinski12-Sep-01 0:57 
GeneralRe: allocate memory Pin
Steen Krogsgaard12-Sep-01 2:36
Steen Krogsgaard12-Sep-01 2:36 
GeneralRe: allocate memory Pin
Gérald Mercet12-Sep-01 3:15
Gérald Mercet12-Sep-01 3:15 
GeneralRe: allocate memory Pin
Steen Krogsgaard12-Sep-01 3:59
Steen Krogsgaard12-Sep-01 3:59 
GeneralRe: allocate memory Pin
Gérald Mercet12-Sep-01 5:03
Gérald Mercet12-Sep-01 5:03 

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.