anyone can help me to explain code below?
-
-
dear all anyone can help me to explain code below? m_hbmp=m_vicImg.hBitmap; CStatic *pImgPicture=(CStatic*)GetDlgItem(IDC_staImg1); pImgPicture->SetBitmap(m_hbmp); i am not good in VC++, i know this is fundamental things. thanks a lot
Li Zhiyuan
what don't you understand in this actually ? this is C code in Win32...
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
what don't you understand in this actually ? this is C code in Win32...
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
toxcct wrote:
this is C code in Win32...
Actually it's C++ code in MFC ;)
Cédric Moonen Software developer
Charting control [v1.3 - Updated] -
toxcct wrote:
this is C code in Win32...
Actually it's C++ code in MFC ;)
Cédric Moonen Software developer
Charting control [v1.3 - Updated]well there's nothing to see the difference here ^^
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
well there's nothing to see the difference here ^^
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
CStatic is a MFC class (WIN32 doesn't have wrapper classes). And C doesn't have classes neither. So CQFD :-D
Cédric Moonen Software developer
Charting control [v1.3 - Updated] -
CStatic is a MFC class (WIN32 doesn't have wrapper classes). And C doesn't have classes neither. So CQFD :-D
Cédric Moonen Software developer
Charting control [v1.3 - Updated]oops, i didn't watch further, and i only saw a pointer to a "user defined type"...lol CQFD :doh:
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
dear all anyone can help me to explain code below? m_hbmp=m_vicImg.hBitmap; CStatic *pImgPicture=(CStatic*)GetDlgItem(IDC_staImg1); pImgPicture->SetBitmap(m_hbmp); i am not good in VC++, i know this is fundamental things. thanks a lot
Li Zhiyuan
li zhiyuan wrote:
m_hbmp=m_vicImg.hBitmap;
Assigns to
this
object's (aCDialog
derived class?)m_hbmp
member (probably a HBITMAP, i.e. a Bitmap handle) the value ofm_vicImg.hBitmap
(i.e. the memberhBitmap
of them_vicImg
object (that you only know and probably is another member ofthis
object).li zhiyuan wrote:
CStatic *pImgPicture=(CStatic*)GetDlgItem(IDC_staImg1);
Gets a pointer to a
CStatic
object representing the dialog static control havingID
equal toIDC_staImg1
.li zhiyuan wrote:
pImgPicture->SetBitmap(m_hbmp);
Calls the
SetBitmap
method of theCStatic
object. This should change the bitmap represented by the dialog static control. BTW You can also get some information reading MSDN documentation. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
dear all anyone can help me to explain code below? m_hbmp=m_vicImg.hBitmap; CStatic *pImgPicture=(CStatic*)GetDlgItem(IDC_staImg1); pImgPicture->SetBitmap(m_hbmp); i am not good in VC++, i know this is fundamental things. thanks a lot
Li Zhiyuan
You can declare a variable for static control instead make a pointer.