Click here to Skip to main content
15,923,087 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to avoid the printpreview child-wnd's response to the Esc key? Pin
min_2_max5-Jul-07 14:21
min_2_max5-Jul-07 14:21 
AnswerRe: How to avoid the printpreview child-wnd's response to the Esc key? Pin
eraccn5-Jul-07 20:35
eraccn5-Jul-07 20:35 
GeneralRe: How to avoid the printpreview child-wnd's response to the Esc key? Pin
eraccn5-Jul-07 20:55
eraccn5-Jul-07 20:55 
GeneralRe: How to avoid the printpreview child-wnd's response to the Esc key? Pin
min_2_max5-Jul-07 22:21
min_2_max5-Jul-07 22:21 
AnswerRe: How to avoid the printpreview child-wnd's response to the Esc key? Pin
CPallini5-Jul-07 20:35
mveCPallini5-Jul-07 20:35 
GeneralRe: How to avoid the printpreview child-wnd's response to the Esc key? Pin
min_2_max5-Jul-07 22:18
min_2_max5-Jul-07 22:18 
GeneralRe: How to avoid the printpreview child-wnd's response to the Esc key? Pin
min_2_max8-Jul-07 17:22
min_2_max8-Jul-07 17:22 
QuestionANSI subclassing works, but Unicode does not Pin
mid=57415-Jul-07 13:03
mid=57415-Jul-07 13:03 
I'm subclassing TrayClockWClass on Win2K3 using a DLL hook. If I use an ANSI build of the DLL, the hook works with no problem. If I use a Unicode build of the DLL, I get a "The instruction at '0x00000000' referenced memory at '0x00000000'. The memory could not be 'read'." error in explorer.exe. When I click OK on the error dialog explorer.exe restarts and for an instant I can see my subclassed window instead of the normal clock.

I've placed some logging statements in the code. SetWindowLong() is successful. And my new WndProc() is being called multiple times with valid values. But it crashes for a reason I cannot determine. The last entry in my log is for a window message that was handled successfully multiple times.

And the weirdest thing is that TrayClockWClass is a Unicode window, so I figure it would get along with a Unicode DLL. I only plan to use the code on WinXP and Win2K3 so I'd rather use native Unicode rather than a thunked ANSI DLL.

Has anyone had any experience with ANSI hooks working, but Unicode hooks not working? Or any clues as to debugging what the problem is? If you want to take a look at the source code, a Visual Studio 2005 solution is in a Subversion repository (http://fuzzyclock.googlecode.com/svn/trunk/ fuzzyclock).


AnswerRe: ANSI subclassing works, but Unicode does not Pin
Mark Salsbery5-Jul-07 14:31
Mark Salsbery5-Jul-07 14:31 
AnswerRe: ANSI subclassing works, but Unicode does not [modified] Pin
mid=57415-Jul-07 14:54
mid=57415-Jul-07 14:54 
QuestionHow big is this structure? Pin
disruptor1085-Jul-07 12:00
disruptor1085-Jul-07 12:00 
AnswerRe: How big is this structure? [modified] Pin
Joe Woodbury5-Jul-07 12:10
professionalJoe Woodbury5-Jul-07 12:10 
AnswerRe: How big is this structure? Pin
Mark Salsbery5-Jul-07 12:11
Mark Salsbery5-Jul-07 12:11 
QuestionVirtual destructors Pin
tom groezer5-Jul-07 9:53
tom groezer5-Jul-07 9:53 
AnswerRe: Virtual destructors Pin
Steve Echols5-Jul-07 10:04
Steve Echols5-Jul-07 10:04 
GeneralRe: Virtual destructors Pin
mid=57416-Jul-07 1:40
mid=57416-Jul-07 1:40 
GeneralRe: Virtual destructors Pin
Steve Echols6-Jul-07 1:59
Steve Echols6-Jul-07 1:59 
AnswerRe: Virtual destructors Pin
David Crow5-Jul-07 10:13
David Crow5-Jul-07 10:13 
AnswerRe: Virtual destructors Pin
Cyrilix5-Jul-07 12:25
Cyrilix5-Jul-07 12:25 
GeneralRe: Virtual destructors Pin
tom groezer5-Jul-07 20:02
tom groezer5-Jul-07 20:02 
GeneralRe: Virtual destructors Pin
mid=57416-Jul-07 1:34
mid=57416-Jul-07 1:34 
GeneralRe: Virtual destructors Pin
David Crow6-Jul-07 2:41
David Crow6-Jul-07 2:41 
QuestionReading text Pin
tom groezer5-Jul-07 9:32
tom groezer5-Jul-07 9:32 
AnswerRe: Reading text Pin
David Crow5-Jul-07 10:15
David Crow5-Jul-07 10:15 
GeneralRe: Reading text Pin
sheshidar5-Jul-07 23:20
sheshidar5-Jul-07 23:20 

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.