Click here to Skip to main content
15,891,253 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: No static linking Pin
peterchen1-May-04 7:23
peterchen1-May-04 7:23 
GeneralRe: No static linking Pin
PJ Arends1-May-04 14:16
professionalPJ Arends1-May-04 14:16 
QuestionReversal of VkKeyScan? Pin
Abin1-May-04 5:31
Abin1-May-04 5:31 
AnswerRe: Reversal of VkKeyScan? Pin
User 66581-May-04 7:22
User 66581-May-04 7:22 
AnswerRe: Reversal of VkKeyScan? Pin
Mike Dimmick2-May-04 0:14
Mike Dimmick2-May-04 0:14 
Questionhow to trap events and post it to a desired window Pin
shammyrly1-May-04 4:57
shammyrly1-May-04 4:57 
AnswerRe: how to trap events and post it to a desired window Pin
Abin1-May-04 5:36
Abin1-May-04 5:36 
QuestionHow do I load a 16x16 icon? Pin
Barvus1-May-04 4:38
Barvus1-May-04 4:38 
I'm trying to display a small icon in a CStatusBarCtrl. I created a 16x16 icon, IDI_X, in the resource editor, then I tried the following:

HICON hIcon;
hIcon = theApp.LoadIcon(MAKEINTRESOURCE(IDI_X));
m_wndSBC.SetIcon(0, hIcon);

The icon is resized to 32x32 and doesn't fit in the status bar. The CApp::LoadIcon documentation says it can only be used to load an icon whose size conforms to the SM_CXICON and SM_CYICON system metric. It says to use LoadImage instead. So, I tried this:

HANDLE hIcon;
hIcon = LoadImage(NULL, MAKEINTRESOURCE(IDI_X),
IMAGE_ICON, 0, 0, 0);
DWORD dwError;
dwError = GetLastError();

That didn't work either. LoadImage returns NULL and GetLastError returns 1813: "The specified resource type cannot be found in the image file."

Can anyone help?


AnswerRe: How do I load a 16x16 icon? Pin
Barvus1-May-04 4:59
Barvus1-May-04 4:59 
AnswerRe: How do I load a 16x16 icon? Pin
Michael Dunn1-May-04 6:06
sitebuilderMichael Dunn1-May-04 6:06 
GeneralRe: How do I load a 16x16 icon? Pin
Barvus1-May-04 6:25
Barvus1-May-04 6:25 
GeneralRe: How do I load a 16x16 icon? Pin
Michael Dunn1-May-04 6:46
sitebuilderMichael Dunn1-May-04 6:46 
GeneralRe: How do I load a 16x16 icon? Pin
Barvus1-May-04 7:02
Barvus1-May-04 7:02 
GeneralRe: How do I load a 16x16 icon? Pin
f641-May-04 19:21
f641-May-04 19:21 
GeneralRe: How do I load a 16x16 icon? Pin
Barvus1-May-04 20:05
Barvus1-May-04 20:05 
GeneralRe: How do I load a 16x16 icon? Pin
f642-May-04 6:11
f642-May-04 6:11 
Questionwhy doesn't run well about string type in this way? Pin
vividtang1-May-04 2:15
vividtang1-May-04 2:15 
AnswerRe: why doesn't run well about string type in this way? Pin
Jijo.Raj1-May-04 2:46
Jijo.Raj1-May-04 2:46 
GeneralRe: why doesn't run well about string type in this way? Pin
vividtang1-May-04 4:00
vividtang1-May-04 4:00 
AnswerRe: why doesn't run well about string type in this way? Pin
Michael Dunn1-May-04 6:12
sitebuilderMichael Dunn1-May-04 6:12 
GeneralPutting .Dll inside .Exe Pin
Opwar30-Apr-04 22:58
Opwar30-Apr-04 22:58 
GeneralRe: Putting .Dll inside .Exe Pin
Alexander M.,1-May-04 0:47
Alexander M.,1-May-04 0:47 
GeneralRe: Putting .Dll inside .Exe Pin
Opwar1-May-04 10:42
Opwar1-May-04 10:42 
GeneralRe: Putting .Dll inside .Exe Pin
Alexander M.,3-May-04 1:50
Alexander M.,3-May-04 1:50 
GeneralAccessing public variable Pin
Krugger40430-Apr-04 22:11
Krugger40430-Apr-04 22:11 

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.