Skip to main content
gamedev.net
🔒 Locked

question about static function

Started by JinJo 0 replies 100+ views
Original Post
JinJo
JinJo
heres the code im using
      
void E_Bitmap::LoadFromFile(LPTSTR lpzFilename)
{
	m_hBitmap  = (HBITMAP) LoadImage(NULL, lpzFilename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
	
	SIZE size;
	GetBitmapDimensionEx(m_hBitmap, &size);
	m_iWidth = size.cx;
	m_iHeight = size.cy;
}
      
But width and height keep getting set to zero. Whats going on //edit Actually i dont think thats the problem cos ive printed values out to a file and they are correct. The variable thats of this class is a static global and the function i want to be calling it from is a static callback function for a dialog box. Now only when the getwidth and get height functions are called within this static callback function do they return 0. Why is this, is there a quick way around it. [edited by - JinJo on February 25, 2003 4:55:33 PM] [edited by - JinJo on February 25, 2003 5:39:10 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.