|
I am not sure which IDE you are using but you need to include nafxcwd.lib in your linker settings. Unresolved external sysmbols come from the linker not being able to find the implementation of the function in the header file.
I am using MSVS 2003. So I go to Project on the file menu then Properties. I then select linker from the listview. Then under general there is an Option for additional Library Directories. Add the path to nafxcwd.lib. This should fix it.
Best of Luck
Forever Developing
|
|
|
|
|
Micheal Dunn has done a nice job giving answers to FAQ's. Read the C++ forum FAQ[^] and you'll find your answer..
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Looks like your linking multi-threaded libraries to a single-threaded app to me...
|
|
|
|
|
Hello Techies,
I had a splitter window. And I want to set the size of the each splitter window at the initialization only. I want to know the widht and heigth of each splitter window. I am not able to get any code. pLease help regarding the above matter.
Thank you,
Neelesh J Jain
|
|
|
|
|
Since CView is derived from CWnd and your views are derived from CView simply try the GetWindowRect() member of your view class.
MS
|
|
|
|
|
I had already used the GetWindowRect() function, But I need to get the Width so that I can display one splitter of 1/4 of the application window and remaining 3/4 for another splitter.
Neelesh Jain
|
|
|
|
|
OK !
Assuming rightPane and leftPane are your two view classes in the splitterWnd:
RECT rectAppl;<br />
long heightAppl=0;<br />
long widthAppl=0;<br />
<br />
AfxGetMainWnd()->GetClientRect(&rectAppl);<br />
<br />
heightAppl=rectAppl.bottom-rectAppl.top;<br />
widthAppl=rectAppl.right-rectAppl.left;<br />
<br />
rightPane.SetWindowPos(&wndBottom, 0, 0, widthAppl/4, heightAppl, SWP_NOMOVE|SWP_NOZORDER);<br />
leftPane.SetWindowPos(&wndBottom, 0, 0, (widthAppl/4)*3, heightAppl, SWP_NOMOVE|SWP_NOZORDER);
I think thats what you want to do.
MS
|
|
|
|
|
I use mouse wheel to zoom in/out on my CScrollView. But now on windows xp (previously i used w2k without problems), i get OnVScroll() messages instead of OnMouseWheel(). I cant find a way to catch the wheel and overrule the scrolling behaviour. What the...??
When the scrollbars are off, I get mousewheel messages
When the scrollbars are on, I get vscroll messages
I want to always reveive mouse wheel!
Thanks
|
|
|
|
|
Hi,
Need help in changing the picture buttons of the Control Box i.e. I want to change the "X" (for close) in the Control box to a different image. The Same Applies for "the Square" restore and the "-" for the minimize.
A related issue would be how to change the color of the caption bar?
I am a new developer using Visual studio .net
thx
Kolpia
|
|
|
|
|
|
Ok this is killing me
i dont know much about Msg in the MFC
how to do a hitTest Msg and while the mouse down
mouseX = WindowX && mouseY = WindowY
|
|
|
|
|
What do you want to do ???
MS
|
|
|
|
|
Are you talking about the GetMessagePos() function?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
i want to send MSG in the MFC
like the hit test MSG
blah::OnBlah()
like OnPaint()
|
|
|
|
|
ANDYFA wrote:
i want to send MSG in the MFC
Do you mean SendMessage() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
Ok, what exactly did you want to know about message maps in MFC, aside from the framework using them to connect messages and commands to their handler functions.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
i made a window(dia) with no title bar so i want to move it around when i click on it
|
|
|
|
|
It helps to be specific the first time around.
See here for an example.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
By entering characters in the edit box should be sent to the port.Now from the port i need to read the data character by character and display it in another edit box for each click of the ctrl buttton.
how am i to do it?
Pls help.
Mithuna
|
|
|
|
|
I want to create a new Excel file and create all the tables in it using the ODBC.
e.g. Creating the file Student.xls, then creating tables ID and Name.
I am using MFC with Visual Studio 6.
modified 9-Mar-17 17:25pm.
|
|
|
|
|
Congratulations on your desire to learn about manipulating Excel files via C++. What exactly are you having trouble with? What code have you put together thus far?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Dear Friends,
I would like to restart a PC whenever any error occurs in my application.
How can I do so. Please help me as soon as possible.
Thanking You in advance.......
Billar
|
|
|
|
|
ExitWindowsEx()
There is no spoon.
mail
|
|
|
|
|
If you are using NT/2000/XP, you will need to set privileges.
DWORD dwVersion = GetVersion();
if ( dwVersion < 0x80000000)
{
HANDLE hToken;
LUID tmpLuid;
HANDLE handleProcess=GetCurrentProcess();
if (!OpenProcessToken(handleProcess,TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
return;
if (!LookupPrivilegeValue(0,"SeShutdownPrivilege", &tmpLuid))
return;
TOKEN_PRIVILEGES NewState;
LUID_AND_ATTRIBUTES luidattr;
NewState.PrivilegeCount = 1;
luidattr.Luid=tmpLuid;
luidattr.Attributes=SE_PRIVILEGE_ENABLED;
NewState.Privileges[0]=luidattr;
if (!AdjustTokenPrivileges(hToken, false, &NewState, sizeof(TOKEN_PRIVILEGES), 0, 0))
return;
}
ExitWindowsEx(...);
|
|
|
|