|
Hello guys I am beginner to MFC threading. Can any body give me a link to samples for learning multi threaded programming (other then MSDN)
Thank You
|
|
|
|
|
Search codeproject with multithreading in the search box.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Start here[^].
You'll find other excellent articles written by Joe Newcomer on his site.
--
Roger
It's supposed to be hard, otherwise anybody could do it!
Regarding CodeProject: "resistance is pointless; you will be assimilated"
|
|
|
|
|
|
The first book i read is program windown in c (win32api) .When i come here i see that many u use MFC. Is MFC app is faster or easy to program than win32api.
i also see that i write code using gdi++, and i bring it to another computer, it'll not work because lack of dll.
MFC is the same???.
If u have good book and u want me read it, let send me at "sea.loves.you@gmail.com". Thanks
And i alway get problem that is when i write my app and it run well in my computer but when i bring it to another it can't. I try to copy some dll required, some app work and some don't. mysetting is incorrect,isn't it?
I use .Net 2005.
Another problem: when i write program, i compile and it run well, but at another time when i chose Rebuild solution, and i run my app, but it alway drop the message that can't not find msvc80....( dont remember). Why?
Thanks.
|
|
|
|
|
I think three question
1-?
2-maybe you use from serivces that are install only in your computer
3-Can you be more specific
whitesky
|
|
|
|
|
1. I don't know mfc i only know win32api, i wonder how it is. Because i see many u use it to write code! May be i'm "out of date".Does app Programming with mfc need some additional dll when running. If some kind send me a ebook about mfc.
2. I use .Net 2005 when i build my app and bring to another computer, i run it and alway get error message (0xc5).May be that computer need install framework2.0. can i avoid it .
3. I use .Net 2005 and each time i "Rebuild solution" then may app can't not run again because there is error message says that the app can't not find msvcd80.dll( not sure).
I don't know why?I always get that problem. When i start a new solution it build well and run well but if i press "rebuild solution" and i'm mad (Note: i have to project in my solution ). Now i go back to .Net2003 but if some one know tell me.
Thank everyone?
|
|
|
|
|
1- well it depend to your project of course basically yes
2-you answer to your question you use framework2.0 in your project and
maybe it not install in another computer
3-I use vs2005 and i create one project and build and again rebuild solution
and its not problem (maybe im not sure your vs has problem)
whitesky
|
|
|
|
|
hi!
there's a window that i don't own (displayed from a code on an external dll). is it possible to attach to the move event of that window?
i just need to move my app so that those two windows are always side by side. i've done this with the wm_move event on my side.
thanks!
|
|
|
|
|
You can get the handle of window by FindWindow .
then create the User messages and post it to the specific window by PostMessage
Cheers
"Peace of mind through Technology"
|
|
|
|
|
i don't want to Post messages to that window, I need to be notified what that window moves.
in short i need that window (which i only have a dll) to post messages to me.
|
|
|
|
|
ilidan wrote: there's a window that i don't own (displayed from a code on an external dll). is it possible to attach to the move event of that window?
Look up WH_CALLWNDPROC and WH_CALLWNDPROCRET .
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Thanks. This is exactly what I'm looking for!
|
|
|
|
|
ilidan wrote: there's a window that i don't own (displayed from a code on an external dll). is it possible to attach to the move event of that window?
i just need to move my app so that those two windows are always side by side. i've done this with the wm_move event on my side.
Hook the WM_MOVE Function using WH_CBT
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Please give me your thoughts on whether you think the following would be possible, and workable:
Do you think it would be possible to dynamically load and use a DLL without calling LoadLibrary , and GetProcAddress ?
Imagine the following procedure:
1. Use VirtualAlloc to reserve space in memory for the DLL
2. Read the DLL file and load it into the newly allocated memory
3. Write your own custom function to read the Export Table and manually compute the entry points for the DllMain and other functions you need
4. Call DllMain with PROCESS_ATTACH, then be sure to call it again for every thread you create
Do you think it would work?
Rich
ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸
|
|
|
|
|
|
I think it's possible but you would just be re-implementing the loader.
Steve
|
|
|
|
|
Thanks for your reply, Steve. I'll chalk that up as one vote for "it might work."
ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸
|
|
|
|
|
Troposphere wrote: Do you think it would work?
Yeah it will. But be assured that it will be rope walking. You've got to be very careful.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
|
If you want do this manipulation then better derive one class(your own edit class derived from CEdit).
and handle some events & functions like OnKeyDown
void CMyEdit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if (nChar == VK_DELETE) {
if (!(GetStyle() & ES_READONLY)) {
processDelete();
}
} else
CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
}
handle in that functions get sel, set sel,
you have get at, setat functions for CString.
etc.
bla bla bla.
.....
you can do like this.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
I think,....Then you can go for service programming. some thing like that.Or you can create a plugin for a editor or you have to create a windows service, if that service is running then you can restrict like this. Search for this kind of programs(this comes under com etc...). Sorry. I dont know the writeing services programming.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
Kalyani Gupta wrote: i need to calculate the width of characters before using SetCaretPos to move the caret, i dont know how to do this.
Hi Kalyani,
Is GetCharWidth is of any help!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I want a code that is uused to split a window that already splitted by CreateStatic(...) fn and here i want tosplit when i done an event like RightButtonDown..etc.
so send me a code cleary it is urgent.....
|
|
|
|