|
Yes but every time I try to complie the project I get the following linking errors
Linking...
nafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in libcp.lib(delop.obj)
groupremoval.obj : error LNK2001: unresolved external symbol _NetApiBufferFree@4
groupremoval.obj : error LNK2001: unresolved external symbol _NetGetDCName@12
groupremoval.obj : error LNK2001: unresolved external symbol _NetUserAdd@16
groupremoval.obj : error LNK2001: unresolved external symbol _NetUserDel@8
groupremoval.obj : error LNK2001: unresolved external symbol _NetUserSetInfo@20
groupremoval.obj : error LNK2001: unresolved external symbol _NetUserChangePassword@16
groupremoval.obj : error LNK2001: unresolved external symbol _NetUserGetInfo@16
groupremoval.obj : error LNK2001: unresolved external symbol _NetQueryDisplayInformation@28
groupremoval.obj : error LNK2001: unresolved external symbol _NetUserEnum@32
groupremoval.obj : error LNK2001: unresolved external symbol _NetGroupAdd@16
groupremoval.obj : error LNK2001: unresolved external symbol _NetGroupAddUser@12
groupremoval.obj : error LNK2001: unresolved external symbol _NetGroupDelUser@12
groupremoval.obj : error LNK2001: unresolved external symbol _NetGroupDel@8
groupremoval.obj : error LNK2001: unresolved external symbol _NetGroupEnum@28
groupremoval.obj : error LNK2001: unresolved external symbol _NetGroupGetUsers@32
groupremoval.obj : error LNK2001: unresolved external symbol _NetLocalGroupAdd@16
groupremoval.obj : error LNK2001: unresolved external symbol _NetLocalGroupAddMembers@20
groupremoval.obj : error LNK2001: unresolved external symbol _NetLocalGroupDelMembers@20
groupremoval.obj : error LNK2001: unresolved external symbol _NetLocalGroupDel@8
groupremoval.obj : error LNK2001: unresolved external symbol _NetLocalGroupEnum@28
groupremoval.obj : error LNK2001: unresolved external symbol _NetLocalGroupGetMembers@32
nafxcw.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcw.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Release/groupremoval.exe : fatal error LNK1120: 23 unresolved externals
Error executing link.exe.
groupremoval.exe - 25 error(s), 0 warning(s)
|
|
|
|
|
Do you link with the Netapi32.lib file and including Lm.h as MSDN Library says?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
I want to write an application to monitor our company employees. In other hand, monitoring visited sites by users, their activity on internet and so on.
Does anybody have any idea to start this project? Where can I find some documents, APIs, Classes and ...?
Thanks, A. Riazi
|
|
|
|
|
Why don't you just buy something that's already done? It'll be cheaper in the long run that it would be to pay a developer to write it all from scratch.
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
Hi John,
It has some reason.
1- I want to learn!
2- Customize my needs!
3- Add extra functionality, GUI, charting and ...
Thanks, A. Riazi
|
|
|
|
|
how to disable button on CDlgBar?
I tested this member function
button.EnableWindow(FALSE);
sleep(5000)
this code operate only 5 second
if erase sleep(5000)
code does not operate(exactly speaking... operate 0.001 second?)
I test other formview button
formviewbutton.EnableWindow(FALSE)
is operate correctly...
what's problem CDlgBar?
gjun@netian.com
|
|
|
|
|
How did you declare the button ? If it is declared as a local variable in a function, it will vanish as soon as you leave it. Try out with a member variable.
~RaGE();
|
|
|
|
|
member variable ...
not local variable
and not vanish button.......
I cannot disable button...
|
|
|
|
|
Does it matter if I call the base class first then put in my code, or should the base class call be last. VS does say place your code here...sometimes before and sometimes after, but I just noticed that in some places, the order is not enforced by the person who wrote the sample, yet it still works. Is this dangerous?
void CBKView::OnInitialUpdate()
{
<code>CFormView::OnInitialUpdate();</code>
ResizeParentToFit();
m_FirstSearchKeyInMenu = "None selected";
}
or
void CBKView::OnInitialUpdate()
{
ResizeParentToFit();
m_FirstSearchKeyInMenu = "None selected";
<code>CFormView::OnInitialUpdate();</code>
}
Appreciate your help,
ns
|
|
|
|
|
It mainly depends on the function. In the example you showed, it could matter if you are doing changes on what is done in the base class function, which is almost unprobable. So changing the order is rather harmless. But look at the following example :
CMyDialog::OnOK()
{
...
pWApp->WriteProfileInt("Settings","Window width",m_width);
CDialog::OnOK();
}
compared to
CMyDialog::OnOK()
{
...
CDialog::OnOK();
pWApp->WriteProfileInt("Settings","Window width",m_width);
}
In the first case, you write settings in the registry before calling the base class function. In the second case, you do it after, and your settings are never saved, since CDialog::OnOK() close the window.
In some overrided, you have to comment out the call to base class, for example to change the cursor in OnSetCursor, otherwise your changes won't apply.
I would recommand you to insert your code where the comments invite you to do it, unless you're absolutely sure of what you're doing.
~RaGE();
|
|
|
|
|
I looked up OnSetCursor and saw where you say you shouldnt call the base class.....
The registry example also makes things really clear!
Appreciate your help,
ns
|
|
|
|
|
From a CP article by Brian Hart he has the following:
void CMainFrame::RecalcLayout(BOOL bNotify)
{
CWnd* pClientWnd = CWnd::FromHandle(m_hWndMDIClient);
<code>
pClientWnd->SendMessageToDescendants(WM_SIZEPARENT,
0, 0, FALSE, FALSE);
CMDIFrameWnd::RecalcLayout(bNotify);
}
Its used in:
void CMainFrame::OnSize(UINT nType, int cx, int cy)
{
CMDIFrameWnd::OnSize(nType, cx, cy);
RecalcLayout();
}
The comment
<br />
worries me.
It seems to work but is it not reliable? Any suggestions/improvements/comments?
Appreciate your help,
ns
|
|
|
|
|
hello!
i have two CStrings:
<br />
CString str1;<br />
CString str2;<br />
I want to combine them:
<br />
CString together;<br />
together=str1+str2;<br />
but between the strings must be a return, because i want to fill the CStrings together into a .txt-file and there must begin a new line, when the second CString is added.
someone in this forum said that in this case you can do this:
<br />
together=str1+0X0A+0X0D+str2<br />
but it does not work.
can someone help me???
thank you
lucky
|
|
|
|
|
|
You need to do this:
together=str1 + CString("\n") + str2
or this:
together.Format("%s\n%s", str1, str2);
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
John Simmons / outlaw programmer wrote:
together=str1 + CString("\n") + str2
Why do you need the CString() called for "\n" ? It's only CString objects, so a simple "\n" should work, in contrast to f.i. LPTSTR used. Or am I wrong?
|
|
|
|
|
great!! thank you very much!
you are not wrong.....it works, too.
lucky
|
|
|
|
|
Because there's a bug in CString where if you add a single character to a string like this:
CString sString = "Test";
sTest += "\n"
sTest = sTest + "\n"
running the program in release mode will generate a memory corruption error (in debug it will work fine). It's a bug in the CString class, and you can find it in the MFC source if you look hard enough.
I don't know if this bug has been fixed in versions of MFC later than 4.2...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
great!! thank you very much!
lucky
|
|
|
|
|
How can we redirect user I/O to a temporary ‘buffer’ space so that all changes are written to the buffer space during the current session. When the computer is rebooted, the I/O reads should be
redirected back to the original file location and all changes made in the previous session
are discarded.(ie. after logg off/reboot)
|
|
|
|
|
You actually think you'll get any more answers if you ask the same question multiple times? Wrong. The more times you ask the same question, the more annoying you'll be percieved.
Disregarding the fact that your both ignorant and annoying, what you say you want to do can't be done. Period.
If you want a "restartable" machine, use something like VMWare.
No please stop asking this question.
|
|
|
|
|
I remember to have once seen an ad for some piece of hardware doing this: It basically was a modified HD-adapter which was before booting cloned a hidden partition onto the work partition. So you had the same setup at every boot.
Great for schools or public computers.
Hope this helps, and you can stop to repeat your postings.
Please do not ask me for a website or more special info, as I do not know any more.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
can anyone help me in putting something to the subject and body of your default mailer. i.e. suppose I have Microsoft outlook and if I want to send a mail through my program I will do it thru ShellExecute..but is there any way likt this only..to write the data into subject and body of new mail message..like send this to a friend and you want the stuff wrote but not the email id. For email Id you will write mailto:email and this will do the work will open a new mail message with the mail id. How to write subject and body of this mail..not into to: field...any help and pointers are surely appreciated..any opinions..please..
thanks in advance..
Himanshu
|
|
|
|
|
Already tried DDE ?
~RaGE();
|
|
|
|
|
thanks rage..but can you give some example..so that I can understand better..
thanks a lot..
Himanshu
|
|
|
|