|
See the DEVMODE struct and ResetDC().
onwards and upwards...
|
|
|
|
|
I'm trying to write a dll in visual c++ for use in vb6 that will search a grayscaled bitmap of a wave and return x,y coordinates responding to the waves position.
basically i have to try and get some kind of noise from a picture. the idea was to open a bitmap, convert it to grayscale (which i have done), search the bitmap for the wave which would ideally return a text file with x and y coordinates, then send that into a wave module and write the wav file.
i'm not a very experienced programmer also which had led to a few late nights tryin to work this out.
any help at all would be much appeciated on this.
thanks
|
|
|
|
|
well description of your problem, but I'm not really interested. These are loads of questions and it looks to me as you want us to do all your homework. If you're not able to solve some easy problems yourself then just don't do it...
I don't like guys that don't ask for simple things like API names they don't know, but this sucks!
Don't try it, just do it!
|
|
|
|
|
Alexander M. wrote:
I don't like guys that don't ask for simple things like API names they don't know
So if someone wants to know anything other than the name of an API (for which they do not know the name), then you don't like them? Please explain.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
you should have realized that the question was a real "homework" question. This guy didn't even know what excactly he wants to do.
He didn't care himself, he just asked because he thinks that it is the "easy" way. When I ask a question here then I have looked for the answer myself.
I don't like the way some people are asking here, because they want to get explained how to do their whole project (and they mostly don't even know how to code), and this is not acceptable.
This is the same as if I would ask you how I can do a game like half-life.... a silly question.
Don't try it, just do it!
|
|
|
|
|
Its a very simple rule, you dont choose what kind of questions you want to be posted here...
some ppl dont like it, while others would help the person if they want to or just move on or downvote the post...
best thing is that if you dont like it just move on, ignore the post,, that will let the poster know that his question has no takers.;)
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
Hi guys
Never before tried to work with threads.
I just need that when the view do the OnInitialUpdate I launch a thread that starts to do things but related to the view.
I've read about this and tried with AfxBeginThread(Myfunc,NULL);
But myfunc cannot be one of the view, there is a way to do this with a method of the view like CMyView::GetData()
Best Regards
Doc
|
|
|
|
|
doctorpi wrote:
But myfunc cannot be one of the view
I think you're referring to the fact that a member function can't be threaded. This can be overcome with a little helper class I found right here on codeproject.[^]
I can make no claims it will work for you, but I've used it and it works simply and well.
Good luck!!
'til next we type...
HAVE FUN!! -- Jesse
|
|
|
|
|
Thanks, I'll take a look.
Dr.Pi
|
|
|
|
|
doctorpi wrote:
But myfunc cannot be one of the view, there is a way to do this with a method of the view...
It can if the function is static .
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Sorry my ignorance, but then inside my static function how can I access the members variables of the view?
Thanks
Doc
|
|
|
|
|
The member variables would need to be static as well. Going that route has all sorts of implications. If the secondary thread needs to communicate with the view, which is owned by the primary thread, I would suggest using PostMessage() .
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
If my member variable is a class, I can't declare it static because linking an error appears. Some suggestion?
Best Regards
Doc
|
|
|
|
|
A static member can certainly be a class. Without a minimum of the linker message, I can't offer any suggestions.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
How do you set a window (using the document/view structure) to be a certain size when displayed?
For example 300 pixels wide and 500 pixels high.
Thanks
|
|
|
|
|
Check out the OnGetMinMaxInfo() method.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I am working on a MDI program. I need to know if a view is covered by any other views or windows. I found that WindowFromPoint function is useful but not quite suitable for the purpose that I want. Is there any way to know if a window is covered completely or partially by any other windows?
|
|
|
|
|
This is just a guess, but it might be of some help. If one window is overlapping another, they will have a non-empty intersection. Could you use CRect::IntersectRect() to determine this?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
use EnumWindows() function.
this function is OK for z-order
includeh10
|
|
|
|
|
A window's Z-order has nothing to do with whether it is obscured by another window or not.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
(first message !)
My problem seems me to be simple, but I have to admit that I need some help...
I have a CTreeCtrl in a dialog, and I want use a popup menu on it.
But my dialog doesn't receive my message (I use a simple ON_COMMAND )
I have tried the same thing with a CButton instead of a CTreeCtrl and it works well !
I would not use a derived class for my CTreeCtrl ...
------------------------
Le sage cherche la Vérité,
L'imbécile l'a déjà trouvé.
|
|
|
|
|
Why not simply use TrackPopupMenu to display and get the command-id from this popup menu. Do this from within the tree, and perform the action from there.
If you wish to perform the action somewhere else, you can simulate a WM_COMMAND with the command-id the menu returned.
|
|
|
|
|
Thanks for your response !
I use TrackPopupMenu in the OnContextMenu of my dialog and I display the menu only if the CWnd parameter is my CTreeCtrl. And it works well.
I also simulate a WM_COMMAND on my dialog with the command-id the menu returned, but it doesnt work... If I do the same thing with, for example, a button instead of my tree, it works !
-------------------------------
Le sage cherche la Vérité,
L'imbécile l'a déjà trouvé.
|
|
|
|
|
I see, so you're code looks like :
<br />
result = TrackPopupMenu(...);<br />
<br />
if (result)<br />
{<br />
Send/PostMessage(WM_COMMAND, result);<br />
}<br />
And you say that if you use a button instead of a tree you get the messages ?
Have you tried looking at your Dialog with Spy++ to see if it gets the WM_COMMAND ? and what differene there is there (in Spy++) when the control is a button or a tree.
Actually, what does it matter if it's a tere or a button ? you said all your code is placed in the dialog above it anyways (the Dialog performs the TrackPopupMenu and posts a message to itself...)...
|
|
|
|
|
Actually, I don't send manually the message. I use standard way (BEGIN_MESSAGE_MAP with the ON_COMMAND macro in my dialog...). I think I don't use the good terms to explain my problem.
I have tried with other messages (like TVN_SEL_CHANGED), and same problem : It doesn't work if I try to get it from my dialog.
Maybe I make something anormal and I don't see it...
Maybe the normal way to use a tree is to systematically use a derived class ? So I can manage all my message (I try and it works). But it doesn't seems to me very clean...
Thank you for spending your time !
-------------------------------
Le sage cherche la Vérité,
L'imbécile l'a déjà trouvé.
|
|
|
|