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

josip cagalj

@josip cagalj
About
Posts
242
Topics
86
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Read Only? [modified]
    J josip cagalj

    Keep getting this problem in VS2008-SP1 (Win7 64bit) and all suggestion above don't seem to work for me??? Is there anything else I could do to get this sorted out. P.S. I'm getting this error while trying to add a handler to WM_LBUTTONUP in my view class!

    Visual Studio help c++ question data-structures

  • How to change active tab in tabbed MFC
    J josip cagalj

    Hi to all. How can I change( set) the active tab in Tabbed MDI app created using VS2008. I need to set active tab from CMainFrame using zero based index (what I need is a pointer to CMFC(Base)TabCtrl so I can call 'SetActiveTab(int id)' )? Thanks in advance

    ATL / WTL / STL question c++ database tutorial

  • conditional menu
    J josip cagalj

    No the ID is the same "IDR_MAINFRAME", but they have difrerent 'Language' and 'Condition' property set. Thanks

    C / C++ / MFC c++ question learning

  • conditional menu
    J josip cagalj

    It's an IDR_MAINFRAME menu, it loads I guess in MainFrm::OnCreate, why doe I need to do all that, why doesn't it loads corectly?

    C / C++ / MFC c++ question learning

  • conditional menu
    J josip cagalj

    Hi, I have two menu resources (IDR_MAINFRAME) with different conditions (created using 'right mouse-> Insert Copy' on original). I use them in different Releases. The thing is I can't get second one to load, always the original one is shown. I set condition for both VER1 and VER2, I manage Project Properties in resource and c/c++->Preprocessor parts but still cant get the the second one to be loaded? Thanks in advance

    C / C++ / MFC c++ question learning

  • larger toolbar images
    J josip cagalj

    I've solved it

    if (!m_wndMenuBar.Create(this))
    {
    TRACE0("Failed to create menubar\n");
    return -1; // fail to create
    }

    m\_wndMenuBar.SetMenuSizes(CSize(22,22), CSize(16,16));
    m\_wndMenuBar.SetPaneStyle(m\_wndMenuBar.GetPaneStyle() | CBRS\_SIZE\_DYNAMIC | CBRS\_TOOLTIPS | CBRS\_FLYBY);
    
    // prevent the menu bar from taking the focus on activation
    CMFCPopupMenu::SetForceMenuFocus(FALSE);
    
    CMFCToolBarInfo tbInfo;
    tbInfo.m\_uiColdResID		= 0;
    tbInfo.m\_uiDisabledResID	= 0;
    tbInfo.m\_uiHotResID		= 0;
    tbInfo.m\_uiLargeColdResID	= 0;
    tbInfo.m\_uiLargeDisabledResID	= 0;
    tbInfo.m\_uiLargeHotResID	= 0;
    tbInfo.m\_uiMenuResID		= IDR\_MAINFRAME\_256;
    
    if (!m\_wndToolBar.CreateEx(this, TBSTYLE\_FLAT, WS\_CHILD | WS\_VISIBLE | CBRS\_TOP | CBRS\_GRIPPER | CBRS\_TOOLTIPS | CBRS\_FLYBY | CBRS\_SIZE\_DYNAMIC) 
    	|| !m\_wndToolBar.LoadToolBarEx(IDR\_TOOLBAR1, tbInfo)) {
    	TRACE0("Failed to create toolbar\\n");
    	return -1;      // fail to create
    }
    

    - Call CMFCMenuBar::SetMenuSizes() before creating toolbar - Use CMFCToolBarInfo struct leaving all members to 0 except m_uiMenuResID where you pass yours 16x16 sized resource entry - CallLoadToolBarEx() Off course IDR_TOOLBAR1 is 32x32 sized

    C / C++ / MFC tutorial question learning

  • Staticly linking MFC in VS2008 app produces compiling errors
    J josip cagalj

    Thanks for contributing, my app is SDI MFC. One question just to make my self clear, when I use 'Project > Properties > Linker > Input > Additional Dependencies' entering libmysql.lib mysys.lib strings.lib is this dynamically linking or static. Same question for

    #pragma comment(lib, "Netapi32.lib")
    #pragma comment(lib, "mpr.lib")
    #pragma comment(lib, "shlwapi.lib")

    entries. When compiled will exe contain those lib's or do I need to make sure that those lib's exist on target machine by building msi file? My gold is to have the exe which will contain all necessary stuff to work on win target machine (Win2000, XP, Vista, Win7).

    C / C++ / MFC help c++

  • Staticly linking MFC in VS2008 app produces compiling errors
    J josip cagalj

    With Release version errors are:

    1>FileVersion.obj : error LNK2001: unresolved external symbol __pgmptr
    1>nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
    1>nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc

    C / C++ / MFC help c++

  • Staticly linking MFC in VS2008 app produces compiling errors
    J josip cagalj

    My app works with mysql db and only lib's I'm linking are: libmysql.lib, mysys.lib and strings.lib. And trough my code I have

    #pragma comment(lib, "Netapi32.lib")
    #pragma comment(lib, "mpr.lib")
    #pragma comment(lib, "shlwapi.lib")

    This is an simple sdi app created with vs2008. Sure I have some CMFC controls (like toolbars and so) which are from feature pack. I didn't try to install re-distributable file on target machines.

    modified on Tuesday, March 23, 2010 8:28 AM

    added additional libs from my code

    C / C++ / MFC help c++

  • Staticly linking MFC in VS2008 app produces compiling errors
    J josip cagalj

    First let me thank you for replaying. I have following requirements I need to keep. I need to distribute my exe to multiple machines with no knowledge about OS installed. I've tried on several local computers and where app didn't work I've get different error messages. So by static linking MFC I hope I'll be able to get it to work!

    C / C++ / MFC help c++

  • larger toolbar images
    J josip cagalj

    Thaks for yours replay. The sample you pointed to me unfortunaly uses images only on toolbar and not menu. I've pulled some ideas from it so thanks once again!

    C / C++ / MFC tutorial question learning

  • Staticly linking MFC in VS2008 app produces compiling errors
    J josip cagalj

    Hi, I made an app in MFC VS2008 which works ok, but there are some PC's where my app just wont work (you allready know this story right..) so I decide it would be for the best to staticly link MFC. This produced some errors while compiling:

    1>mysys.lib(my_messnc.obj) : error LNK2001: unresolved external symbol __imp____p__iob
    1>libmysql.lib(dbug.obj) : error LNK2019: unresolved external symbol __imp____p__iob referenced in function __db_push_
    1>libmysql.lib(net.obj) : error LNK2001: unresolved external symbol __imp____p__iob
    1>mysys.lib(safemalloc.obj) : error LNK2001: unresolved external symbol __imp____p__iob
    1>mysys.lib(my_init.obj) : error LNK2001: unresolved external symbol __imp____p__iob
    1>libmysql.lib(dbug.obj) : error LNK2019: unresolved external symbol __imp__fprintf referenced in function __db_enter_
    1>libmysql.lib(net.obj) : error LNK2001: unresolved external symbol __imp__fprintf
    1>mysys.lib(safemalloc.obj) : error LNK2001: unresolved external symbol __imp__fprintf
    1>mysys.lib(my_init.obj) : error LNK2001: unresolved external symbol __imp__fprintf
    1>libmysql.lib(dbug.obj) : error LNK2019: unresolved external symbol __imp__vfprintf referenced in function __db_doprnt_
    1>libmysql.lib(dbug.obj) : error LNK2019: unresolved external symbol __imp__getpid referenced in function _DoPrefix
    1>OLDNAMES.lib(getpid.obi) : error LNK2001: unresolved external symbol __imp__getpid
    1>libmysql.lib(dbug.obj) : error LNK2019: unresolved external symbol __imp__perror referenced in function _DBUGOpenFile
    1>libmysql.lib(dbug.obj) : error LNK2019: unresolved external symbol __imp__freopen referenced in function _dbug_flush
    1>mysys.lib(my_error.obj) : error LNK2019: unresolved external symbol __imp____p__pctype referenced in function _my_error
    1>mysys.lib(my_error.obj) : error LNK2019: unresolved external symbol __imp____p___mb_cur_max referenced in function _my_error
    1>strings.lib(Int2str.obj) : error LNK2019: unresolved external symbol __imp__ldiv referenced in function _int2str
    1>OLDNAMES.lib(getpid.obi) : error LNK2001: unresolved external symbol __imp___getpid

    if anyone can Help please do so. I've been googling and still couldn't find the right way. Thanks in advance, and sorry for my bad language!

    C / C++ / MFC help c++

  • larger toolbar images
    J josip cagalj

    Hi to all. Is it possible to have a 32x32 images on toolbar while keeping 16x16 in menu. I created toolbar resource (IDR_TOOLBAR1) and set it's button size as 32x32 and load it:

    if (!m_wndToolBar.CreateEx(this,...) ||
    !m_wndToolBar.LoadToolBar(IDR_TOOLBAR1 ))
    {
    ...
    }

    When compiled and started toolbar correctly shows large btn images but menu is also enlarged showing 32x32 item images!? How to have menu images as before (small 16x16)? My app info: SDI, VS2008 Thanks in advance!

    C / C++ / MFC tutorial question learning

  • CDialog in tab ctrl
    J josip cagalj

    Solved. I totally forget about resizing class included for my dlg. Sorry for my mistake.

    C / C++ / MFC question

  • CDialog in tab ctrl
    J josip cagalj

    I'll try to explain again in hope of yours help. one of my tabs contains an CDialog based window (myDlg), the problem is when tab is selected (shown) a myDlg window is shoving a resizing triangle in right down corner (also when resizing myDlg goes blank white ). How can I remove that triangle, myDlg is created with child style and border: none

    C / C++ / MFC question

  • CDialog in tab ctrl
    J josip cagalj

    Hi to all. I have a CTabCtrl on my CDialog containing two tabs, I've added two dialog window (style child, border none) to those tabs. When my second tab is selected (shows second wnd) a resizing mark is shown on right bottom corner. This is not happening with first tab. How cam I remove that mark? I don't want to have resizing option, the tab rectangle is sufficient to hold the biggest dialog size. Hope I've made myself clear, and thanks in advance.

    C / C++ / MFC question

  • My app crash with no apparent reason?
    J josip cagalj

    Yes so I did. Found out the thing causing the problem. You see I inherited this app from an colleague from work he had slight different control then my own (it's work internal control we use). When overwritten, all worked OK. The thing causing the problem is when called OnIdle message notifies some wnd's of an idle time, and some of those aren't wnd at all!

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

  • My app crash with no apparent reason?
    J josip cagalj

    I'm aware of this. The thing is there's no pattern when my app will crash, some times on this occasion and on second run on that. No relationship between?! That's what bugging me!

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

  • My app crash with no apparent reason?
    J josip cagalj

    Hi to all. When I run my application and start to work with it, after a while it crashes! Call stack:

    00000000()
    AfxCallWndProc(CWnd * 0x003af188 {CWnd hWnd=0x00020ae4}, HWND__ * 0x00020ae4, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000) line 215 + 26 bytes
    CWnd::SendMessageToDescendants(HWND__ * 0x00020ac6, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 2309
    CWnd::SendMessageToDescendants(HWND__ * 0x00020ac8, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 2320
    CWnd::SendMessageToDescendants(HWND__ * 0x000d09fc, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 2320
    CWnd::SendMessageToDescendants(HWND__ * 0x0008099e, unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 2320
    CWnd::SendMessageToDescendants(unsigned int 0x00000363, unsigned int 0x00000001, long 0x00000000, int 0x00000001, int 0x00000001) line 146 + 32 bytes
    CServisiApp::OnIdle(long 0x00000000) line 3694
    CWinThread::Run() line 472 + 30 bytes
    CWinApp::Run() line 400
    AfxWinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x00151f0b, int 0x00000001) line 49 + 11 bytes
    WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x00151f0b, int 0x00000001) line 30
    WinMainCRTStartup() line 330 + 54 bytes
    KERNEL32! 7c817077()

    The error I get is: "First-chance exception in MyApp.exe: 0xC0000005: Access Violation." Any clue? Win XP, VC 6 Thanks!

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

  • build errors
    J josip cagalj

    Solved! Re arranging some directories in Tool->Options->Directories. Bye :-\

    C / C++ / MFC help question sysadmin windows-admin
  • Login

  • Don't have an account? Register

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