我原先是在sdk程式下面想用SendMessage發送一條WM_GETFONT消息給一個button控件從而取得這個button的字體的,但是返回值總是零值,但用相同的方法去取一個mfc程式里用CButton 類建立起來的button控件的字體時,就能得到正确的返回值,后來用spy++查看時才髮現,mfc將原來的視窗函式替換掉了,於是我跟進CWnd中,在進行SubClass時,他用的是m_pfnSuper這個類成員里保存的地址作為新視窗函式的地址的,但是卻怎麼也找不到這個變量是什麼時候被賦的值,新的視窗函式的實作碼到底在哪個地方,有沒有高人可以幫忙把它揪出來啊,多謝了.
你要看也要看DoModal,在此过程中调用了(Win32API)::CreateDialogIndirect。
所以在API中的东西都被编译过了,你是看不到的。
你再回到MSDN中,看解释如何?The CreateDialogIndirect macro uses the CreateWindowEx function to create the dialog box. CreateDialogIndirect then sends a WM_INITDIALOG message to the dialog box procedure. If the template specifies the DS_SETFONT or DS_SHELLFONT style, the function also sends a WM_SETFONT message to the dialog box procedure. The function displays the dialog box if the template specifies the WS_VISIBLE style. Finally, CreateDialogIndirect returns the window handle to the dialog box.
The return value is a handle to the font used by the control, or NULL if the control is using the system font.
可是......我要怎麼取得繫統字體呢?