Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

bin8922

@bin8922
About
Posts
32
Topics
24
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • C2065 Compiler error.
    B bin8922

    Thanks for your reply. I put the #include in the StdAfx.h file and also in that file with error. But I still got the same compiler error. I am so confused. Thanks again for your reply. Bin

    C / C++ / MFC help question

  • C2065 Compiler error.
    B bin8922

    Hello, there, I got a C2065 compiler error. The error message is error C2065: 'RBN_CHEVRONPUSHED' : undeclared identifier But when I go to that line and right click on RBN_CHEVRONPUNSHED and then click on "Go to definition of RBN_CHEVRONPUSHED" I can actually go to the CommCtrl.h and see the definition. This is very strange. How could I solve the problem? Thanks a lot in advance Bin

    C / C++ / MFC help question

  • How to make a function called when IE browser window size changes?
    B bin8922

    I also tried DISPID_WINDOWSETLEFT, but it doesn't work.

    C / C++ / MFC tutorial question

  • How to make a function called when IE browser window size changes?
    B bin8922

    Hello, everyone, In my current project, I am using BHO. I need a function to be called when the size of IE browser window changes. In the IDispatch::Invoke function, I tried to use DISPID_WINDOWSETWIDTH, DISPID_WINDOWSETWIDTH and DISPID_WINDOWRESIZE. But none of them fires when the IE browser window size changes? What should I do? Thanks a lot in advance. Bin

    C / C++ / MFC tutorial question

  • A question about using COM object.
    B bin8922

    Hello Everyone, In my current code, A program calls a function in B program using "Invoke" method. B program has an exposed COM interface. It works fine. Then I added another exposed method in B program, but everytime I call it, there is an error. I tried to go thru the code. In program B, the code for the two function are exactly the same. What should I do? Thanks a lot in advance. Bin

    C / C++ / MFC question com help

  • CStaticLInk is not working good in CPropertyPage
    B bin8922

    Hello, everyone, In my project, I used CStaticLink class to change the static text to url style text. It works fine in different dialog boxes. But it is not working good in a CPropertyPage dialog box. The text is not changed to blue color and not underscored, but the link is still working good. I think the problem is from the second parameter *CWnd (in my code, I used "this"), but I cannot figure out what should it be. What do I need to do to make it work? Thanks a lot in advance. Bin

    C / C++ / MFC help question

  • How to implement Help button in a property page?
    B bin8922

    Thanks a lot

    C / C++ / MFC help tutorial question

  • How to implement Help button in a property page?
    B bin8922

    Hello, everyone, I'd like to know how to handle the help button in property page. In my property page, there are OK, Cancel, Apply and Help button. For OK, Cancel and Apply button, it is easy to handle. I just go to ClassWizard->Message Maps to add function OnOK, OnCancel and OnApply, and then put code into the functions. But I don't know how to handle the help button. What I can only think of is to get the rect of IDHELP button and then handle the mouse left click message. But I think there should be more straightforward way to handle it. If you know how to handle it, please drop me a couple lines. Thanks a lot in advance. Bin

    C / C++ / MFC help tutorial question

  • How to get the handle of a control in properties sheet.
    B bin8922

    I tried to use GetDlgItem(IDOK), but the returned value is NULL

    C / C++ / MFC c++ tutorial question

  • How to get the handle of a control in properties sheet.
    B bin8922

    Hello, everyone, In my current project, I want to display xp style button(OK, Cancel and Apply) in the properties sheet. If I do it using MFC, it would be very easy. I just need to m_btnXPButton.SubclassWindow(GetDlgItem(ID_APPLY_NOW)->m_hWand); But when I tried to do the same thing in ATL, the returned handle for ID_APPLY_NOW (IDOK and IDCANCEL) is NULL. How can I get the handle of a control in the properties sheet written in ATL. Thanks a lot in advance. bin

    ATL / WTL / STL c++ tutorial question

  • How to get the handle of a control in properties sheet.
    B bin8922

    Hello, everyone, In my current project, I want to display xp style button(OK, Cancel and apply) in the properties sheet. If I do it using MFC, it would be very easy. I just need to m_btnXPButton.SubclassWindow(GetDlgItem(ID_APPLY_NOW)->m_hWand); But when I tried to do the same thing in ATL, the returned handle for ID_APPLY_NOW (IDOK and IDCANCEL) is NULL. How can I get the handle of a control in the properties sheet written in ATL. Thanks a lot in advance. bin

    C / C++ / MFC c++ tutorial question

  • How can I know the actual size of a menu?
    B bin8922

    How can I know the actual size of a menu? I need to display a menu from a CToolBarCtrl toolbar. When the menu is from top to bottom, the menu should be popped up from the bottom of the bar, on the other hand, when the bar is near the bottom of the screen and the menu needs to be displayed from bottom to top, the menu should be popped up from the top of the bar. IE paints menu this way so that the bar won't be blocked by the menu. But I don't know how to get the acutal size (in pixles) of the menu. Or if I can how which way it pops up the menu, that would be better. Thanks a lot in advance.

    C / C++ / MFC question tutorial

  • How to draw a line in Edit box?
    B bin8922

    Hello everyone. I want to draw edges for an Edit box. But I have to draw the lines inside the Edit box, because the edit box is too big. I tried to change the size of the Edit box, but I cannot make the height any smaller. The problem is that the line in the Edit box will be blocked by the Edit box. I tried to set the edit box to transparent, but I still cannot the lines. Any idea about how to fix this problem? Thanks a lot in advance. Bin

    C / C++ / MFC help tutorial question

  • How to disable the dropdown arrow of a combo box?
    B bin8922

    thanks a lot. But I just want to disable the drop down button and make it work as an edit box. I don't want to disable the whole thing. Thanks.

    C / C++ / MFC help tutorial question

  • How to disable the dropdown arrow of a combo box?
    B bin8922

    Hello, there, I am currently working on a project. There is a combo box. I'd like to know how I can disable the dropdown arrow of it or hide the dropdown arrow. In my project there is two setting, one is keeping the input history, one is not keeping the input history. I tried m_Combo.ShowDropDown(false)when not keeping the history, but there is a black line under it and it doesn't look good. Is there a way to solve this problem? Thanks a lot in advance. Bin

    C / C++ / MFC help tutorial question

  • Tooltips for ToolBar.
    B bin8922

    Hello everyone, I used the following code to implement the tooltip for a toolbar. But the tooltip won't be displayed when the toolbar window is not active. I know that I can set TTS_ALWAYSTIP to solve this problem. But I don't know how to set it. There is no CToolTipCtrl in my application. Thanks a lot in advance. BEGIN_MESSAGE_MAP(CMyView, CView) ... ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipNotify) ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipNotify) END_MESSAGE_MAP() void CMyView::OnInitialUpdate() { CView::OnInitialUpdate(); CEdit* pEdit = new CEdit; pEdit->Create(ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER, CRect(10, 10, 100, 100), this, 111); EnableToolTips(TRUE); // enable tool tips for view } //Notification handler BOOL CMyView::OnToolTipNotify(UINT id, NMHDR *pNMHDR, LRESULT *pResult) { // need to handle both ANSI and UNICODE versions of the message TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR; TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR; CString strTipText; UINT nID = pNMHDR->idFrom; if (pNMHDR->code == TTN_NEEDTEXTA && (pTTTA->uFlags & TTF_IDISHWND) || pNMHDR->code == TTN_NEEDTEXTW && (pTTTW->uFlags & TTF_IDISHWND)) { // idFrom is actually the HWND of the tool nID = ::GetDlgCtrlID((HWND)nID); } if (nID != 0) // will be zero on a separator strTipText.Format("Control ID = %d", nID); if (pNMHDR->code == TTN_NEEDTEXTA) lstrcpyn(pTTTA->szText, strTipText, sizeof(pTTTA->szText)); else _mbstowcsz(pTTTW->szText, strTipText, sizeof(pTTTW->szText)); *pResult = 0; return TRUE; // message was handled } Thanks Bin

    C / C++ / MFC help tutorial

  • How to use TTS_ALWAYSTIP with CToolBarCtrl?
    B bin8922

    Hello, I need to have the Tooltip displayed on the ToolBar even when its parent window is not active. I posted a message yesterday. I was told that I can set the TTS_ALWAYSTIP on the CToolTipsCtrl. But there is no CToolTipCtrl in my program I am using the following code and don't know how to set the TTS_ALWAYSTIP. BOOL CToolBarTipTestDialog::OnToolTipText(UINT, NMHDR* pNMHDR, LRESULT* pResult) { ASSERT(pNMHDR->code == TTN_NEEDTEXTA || pNMHDR->code == TTN_NEEDTEXTW); // if there is a top level routing frame then let it handle the message if (GetRoutingFrame() != NULL) return FALSE; // to be thorough we will need to handle UNICODE versions of the message also !! TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR; TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR; TCHAR szFullText[512]; CString strTipText; UINT nID = pNMHDR->idFrom; Please help me. Thanks a lot in advance. Bin

    C / C++ / MFC help tutorial question

  • display tooltips on CToolBarCtrl
    B bin8922

    Hello, there, I'd like to know how I can display tooltips on CToolBarCtrl when the CToolBarCtrl's window doesn't have focus. I put a CToolBarCtrl in a win32 window. But it won't display the tooltips when the win32 window doesn't have focus. I want the tooltip displayed even when the win32 doesn't have focus. When I move the mouse over the button, I can see the hot tracking, but no tooltips. I noticed in IE window, the tooltips of links will show up even when the IE window doesn't have focus. Thanks a lot in advance.

    C / C++ / MFC

  • How to display xp style button and check box.
    B bin8922

    Best wishes to you

    C / C++ / MFC tutorial question

  • How to display xp style button and check box.
    B bin8922

    Hello, there, I am using Windows xp and in the diaplay properties-> Appearance. I selected "Windows xp style windows and button". I think in the dialog box, the buttons and check box should be in the xp style. But when I use a VC6 to create a dialog box, the buttons and check box inside are still in the classic style. What should I do to make them xp style. Should I change project setting? Please tell me how to do it. BTW, I tried to compile the code that I downloaded from Internet, the buttons are in XP style. Thanks a lot. Bin

    C / C++ / MFC tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups