Überprüfen auf Inhalt
-
Hi,
bis zur nächsten Frage hat es doch nicht sehr lange gedauert

also, ich hab nun 3 dieser Picture, in die ich Bitmaps laden will. Für alle 3 hab ich Membervariablen angelegt. Nun will ich überprüfen ob schon ein Bild auf dem Picture liegt. So grob nach diesem Muster
if(m_Bild1 == NULL) { m_Bild1.setBitmap(bitmap); }So und da sagt er mir das ich das so nicht vergleichen kann. Ich such zwar grad, in MSDN, aber so richtig sagt die da nix aus.
Wie immer, ich freue mich über Hilfe, Links und Tips
blub

-
lol? Such mal wirklich in der MSDN ...

-
tja, wie wäre es mit ne guten Stichword
CStatic hat zumindest in der MSDN die ich hab sowas nicht, oder ich such falsch, bin noch auf das mit PictureHolder gestoßen, aber da weiß ich nicht ob es die richtige Richtung ist
-
MSDN! schrieb:
MFC Library Reference
CStatic::GetBitmapSee Also
CStatic Overview | Class Members | Hierarchy Chart | CStatic::SetBitmap | STM_GETIMAGE | Bitmaps
Gets the handle of the bitmap, previously set with SetBitmap, that is associated with CStatic.HBITMAP GetBitmap( ) const;
Return Value
A handle to the current bitmap, or NULL if no bitmap has been set.Example
CStatic myStatic;// Create a child bitmap static control.
myStatic.Create(_T("my static"),
WS_CHILD|WS_VISIBLE|SS_BITMAP|SS_CENTERIMAGE, CRect(10,10,150,50),
pParentWnd);// If no bitmap is defined for the static control, define the bitmap
// to the system close bitmap.
if (myStatic.GetBitmap() == NULL)
myStatic.SetBitmap( ::LoadBitmap(NULL, MAKEINTRESOURCE(OBM_CLOSE)) );
See Also
CStatic Overview | Class Members | Hierarchy Chart | CStatic::SetBitmap | STM_GETIMAGE | Bitmaps--------------------------------------------------------------------------------
Send feedback on this topic to Microsoft
Microsoft Corporation. All rights reserved.
-
ähm, ist das online msdn? erstmal danke, werd mal meine suche anders gestalten müssen

-
Nein, das war die MSDN zum Visual Studio .NET 2003
In der MSDN zu VC++ 6.0 siehts so aus:
MSDN schrieb:
CBitmap::GetBitmap
int GetBitmap( BITMAP* pBitMap );Return Value
Nonzero if successful; otherwise 0.
Parameters
pBitMap
Pointer to a BITMAP structure. Must not be NULL.
Remarks
Call this member function to retrieve information about a CBitmap object. This information is returned in the BITMAP structure referred to by pBitmap.
CBitmap Overview | Class Members | Hierarchy Chart
See Also BITMAP
--------------------------------------------------------------------------------
Send feedback to MSDN.Look here for MSDN Online resources.Solltest deine Suche wohl wirklich anders gestalten ...
-
So hab da jetzt noch ne kleine Frage ob ich das richtig verstanden habe.
Also, wenn ich das Bitmap mit
m_Test.SetBitmap(bit);darstelle, kann ich von m_Test die Bitmapinformation über diesen Pointer auslesen. Hab ich das so richtig verstanden?
blub

-
So also zumindest bei mir komm ich mit folgender Sache zu dem gewünschten Ende:
void Bilder::OnUebergabe() { if(m_Bildoben.GetBitmap() == 0) { MessageBox("Bild Ist leer"); } else { MessageBox("Da ist ein Bild drin");} }Vieleicht hilft es dem einen oder anderen.

@deus
thx, für die MSDN-Infos. Werd jetzt immer die gesamte MSDN bei einer Suche durchsuchen lassen
mfg blub

-
Wie wäre es einfach, wenn du systematisch suchst? Du suchst nen Member von CStatic. Also gehste in den Index, gibts CStatic ein, klickst auf class members und guckst dir die Funktionen an, dies da gibt. So finde ich eigentlich immer, was ich brauch.
-
mh, oder so
also heut hab ich schon alles gefunden was ich brauchtemfg blub

-
mh, oder so
also heut hab ich schon alles gefunden was ich brauchtemfg blub
