Sunday, 15 April 2012

c - Forcing an ANSI edit control instead of the comctl32 edit control -



c - Forcing an ANSI edit control instead of the comctl32 edit control -

i built module creates window edit box windows' edit windowclass. designed work ansi character set , not using unicode.

i create utilize of em_gethandle recieve buffer edit control.

now here problem: (quoted link above)

note comctl32.dll version 6, buffer contains array of wchars, regardless of whether ansi or unicode function created edit control. more info on dll versions, see mutual command versions.

so when module gets loaded application has comctl32 initialized, whole code breaks.

my question: there way prevent createwindowa utilize comclt32 or have thought prepare problem?

the application uses comctl32.dll if specified in app's manifest described e.g. here: http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175%28v=vs.85%29.aspx

if module dll, might seek utilize isolation technique not rely on version of comctl32.dll .exe decided use, might bring many other drawbacks.

i recommend utilize wm_gettexta or getwindowtexta() instead, re-create converted string buffer. designing module requires old version of dll work correctly bad idea.

c winapi window control comctl32

No comments:

Post a Comment