|
Move afxwin.h had no effect?
And add this linker switch/NOD nafxcwd.lib has resulted in awful consequences (about 1500 errors )
I use a static library.
|
|
|
|
|
I was doing some reading on your linker error because I had the same problem once and the only thing that I remembered was doing that /NOD trick. Well, there was more to it that I didn't remember. Sorry about that.
I hope this works now (I got it from MSDN):
There are two ways to resolve this problem. The first solution involves forcing the linker to link the libraries in the correct order. The second solution allows you to find the module that's causing the problem and correct it.
Solution One - Force Linker to Link Libraries in Correct Order
Open the Project Settings dialog box by clicking Settings on the Build menu.
in the Settings For view, select (highlight) the project configuration that's getting the link errors.
Click the Link tab.
Select INPUT in the Category combo box.
In the Libraries to Ignore edit box, insert the library names (for example, Nafxcwd.lib Libcmtd.lib)
NOTE: The linker command line equivalent in /NOD:<library name="">
In the Object/library Modules edit box, insert the library names. You must ensure that these are listed in order and as the first two libraries in the line (for example, Nafxcwd.lib Libcmtd.lib).
Solution Two - Find the Problem Module and Correct It
Perform the following steps to see the current library link order:
Open the Project Settings dialog box by clicking Settings on the Build menu.
In the Settings For view, Select (highlight) the project configuration that's getting the link errors .
Click the Link tab.
Type the following in the Project Options dialog box:
/verbose:lib
Rebuild your project. The libraries will now be listed in the output window during the linking process.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
I know this can't be that hard, but I can seem to find it anywhere?
I know how to transfer CStrings between dialogs, but I can't figure out how to transfer double variables between dialogs.
I wish I could type better ...
|
|
|
|
|
And in what a difference?
If you transfer CString through the pointer then double is transfer through the pointer too.
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Why don't you keep a public function in the dialog class which will set the value of the double and call that function from the first dialog?
Regards,
Melwyn
|
|
|
|
|
Do you need to transfer the value or the variable?
if you want to transfer the value, a simple solution can be:
<br />
double GetYourDoubleVar() {return m_dYourdoubleVar;}<br />
if you want to transfer the variable and that only one dialog can use is do:
<br />
BOOL GetYourDoubleVar(double* d)<br />
{<br />
if(m_pdYourDouble == NULL)<br />
return FALSE;<br />
d = m_pdYourDouble;<br />
m_pdYourDouble = NULL;
return TRUE;<br />
}<br />
hope this helps
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Thank you. I will give this a try.
I wish I could type better ...
|
|
|
|
|
I just wanted to let anyone know that I found the answer to my problem. I was making it much harder than it need to be.
CMyDialogNumber2 Dlg;<br />
<br />
if( Dlg.DoModal() )<br />
{<br />
UpdateData();<br />
m_CurrentWindowValue = Dlg.m_PopUpWindowValue;
}<br />
Just thought I should follw up.
Thanks to everyone who replied.
I wish I could type better ...
|
|
|
|
|
Dear all
I will like to output % as a text to a Text File.
CString cc="Ec%0B";
message.Format(cc);
m_File.WriteString(message);
but, The file just show Ec, not Ec%0B. can someone tell me why?
Thanks
|
|
|
|
|
To output a % you need to put a \ before it.
CString cc="Ec\%0B";
message.Format(cc);
m_File.WriteString(message);
[EDIT]
Why are you using the Format statement anyways? It is not necissary in your code.
CString cc="Ec%0B";
m_File.WriteString(cc);
[/EDIT]
John
|
|
|
|
|
John M. Drescher wrote:
To output a % you need to put a \ before it.
Or use %%, as per the <codeprintf()< code=""> docs
I agree with not needing to use <code>Format(), although this may not actually be the code in his program...
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan Binns wrote:
Or use %%, as per the docs
I guess its time to get some sleep.. I am soo tired...
John
|
|
|
|
|
Yeah, that's probably a good idea sometime
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi all,
I want to connect to ftp server and move file1 to a archive folder. I have been using Wininet lib. for my ftp connect and get commands, however, how do I move a file on the server to a certain directory ?
Maybe I have to use another lib. , any help is appreciated ?
Thanks.
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
FTP doesn't support moving files around on the server. To do this, you'll need to download the file (GET), delete the file (DELE), change to the new directory (CD) and upload the file again (PUT). You might want to delete the file after uploading the new file, just in case you lose the connection before it uploads properly. It's very slow, but the only way you can do it using ftp.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
My, didn't I find that out early! Whenever I rename a file on an FTP server, I always ask myself, "Why didn't the protocol designers have the sense to make a rename command???".
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Yeah, it's crazy isn't it. If I ever find that I have to do something like this, I try to use telnet instead (if the server supports it), but it's a bit complex
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Actually, that's not entirely true. Most FTP servers I've seen actually get command support from binaries in their bin directory. If someone were to add a copy command to the bin directory and allow certain users to access it, they should be able to move and / or copy files. The command set in FTP servers usually come from a combination of built-in functions (like GET and PUT usually) and applications. If the FTP server had such commands, you should be able to issue a custom command. Otherwise, downloading and re-uploading would, of course, work.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Heath Stewart wrote:
If the FTP server had such commands, you should be able to issue a custom command.
That's the issue. "If"
I've seen a couple of servers that support this, but not many. It's not standard and may work differently on some servers to others.
I still think it's a PITA that ftp doesn't support copying/moving in the standard
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thanks for your insight Ryan and to all others who have commented. This has confirmed my suspicions.
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
Should not be too hard but I'm probably just very stupid
I have a dialog with a listbox.
I want to know when the mouse-button is released in the listbox's client-area.
I DON'T want to create a special class for the listbox.
So how can my dialog get an OnLButtonUp from the listbox..?
Any help would be greatly appreciated!
|
|
|
|
|
One solution is to add the appropriate mouse message handler and determine whether the mouse is over the client area via PtInRect().
Kuphryn
|
|
|
|
|
Well, that was my first try too.
But when the mouse is over the listbox's client-area the dialog doesn't receive the OnLButtonUp-message...
|
|
|
|
|
your dialog is receiving only
notification messages from it's childs
WM_NOTIFY message and notification code.
You could simulate this behaviour
by subclasing the listbox and send a message to it's parent (dialog)
use CHookWnd class By PJ Naughter
http://www.codeproject.com/cpp/chookwnd.asp
|
|
|
|
|
I am trying to build a property sheet with its pages instantiated in the header file of the sheet. The project builds fine, but gives an assertion error on ASSERT(afxCurrentResourceHandle != NULL) as soon as execution is attempted (in the construction of a page). This error does not occur if pages are instatiated "on-the-fly" in the body of the property sheet previous to the DoModal() call. But I need to have property page member functions visible to other classes, so they need to be predefined. Any ideas as to why it barfs on property page construction in this setting?
Thanks in advance,
Ben
|
|
|
|