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
H

HvalaMne

@HvalaMne
About
Posts
9
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Toolbars in dialogs
    H HvalaMne

    All functions return TRUE but Dlg is not seen. :( May be matter is my dialog is modeless? If I surely not forgot anything? I just added toolbar itself, toolbar member (public)

    class CMainDlg : public CDialog
    {
    DECLARE_DYNAMIC(CMainDlg)
    public:
    CToolBar tb;
    ...
    }

    and that lines in OnInitDialog:

    BOOL CMainDlg::OnInitDialog()
    {
    CDialog::OnInitDialog();
    if(tb.Create(this))
    {
    if( tb.LoadToolBar(IDR_TOOLBAR1) ){
    tb.SetBarStyle(CBRS_ALIGN_TOP | CBRS_TOOLTIPS | CBRS_FLYBY);
    tb.ShowWindow(SW_SHOW); // <--- here goes
    }
    }

    I made no handlers but tb must already be seen at this stage IMHO? PS Your code works for me. I begun aproach your code to mine and revealed next thing. After commenting line m_wndFormatBar.SetWindowPlacement(&wpl); in your code your toolbar disappearing too. So write just

    m_wndFormatBar.Create(this); // attach command routing to dialog window
    m_wndFormatBar.LoadToolBar(IDR_TOOLBAR_FORMAT);
    m_wndFormatBar.SetBarStyle(CBRS_ALIGN_TOP | CBRS_TOOLTIPS | CBRS_FLYBY);
    m_wndFormatBar.ShowWindow(SW_SHOW);

    is not enough to show toolbar. At least at mine comp. I will investigate it on. And thanks for example. -- modified at 6:00 Friday 14th April, 2006

    C / C++ / MFC tutorial javascript question

  • Toolbars in dialogs
    H HvalaMne

    Rage wrote:

    You can embed a CToolbar normally in a dialog.

    But I can't. :( I made toolbar itself and toolbar variable

    public:
    CMainDlg(CWnd* pParent = NULL); // standard constructor
    CMenu shlMenu;
    CToolBar shlToolBar;

    I inserted in OnInitDialog next lines

    shlToolBar.Create(this); 
    

    int m = shlToolBar.LoadToolBar(IDR_TOOLBAR); // returns 1
    shlToolBar.SetBarStyle(CBRS_ALIGN_TOP | CBRS_TOOLTIPS | CBRS_FLYBY);
    shlToolBar.ShowWindow(SW_SHOW);

    but I don't see any toolbar. May be I something forgot? Or I need static control to place toolbar in and no way without it? PS I tried to do exactly in reference, but all I got it's frame about toolbox. No any buttons. http://x-14224.narod.ru/screen.jpg -- modified at 9:19 Thursday 13th April, 2006

    C / C++ / MFC tutorial javascript question

  • Toolbars in dialogs
    H HvalaMne

    I want to make toolbar in dialog, like those which is in IE, WinZip, WinRar etc. How to do it, any example? Toolbars are easily built in CFrame, but not in CDlg. Now I made it through CStatic bitmaps, but those bitmaps do not react VISUALLY on mouse events, clicking, getting focus etc. -- modified at 5:03 Thursday 13th April, 2006

    C / C++ / MFC tutorial javascript question

  • Icons, bmps and art for programmers
    H HvalaMne

    I think it's too small sizes. If there is place to read about technology of making own bmps?

    C / C++ / MFC graphics question

  • free() fails in vc 6 debug mode
    H HvalaMne

    It happens when you allocate too small heap to keep data. Code below causes such error:

    char *buf = (char *)malloc(sizeof(char)); // just 1 byte allocated
    strcpy(buf, "longlonglong string. You allocated only one byte, just one char, how you copy so many chars in place where room is only for one char?");
    free(buf);

    compiler just inform you that your data are not allocated right way and may be corrupted. -- modified at 18:37 Thursday 6th April, 2006

    C / C++ / MFC c++ debugging help question

  • Icons, bmps and art for programmers
    H HvalaMne

    Hello. I'm not an artist, but I need some graphics for icons, buttons, bitmaps and want all this stuff to look professional. How you solving that problems? If existing any good icon or bmp libraries for non-artist programmer? Or if you paint icons bmps by own what editor you use? Thanks.

    C / C++ / MFC graphics question

  • string array
    H HvalaMne

    J5121982 wrote:

    CString myclass::getStr() { CString strarr[]={"JAYARAJ","bala"} return strarr; } i get error .. how to do it...?

    Of course u have type conflict. It look like you wrote int myclass::getInt() { int arr[]={1,1} return arr; } May be this helps:

    CString[] myclass::getStr()
    {
    CString strarr[]={"JAYARAJ","bala"}
    return strarr;
    }

    It should work, if no then try this

    CString *myclass::getStr()
    {
    CString strarr[]={"JAYARAJ","bala"}
    return (CString *)strarr;
    }

    BTW strarr seems to have local scope. So what you want to return is unclear. If I understand what you try to do, it better to declare it in class itself:

    class myclass{
    ...
    public: /*private if you want*/
    CString strarr[]={"JAYARAJ","bala"}

    ....

    }

    or specify static class storage

    CString[] myclass::getStr()
    {
    static CString strarr[]={"JAYARAJ","bala"}
    return strarr;
    }

    -- modified at 2:42 Friday 31st March, 2006 -- modified at 2:48 Friday 31st March, 2006

    C / C++ / MFC data-structures help tutorial question

  • FlexGrid control
    H HvalaMne

    thks

    C / C++ / MFC question

  • FlexGrid control
    H HvalaMne

    Doesw anybody knows if MS flexgrid supports user input? I inserted it in project, but I didn't manage to enter any text in a cell. The control is not disabled. Setting cell text by .put_Text works.

    C / C++ / MFC 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