images on windowss.

Hi, i am using the windows.h library, and I've had some difficulties with this. I am trying to show a image in my graphical interface. My program is working, but the image dont is showed. The program compile and execute.
I think the bitmap what i am trying to show dont was on the right folder, or the way to the image was wrong. Can anyone show me an example to try to see what is wrong or help me with other metod? Thanks!!

hLogo = (L"Static",NULL,WS_VISIBLE | WS_CHILD | SS_BITMAP, 150, 120, 150 , 20,hWnd,NULL,NULL,NULL);
SendMessageW(hLogo,STM_SETIMAGE,IMAGE_BITMAP,(LPARAM) hLogoImage);
}

void loadImages()
{

hLogoImage = (HBITMAP)LoadImageW(NULL, L"Logo.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);

}

Check the return value of LoadImage.
How I do this? I am very beginning
1
2
3
4
5
6
7
8
  if (hLogoImage == NULL)
  {
    MessageBoxA(NULL, "Error loading image", "ERROR!", MB_OK);
  }
  else
  {
    // draw your image here
  }
I put it on my code, compile and execute, and nothing is changed. This significe they return the else, but the image don't was shown.
I don't use windows, but this can't possibly be correct:
 
hLogo = (L"Static",NULL,WS_VISIBLE | WS_CHILD | SS_BITMAP, 150, 120, 150 , 20,hWnd,NULL,NULL,NULL);

tpb, indeed. I assume detro is trying to create a child window?

 
hLogo = CreateWindow(L"Static",NULL,WS_VISIBLE | WS_CHILD | SS_BITMAP, 150, 120, 150 , 20,hWnd,NULL,NULL,NULL);

(Not tested)

http://forums.codeguru.com/showthread.php?491604-Windows-SDK-What-is-a-child-window
Last edited on
No, I am trying to put a bitmap image on my window.
Last edited on
Oh, I was doing a error of principiant. The error is so idiot that I dont want nor to show what I was doing wrong for you, hahaha. Thanks for the help!!
Registered users can post here. Sign in or register to post.