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
J

joshua0137

@joshua0137
About
Posts
9
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Why my TreeView cannot show icon
    J joshua0137

    i create a treeview in a wnd derived from CWindowImpl ( i use atl), and i create a imglistctrl for the treeview, everything seems ok of the imagelist, and i assign a image index for every node of the trewview, but no icon shows, and a small empty rect keeps at the left of every node's, anyone can help me?

    class CJMainForm : public CWindowImpl
    {
    public:
    DECLARE_WND_CLASS("JMainFrameClass")

    CJMainForm(void);
    ~CJMainForm(void);
    BOOL ShowForm(BOOL bShow = TRUE);
    
    BEGIN\_MSG\_MAP( CJMainForm )
    	MESSAGE\_HANDLER( WM\_PAINT, OnPaint)
    	MESSAGE\_HANDLER(WM\_LBUTTONDOWN,	OnLButtonDown)
    	MESSAGE\_HANDLER(WM\_MOUSEMOVE, OnMouseMove)
    	MESSAGE\_HANDLER(WM\_ERASEBKGND, OnEraseBkgnd)
    	MESSAGE\_HANDLER(WM\_QUERYENDSESSION, OnQueryEndSession)
    END\_MSG\_MAP()
    

    public:
    CXAnalogClock m_wndClock;
    CCalenderWnd m_wndCalender;
    CWindow m_wndPrjTree;
    HBRUSH m_brBackGround;
    SIZE m_szbrBackGround;

    protected:
    LRESULT OnPaint( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
    LRESULT OnLButtonDown( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
    LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
    LRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
    LRESULT OnQueryEndSession(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);

    HICON m\_icoExit;
    HICON m\_icoPrevYear;
    HICON m\_icoNextYear;
    HICON m\_icoPrevMonth;
    HICON m\_icoNextMonth;
    HICON m\_icoToday;
    HFONT m\_icoTextFont;
    int m\_CurrentRegion, m\_nOldRegion;
    
    HICON m\_icoNodeClosed;
    HICON m\_cioNodeOpen;
    HICON m\_icoAttrib;
    enum EnToolBtnState
    {
    	tbs\_normal = 0,
    	tbs\_hover,
    	tbs\_prress\_down,
    }m\_nToolBtnState\[6\];
    RECT m\_rcToolBtn\[6\];
    
    HBRUSH m\_brToolBtnHover;
    int m\_nLastToolBtnHit;
    
    enum SKIN
    {
    	cpbob = 0,
    	cpnobob,
    	darkblue,
    	silver,
    	gold,
    	black,
    	lightblue,
    	green,
    	red,
    	rose,
    	aqua,
    	neonblue,
    	bluestreak,
    	crystalgreen,
    	crystalblack,
    	crystalblue,
    	crystalred,
    	crystalyellow,
    	silverring,
    	minimal,
    	white,
    };
    
    void SetSkin();
    
    struct SKIN\_MENU\_DATA
    {
    	UINT nID;
    	UINT nClockFaceBitmapId;
    	UINT nDateBitmapId;
    	TCHAR \*pszName;
    };
    static SKIN\_MENU\_DATA	m\_Skins\[\];
    static int				m\_nSkins;
    SKIN					m\_eSkin;
    ATL::CString m\_strSkin;
    
    SKIN GetSkinFromName(LPCTSTR lpszSkinName);
    

    private:
    void ParseNode(IDispatch* pNode,HTREEITEM hParent);
    HTREEITEM CJMainForm::InsertTreeItem(HTREEITEM hItem, LPCTSTR lpszItem, int nImage,
    int nSelec

    C / C++ / MFC c++ database help question

  • how to show a search bar in my class derived from CHtmlView
    J joshua0137

    thank you for you reply. i think the reason is as you pointed out. my enviroment: windowsXP sp3 + IE8

    C / C++ / MFC question help tutorial announcement

  • how to show a search bar in my class derived from CHtmlView
    J joshua0137

    thank your help info. i change the variable as code below, but the problem keeps the same:

    IWebBrowser2 \*pBrowser = NULL;
    // Ensure that our site is an browser window
    HRESULT hr = m\_pBrowserApp->QueryInterface(IID\_IWebBrowser2, (void \*\*) &pBrowser);
    if (!SUCCEEDED(hr))
    	return;
    
    // Display the band object (the Search bar in this case)
    VARIANT vtBandGUID, vtShow;
    vtBandGUID.vt = VT\_BSTR;
    //把这里的CLSID换成你的工具条CLSID
    vtBandGUID.bstrVal = SysAllocString(OLESTR("{30D02401-6A81-11D0-8274-00C04FD5AE38}"));
    vtShow.vt = VT\_BOOL;
    vtShow.boolVal = VARIANT\_TRUE;
    VARIANT vtEmpty = {0};
    hr = pBrowser->ShowBrowserBar(&vtBandGUID, &vtShow, &vtEmpty);
    SysFreeString(vtBandGUID.bstrVal);
    pBrowser->Release();
    
    C / C++ / MFC question help tutorial announcement

  • how to show a search bar in my class derived from CHtmlView
    J joshua0137

    thank you for your help. i use VARIANT_TRUE and true, the problem keeps the same. and i copy the guid from msdn, it also keeps the same. anyone more suggestions?

    C / C++ / MFC question help tutorial announcement

  • how to show a search bar in my class derived from CHtmlView
    J joshua0137

    i write a class derived from CHtmlView, and write the code as below, when it run, no bar appear, and a messageBox show a string '0x80040100', what is the reason? how can i make it work. any suggestion or help are appreciated

    void CXxView::OnShowBar()
    {
    IWebBrowser2 *pBrowser = NULL;
    // Ensure that our site is an browser window
    HRESULT hr = m_pBrowserApp->QueryInterface(IID_IWebBrowser2, (void **) &pBrowser);
    if (SUCCEEDED(hr))
    {
    // Display the band object (the Search bar in this case)
    VARIANT vtBandGUID, vtShow;
    vtBandGUID.vt = VT_BSTR;
    //change the CLSID as your bar CLSID
    vtBandGUID.bstrVal = SysAllocString(OLESTR("{30D02401-6A81-11d0-8274-00C04FD5AE38}"));
    vtShow.vt = VT_BOOL;
    vtShow.boolVal = TRUE;
    HRESULT hrx = pBrowser->ShowBrowserBar(&vtBandGUID, &vtShow, 0);
    if (FAILED(hrx))
    {
    CString _str;
    _str.Format("0x%x", hrx);
    AfxMessageBox(_str);
    }

    	SysFreeString(vtBandGUID.bstrVal);
    	pBrowser->Release();
    }
    

    }

    C / C++ / MFC question help tutorial announcement

  • why my class derived from CHtmlView cannot show the 'Search' bar
    J joshua0137

    i write a class derived from CHtmlView, and write the code as below, when it run, no bar appear, and a messageBox show a string '0x80040100', what is the reason? how can i make it work. any suggestion or help are appreciated

    void CXxView::OnShowBar()
    {
    IWebBrowser2 *pBrowser = NULL;
    // Ensure that our site is an browser window
    HRESULT hr = m_pBrowserApp->QueryInterface(IID_IWebBrowser2, (void **) &pBrowser);
    if (SUCCEEDED(hr))
    {
    // Display the band object (the Search bar in this case)
    VARIANT vtBandGUID, vtShow;
    vtBandGUID.vt = VT_BSTR;
    //change the CLSID as your bar CLSID
    vtBandGUID.bstrVal = SysAllocString(OLESTR("{30D02401-6A81-11d0-8274-00C04FD5AE38}"));
    vtShow.vt = VT_BOOL;
    vtShow.boolVal = TRUE;
    HRESULT hrx = pBrowser->ShowBrowserBar(&vtBandGUID, &vtShow, 0);
    if (FAILED(hrx))
    {
    CString _str;
    _str.Format("0x%x", hrx);
    AfxMessageBox(_str);
    }

    	SysFreeString(vtBandGUID.bstrVal);
    	pBrowser->Release();
    }
    

    }

    C / C++ / MFC question help announcement

  • WinCE5 touch screen calibration trouble.
    J joshua0137

    hi, everyone, i meet a trouble while i caliberting the ARM/WinCE5 touch screen. after i clicked the calibration button in the control pannel dialog, the screen flashed, then restored, and i cannot calibrate. i searched the web, and i found the next: Touch Screen Calibration - WinCE 5 - TouchCalibrate TomIsaacso posted on Monday, May 14, 2007 4:07 AM Platform Builder can autmatically clone TouchCalibrate: 1. Open your Workspace 2. From the catalog, search for “Minimail GDI Configuration” 3. Right click and choose “Clone Catalog Item” 4. A bunch of libraries will be listed, but the one you want is “calibrui”. Make sure it is checked and select “OK”. This puts a copy of TouchCalibrate in the directory "calibrui" in your workspace. You can now change the UI and the code and this will replace the standard function. Good luck. i tried it, but the problem kept the same. how to solve the problem? any advise is appreciated.

    Mobile workspace graphics design help tutorial

  • A questioon about Pen Width in the MM_ANISOTROPIC map mode.
    J joshua0137

    thank you, Pallini. i cannot abandon MM_ANISOGTROPIC, i must draw tow datas curves in the figure, they use the same time X axis, but they have different Y units and measurment ranges. i hope i describe the questiong clearly,any more advices?

    C / C++ / MFC question lounge

  • A questioon about Pen Width in the MM_ANISOTROPIC map mode.
    J joshua0137

    How do I use CPen with a width > 1; I using MM_ANISOTROPIC and my Viewport set to 1000,100 ? When I attempt do draw a random line, the width changes I believe because of the 10:1 scale that I set. How can I keep my viewport at 1000,100 and adjust the width on my line so that the width stays the same whether I draw a line horizontal, vertical or something in between?

    C / C++ / MFC question lounge
  • Login

  • Don't have an account? Register

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