Click here to Skip to main content
16,006,535 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: hard disk information Pin
CPallini29-Oct-08 23:00
mveCPallini29-Oct-08 23:00 
JokeRe: hard disk information Pin
David Crow30-Oct-08 9:27
David Crow30-Oct-08 9:27 
JokeRe: hard disk information [modified] Pin
CPallini30-Oct-08 10:38
mveCPallini30-Oct-08 10:38 
GeneralRe: hard disk information Pin
David Crow30-Oct-08 10:42
David Crow30-Oct-08 10:42 
GeneralRe: hard disk information Pin
CPallini30-Oct-08 10:48
mveCPallini30-Oct-08 10:48 
GeneralRe: hard disk information Pin
Rajesh R Subramanian2-Nov-08 22:17
professionalRajesh R Subramanian2-Nov-08 22:17 
GeneralRe: hard disk information Pin
viliam29-Oct-08 23:56
viliam29-Oct-08 23:56 
QuestionGlobal subclassing problem Pin
albanaa29-Oct-08 7:32
albanaa29-Oct-08 7:32 
Hello !
So I started having fun with global subclassing. I install a global hook from a DLL and it changes every button's text. It works for every process except for explorer; explorer.exe's buttons aren't changed... Thank you very much as I've been looking a long time for a solution !


<br />
LRESULT CALLBACK MyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)<br />
{<br />
    if (msg == WM_PAINT)<br />
    {<br />
       SetWindowText(hWnd,"text");    // Changes to 'text'<br />
    }<br />
 <br />
    return(CallWindowProc(pOldWndProc, hWnd, msg, wParam, lParam));<br />
}<br />
 <br />
 <br />
LRESULT CALLBACK HookProc(int code, WPARAM wParam, LPARAM lParam)<br />
{<br />
    //dummy	<br />
    return(CallNextHookEx(hHook, code, wParam, lParam));<br />
}<br />
 <br />
BOOL APIENTRY DllMain(HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved)<br />
{<br />
   hMod	= (HINSTANCE) hModule; <br />
<br />
   if (ul_reason_for_call == DLL_PROCESS_ATTACH)<br />
   {<br />
   HWND hWnd = CreateWindow("BUTTON","",0, 0, 0, 0, 0,NULL, NULL, hMod, NULL);           <br />
   pOldWndProc = (WNDPROC)SetClassLong(hWnd,GCL_WNDPROC	,(LONG)MyWndProc);    //Modifies procedure<br />
   DestroyWindow(hWnd);<br />
   }<br />
    return TRUE;<br />
}<br />
<br />
__declspec(dllexport) void DemarrerHook()           // Called from my EXE<br />
{<br />
hHook = SetWindowsHookEx(WH_CALLWNDPROC, HookProc, hMod, 0);<br />
}

QuestionHow to localize MFC default messages? [modified] Pin
Byroneee29-Oct-08 5:53
Byroneee29-Oct-08 5:53 
AnswerRe: How to localize MFC default messages? Pin
Mark Salsbery29-Oct-08 6:17
Mark Salsbery29-Oct-08 6:17 
GeneralRe: How to localize MFC default messages? Pin
Byroneee30-Oct-08 3:20
Byroneee30-Oct-08 3:20 
QuestionCListBox, spacebar causes selection index change Pin
bob1697229-Oct-08 4:10
bob1697229-Oct-08 4:10 
QuestionGetting file name from opened file in program Pin
Yang Jiayi29-Oct-08 3:31
Yang Jiayi29-Oct-08 3:31 
QuestionRe: Getting file name from opened file in program Pin
Rajesh R Subramanian29-Oct-08 3:48
professionalRajesh R Subramanian29-Oct-08 3:48 
AnswerRe: Getting file name from opened file in program Pin
Hamid_RT29-Oct-08 3:51
Hamid_RT29-Oct-08 3:51 
AnswerRe: Getting file name from opened file in program Pin
Hamid_RT29-Oct-08 3:49
Hamid_RT29-Oct-08 3:49 
AnswerRe: Getting file name from opened file in program Pin
Rajkumar R29-Oct-08 3:53
Rajkumar R29-Oct-08 3:53 
AnswerRe: Getting file name from opened file in program Pin
David Crow29-Oct-08 4:00
David Crow29-Oct-08 4:00 
AnswerRe: Getting file name from opened file in program Pin
CPallini29-Oct-08 11:12
mveCPallini29-Oct-08 11:12 
QuestionImplementing STL map Pin
anna mathew29-Oct-08 1:33
anna mathew29-Oct-08 1:33 
QuestionRe: Implementing STL map Pin
Roger Stoltz29-Oct-08 1:37
Roger Stoltz29-Oct-08 1:37 
AnswerRe: Implementing STL map Pin
Jijo.Raj29-Oct-08 2:04
Jijo.Raj29-Oct-08 2:04 
AnswerRe: Implementing STL map Pin
Hamid_RT29-Oct-08 3:51
Hamid_RT29-Oct-08 3:51 
QuestionCDialogBar event handlers trouble Pin
Atropus29-Oct-08 0:40
Atropus29-Oct-08 0:40 
AnswerRe: CDialogBar event handlers trouble Pin
Rajkumar R29-Oct-08 0:51
Rajkumar R29-Oct-08 0:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.