-
August 17th, 2011, 02:54 PM
#1
Cimage can not a valid hbitmap
Cimage img;
img.Attach(hbitmap);
debuggin shows that hbitmap is valid but program fails at Attach line. Thank you if you could help me.
-
August 17th, 2011, 03:19 PM
#2
Re: Cimage can not a valid hbitmap
Originally Posted by Befefe
debuggin shows that hbitmap is valid...
How does it show that?
Originally Posted by Befefe
program fails at Attach line.
How does it fail? Any error message?
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio:
FeinWindows - replacement windows manager for Visual Studio, and more...
-
August 17th, 2011, 04:31 PM
#3
Re: Cimage can not a valid hbitmap
If I have a HBITMAP, then I would like to use it in
Image or CImage or CBitmap or Bitmap, what I can I do, say, to save it in my drive ?
-
August 18th, 2011, 01:12 PM
#4
Re: Cimage can not a valid hbitmap
Originally Posted by Befefe
If I have a HBITMAP, then I would like to use it in
Image or CImage or CBitmap or Bitmap, what I can I do, say, to save it in my drive ?
When someone responds to your post and asks you questions, please answer the questions first (even if you don't think the questions are relevant).
-
August 18th, 2011, 03:26 PM
#5
Re: Cimage can not a valid hbitmap
Originally Posted by Arjay
When someone responds to your post and asks you questions, please answer the questions first (even if you don't think the questions are relevant).
Why do you care about that ? Users come and go, I and a hundred friends of mine used to share the same account and we chatted with one person and it was just fine. I can talk to you now but later I give this account to a HIV patient, and he pretends to be me, then who are you talkng to ?
Who knows if VladimirF is you too ?
-
August 18th, 2011, 03:30 PM
#6
Re: Cimage can not a valid hbitmap
Originally Posted by Maejie
Why do you care about that ? Users come and go, I and a hundred friends of mine used to share the same account and we chatted with one person and it was just fine. I can talk to you now but later I give this account to a HIV patient, and he pretends to be me, then who are you talkng to ?
Who knows if VladimirF is you too ?
http://www.codeguru.com/forum/showpo...52&postcount=2
Seriously. There's been quite the influx of nonsensical posters lately.
-
August 18th, 2011, 03:36 PM
#7
Re: Cimage can not a valid hbitmap
-
August 18th, 2011, 05:17 PM
#8
Re: Cimage can not a valid hbitmap
Originally Posted by Maejie
Why do you care about that ? Users come and go, I and a hundred friends of mine used to share the same account and we chatted with one person and it was just fine. I can talk to you now but later I give this account to a HIV patient, and he pretends to be me, then who are you talkng to ?
Who knows if VladimirF is you too ?
Actually Maejie, I'm a moderator here, so I get to give folks advice in terms of how to respond to posts.
In fact, I'm going to ask you to respond in the future with professional replies only.
That being said, posters that respond with answers here are volunteers, and usually don't have much time to go round and round with folks that are trying to get help, but aren't following advice or answering questions.
-
August 19th, 2011, 12:08 AM
#9
Re: Cimage can not a valid hbitmap
Originally Posted by Maejie
Why do you care about that ?
I tell you why. Believe it or not, but every case of helping here at forum is very personal. To find most effective way to find the root cause, and especially to explain one to OP, you need to know your addressee personal skills and see his attitude, and way of thinking, and wording. Then you can find appropriate words and samples. This regularly appears true, at least for me. Of course, it's true if your intention is to help or be helped, not just to chat.
Users come and go, I and a hundred friends of mine used to share the same account and we chatted with one person and it was just fine. I can talk to you now but later I give this account to a HIV patient, and he pretends to be me, then who are you talkng to ?
Good to know that about you.
Best regards,
Igor
-
August 19th, 2011, 06:44 AM
#10
Re: Cimage can not a valid hbitmap
Originally Posted by Maejie
Why do you care about that ? Users come and go...
See? You got it! "Users" do that.
Community sticks around.
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio:
FeinWindows - replacement windows manager for Visual Studio, and more...
-
August 19th, 2011, 11:32 PM
#11
Re: Cimage can not a valid hbitmap
Originally Posted by Arjay
When someone responds to your post and asks you questions, please answer the questions first (even if you don't think the questions are relevant).
I am not a theft being inquired by police, am i ?
-
August 19th, 2011, 11:35 PM
#12
Re: Cimage can not a valid hbitmap
Originally Posted by VladimirF
See? You got it! "Users" do that.
Community sticks around.
Where is the community ?
-
August 20th, 2011, 12:51 AM
#13
Re: Cimage can not a valid hbitmap
Originally Posted by Befefe
I am not a theft being inquired by police, am i ?
Surely you are not. You're a patient questioned by your physician. You want to be cured, you answer questions. The better dialog is, the quicker cure comes.
Let's focus on your problem, shall we?
Last edited by Igor Vartanov; August 20th, 2011 at 12:55 AM.
Best regards,
Igor
-
August 20th, 2011, 07:50 AM
#14
Re: Cimage can not a valid hbitmap
Originally Posted by Befefe
Where is the community ?
Why did you completely ignore post #2? That's kind of rude don't you think?
-
August 20th, 2011, 08:20 AM
#15
Re: Cimage can not a valid hbitmap
Originally Posted by Martin O
Why did you completely ignore post #2? That's kind of rude don't you think?
Originally Posted by VladimirF
How does it show that?
How does it fail? Any error message?
Okay, I will reply (weekends is nice for replies like this, I don't know )
Final words, I was thinking #2 was a cheese game player.. That is why I didn't focus on his questioning replies.
There is no problem now because I solve it.
The error message was something I forgot. But it happened at the ASSERT to say that "m_hbitmap==0". The bitmap handle was valid and in debug it can pass the break point, only image data weren't completely filled, some were marked as ??? while others -1 and the rest was filled with correct data. (Seriously I was dumb, I wish I could reproduce the problem, I should also memorize the message as it helped for future too). I hit it many times before I rewrote the whole program to draw the image thumbnail to insert it into my listview, the error was gone without my notice because I concentrated on the results rather than the bugs as a user-if you develop MS library or a book writer, you likely pay attention to steps to solving this problem. I am at present working with image bitmap only. It'll probably come again. I will let everyone know if you think it's worth.
Last edited by Befefe; August 20th, 2011 at 08:24 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|