Suppose I know two points, How to compute a angle in degrees bwtween those two points.
marcoslav
Posts
-
angle between two points -
time differenceHow to get time difference in seconds. CTime t1; t1.GetCurrentTime(); after some time say after 3 seconds CTime t2; t2.GetCurrentTime(); Now I want difference between t2 and t1 in seconds that is 3 seconds; Marcoslav
-
Help me to use windows hook exactly.Thanks it worked. But it went in to infinite loop, cos it was creating messagebox to show that some window was created. so for messagebox themselves also messagebox was getting displayed.. so infinite loop. My first virus I guess ;)
-
Help me to use windows hook exactly.Purpose of my program is to get notification (a messagebox) whenever a new window is created on the operating system. In my win32 dll I put following code.
#include "stdafx.h" #include "hookdll.h" HHOOK WndHook; HINSTANCE hInst; __declspec(dllexport) bool InstallHook(void); __declspec(dllexport) bool UninstallHook(void); __declspec(dllexport) LRESULT CALLBACK WndHookProc(int, WPARAM, LPARAM); BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } hInst = (HINSTANCE)hModule; return TRUE; } // This is an example of an exported variable HOOKDLL_API int nHookdll=0; // This is an example of an exported function. HOOKDLL_API int fnHookdll(void) { return 42; } // This is the constructor of a class that has been exported. // see hookdll.h for the class definition CHookdll::CHookdll() { return; } __declspec(dllexport) bool InstallHook(void) { if(WndHook == NULL) WndHook = SetWindowsHookEx(WH_SHELL, (HOOKPROC)WndHookProc, hInst, 0); return (WndHook != NULL); } __declspec(dllexport) bool UninstallHook(void) { if(WndHook != NULL) { if(UnhookWindowsHookEx(WndHook)) WndHook = NULL; } return (WndHook == NULL); } __declspec(dllexport) LRESULT CALLBACK WndHookProc(int nCode, WPARAM wParam, LPARAM lParam) { if (nCode<0) return CallNextHookEx(WndHook, nCode, wParam, lParam); /* my codes...*/ ::MessageBox(NULL,"Window created","here",MB_OK); return CallNextHookEx(WndHook, nCode, wParam, lParam); }
Now watch my client program.. MFC exe, dialog based. On its OkButton handler I put following code. I am not using load library and getProce address , because I am linking the library in the project settings and copying the hookdll in the debug directory of my application .void CHookclientDlg::OnOK() { InstallHook(); }
But my client application can not call InstallHook. Is this coding right or will it inform all the windows creation. (other applications , threads). Please tell me Marcoslav -
web page completely loaded or not?How may I know if the webpage is completely loaded or not in my CHTMLView in my SDI application? I use Navigate2(..) function to load the webpage. Marcoslav
-
Bye Bye Bill Gates [repost]does that mean ,one can masterise dot net.. no more upgratation or next version? other wise we had taken something and bill brought next thing in the market .
-
activexI need simple ATL activex tutorial
-
It's that day of the week againi have six days working ;(
-
ATL with C codenoone answers there in ATL so posted here
-
ATL with C codeHi, I have a dialog box in my ATL exe, I want to use/link a C Library. AFter clicking OK button on the dialog on of C functions should execute . How to do this. linking the Clibrary and opening the C function. Can I use the C code direct in ATL module ? how? marcoslav
-
copycatsToddHileHoffer wrote:
Also, if those "friends" don't beleive you then are they really friends?
Yes , it seems to be the case.
-
What do you eat for breakfast?you call chicken as simple food.. oops.
-
copycatsrecently I made a good program for my firm and showed it to my friends. But they dont believe me. They say its all cut and paste from internet. Everything is available on net.. classes and all. I agree I took help from some forums. But I disagree that It was all cut and paste. I built good algorithms and achieved few good things by my logic. I think all coders have to take help from net on regular basis.. does this mean we are copy cats?
-
saveas from web browserI want to save my webpage on the hard disk as .mht file , not as html. But every time I have to select option for .mht.. (.htm is default) How to make this option default.. .mht
-
ATL with C code.. pls looooooooooooooook hereeeeeeeeeeeeeeeHi, I am posting here cos none answers in ATL group. I have a dialog box in my ATL exe, I want to use/link a C Library. AFter clicking OK button on the dialog on of C functions should execute . How to do this. linking the Clibrary and opening the C function. marcoslav -- modified at 3:10 Friday 16th June, 2006
-
Adnan's emotions... A white paper [modified]Adnan Siddiqi wrote:
my friend
I can not believe you. If tomorrow you people announce Jehad, you may kill me .
-
Adnan's emotions... A white paper [modified]I am new , but after reading all posts, truth seems to be bitter to you Mr. Adnan marcoslav
-
have you ???Has someone DID it in office with the collegue or with self?? :~ marcoslav
-
Brainpower....F**k this society. I have been coding all along. I dont have social life. My marital life is in shambles. No friends. I watch TV in my spare time. I go alone for shopping or to watch movies. I feel inferior, insecure. I am a loner. Nobody loves me , o r loves to talk to me. they gets bores by me easily. I dont have god physique. But certainly not suicidal 'cos All I think is of dot net and the next great assignment my boss has promised me. SOmetimes I feel though, I should have more friends and miss my college and childhood days. But I am happy with myself. I enjoy myself. I am happiest when noone is around. marcoslav