CreateWindow放在类的成员函数里边创建子窗口如何就不好使了? 急

CreateWindow放在类的成员函数里边创建子窗口怎么就不好使了? 急急急急急

C/C++ code

    WndProc ……
      ……
      case WM_CREATE:
          CreateWindow 



就可以正常的创建子窗口, 如果放到自己写的子窗口类(是个自绘的按钮)里, 参数传递一下:

C/C++ code

    WndProc ……
      ……
      case WM_CREATE:
          btn.create(hWnd,hInst) 




C/C++ code

void Btn::create(hWnd,hInst)
    CreateWindow(...);




这就完了,窗口上什么也没显示,用Getlasterror看了,CreateWindow没错。 
为什么没显示呢?WM_DRAWITEM这地方根本就没运行到(自绘按钮)

BS_OWNERDRAW 都写上了,(CreateWindow的参数我是整个复制过去的,二者绝对一样),怎么就放到类成员函数里就不好使了呢?


愁死我了,这一天净整这个问题了,在线等啊等

------解决方案--------------------
This function typically fails for one of the following reasons: 

an invalid parameter value 
the system class was registered by a different module 
the WH_CBT hook is installed and returns a failure code 
the window procedure fails for WM_CREATE or WM_NCCREATE
------解决方案--------------------
看你提供的这些信息
分析不出原因
要都是如你所说不应该有问题才对