Click here to Skip to main content
15,886,422 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question[Message Deleted] Pin
ddmcr28-Mar-06 22:44
ddmcr28-Mar-06 22:44 
AnswerRe: Check List Box - recommendations Pin
Ștefan-Mihai MOGA28-Mar-06 23:48
professionalȘtefan-Mihai MOGA28-Mar-06 23:48 
QuestionDestroyWindow is giving me a headache Pin
Waldermort28-Mar-06 22:29
Waldermort28-Mar-06 22:29 
QuestionProblem With List Ctrl Pin
Mahesh Kulkarni28-Mar-06 22:29
Mahesh Kulkarni28-Mar-06 22:29 
AnswerRe: Problem With List Ctrl Pin
Rage28-Mar-06 22:33
professionalRage28-Mar-06 22:33 
GeneralRe: Problem With List Ctrl Pin
Mahesh Kulkarni28-Mar-06 22:40
Mahesh Kulkarni28-Mar-06 22:40 
GeneralRe: Problem With List Ctrl Pin
Ștefan-Mihai MOGA28-Mar-06 23:51
professionalȘtefan-Mihai MOGA28-Mar-06 23:51 
Questionquestion about WINCORE.CPP Pin
HOW WHAT28-Mar-06 21:32
HOW WHAT28-Mar-06 21:32 
1. What is _afxDBCS, why use it?

2.Why code 1 and code 2 avoid subclassing the IME window and menu window?

3.Windows had UNICODE windows and ANSI windows?
UNICODE window must use UNICODE api to HOOK window message? UNICODE api create the UNICODE window?

---------------------------------
1.<br />
        if (_afxDBCS)<br />
        {<br />
            // check for cheap CS_IME style first...<br />
            if (GetClassLong((HWND)wParam, GCL_STYLE) & CS_IME)<br />
                goto lCallNextHook;<br />
<br />
            // get class name of the window that is being created<br />
            LPCTSTR pszClassName;<br />
            TCHAR szClassName[_countof("ime")+1];<br />
            if (DWORD_PTR(lpcs->lpszClass) > 0xffff)<br />
            {<br />
                pszClassName = lpcs->lpszClass;<br />
            }<br />
            else<br />
            {<br />
                szClassName[0] = '\0';<br />
                GlobalGetAtomName((ATOM)lpcs->lpszClass, szClassName, _countof(szClassName));<br />
                pszClassName = szClassName;<br />
            }<br />
<br />
            // a little more expensive to test this way, but necessary...<br />
            if (lstrcmpi(pszClassName, _T("ime")) == 0)<br />
                goto lCallNextHook;<br />
        }<br />
<br />
<br />
<br />
<br />
2.<br />
            static ATOM s_atomMenu = 0;<br />
            bool bSubclass = true;            <br />
<br />
            if (s_atomMenu == 0)<br />
            {<br />
                WNDCLASSEX wc;<br />
                memset(&wc, 0, sizeof(WNDCLASSEX));<br />
                wc.cbSize = sizeof(WNDCLASSEX);<br />
                s_atomMenu = (ATOM)::GetClassInfoEx(NULL, _T("#32768"), &wc);<br />
            }<br />
<br />
            // Do not subclass menus.<br />
            if (s_atomMenu != 0)<br />
            {<br />
                ATOM atomWnd = (ATOM)::GetClassLongPtr(hWnd, GCW_ATOM);<br />
                if (atomWnd == s_atomMenu)<br />
                        bSubclass = false;<br />
            }<br />
            else<br />
            {            <br />
                TCHAR szClassName[256];<br />
                if (::GetClassName(hWnd, szClassName, 256))<br />
                {<br />
                    szClassName[255] = NULL;<br />
                    if (_tcscmp(szClassName, _T("#32768")) == 0)<br />
                        bSubclass = false;<br />
                }<br />
            }            

QuestionGuyz!! help me out hear Pin
evita77728-Mar-06 20:34
evita77728-Mar-06 20:34 
AnswerRe: Guyz!! help me out hear Pin
Cedric Moonen28-Mar-06 20:37
Cedric Moonen28-Mar-06 20:37 
GeneralRe: Guyz!! help me out here Pin
evita77728-Mar-06 20:52
evita77728-Mar-06 20:52 
GeneralRe: Guyz!! help me out hear Pin
Rage28-Mar-06 20:55
professionalRage28-Mar-06 20:55 
GeneralRe: Guyz!! help me out hear Pin
evita77728-Mar-06 21:04
evita77728-Mar-06 21:04 
JokeRe: Guyz!! help me out hear Pin
Rage28-Mar-06 21:04
professionalRage28-Mar-06 21:04 
GeneralRe: Guyz!! help me out hear Pin
evita77728-Mar-06 21:10
evita77728-Mar-06 21:10 
JokeRe: Guyz!! help me out hear Pin
Rage28-Mar-06 20:39
professionalRage28-Mar-06 20:39 
GeneralRe: Guyz!! help me out hear Pin
evita77728-Mar-06 20:54
evita77728-Mar-06 20:54 
Answergimme da key Pin
toxcct28-Mar-06 20:43
toxcct28-Mar-06 20:43 
GeneralRe: gimme da key Pin
evita77728-Mar-06 20:57
evita77728-Mar-06 20:57 
GeneralRe: gimme da key Pin
toxcct28-Mar-06 20:59
toxcct28-Mar-06 20:59 
GeneralRe: gimme da key Pin
Waldermort28-Mar-06 21:02
Waldermort28-Mar-06 21:02 
GeneralRe: gimme da key Pin
toxcct28-Mar-06 21:04
toxcct28-Mar-06 21:04 
GeneralRe: gimme da key Pin
Waldermort28-Mar-06 21:12
Waldermort28-Mar-06 21:12 
GeneralRe: gimme da key Pin
evita77728-Mar-06 21:18
evita77728-Mar-06 21:18 
GeneralRe: gimme da key Pin
evita77728-Mar-06 21:15
evita77728-Mar-06 21:15 

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.