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!
josip cagalj
Posts
-
Read Only? [modified] -
How to change active tab in tabbed MFCHi 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
-
conditional menuNo the ID is the same "IDR_MAINFRAME", but they have difrerent 'Language' and 'Condition' property set. Thanks
-
conditional menuIt'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?
-
conditional menuHi, 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
-
larger toolbar imagesI'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
-
Staticly linking MFC in VS2008 app produces compiling errorsThanks 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).
-
Staticly linking MFC in VS2008 app produces compiling errorsWith 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 -
Staticly linking MFC in VS2008 app produces compiling errorsMy 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
-
Staticly linking MFC in VS2008 app produces compiling errorsFirst 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!
-
larger toolbar imagesThaks 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!
-
Staticly linking MFC in VS2008 app produces compiling errorsHi, 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___getpidif 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!
-
larger toolbar imagesHi 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!
-
CDialog in tab ctrlSolved. I totally forget about resizing class included for my dlg. Sorry for my mistake.
-
CDialog in tab ctrlI'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
-
CDialog in tab ctrlHi 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.
-
My app crash with no apparent reason?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!
-
My app crash with no apparent reason?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!
-
My app crash with no apparent reason?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!
-
build errorsSolved! Re arranging some directories in Tool->Options->Directories. Bye :-\