|
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
|
|
|
|
|
Post the code in the sheet's constructor and the code that adds the pages.
Kuphryn
|
|
|
|
|
Constructor:
CMsgETIData::CMsgETIData() : CPropertyPage(CMsgETIData::IDD)
{
//{{AFX_DATA_INIT(CMsgETIData)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
How I _was_ adding pages:
CMsgETIData m_page2;
m_DQRMsgCreateSheet.AddPage(&m_page2);
m_DQRMsgCreateSheet.DoModal();
m_DQRMsgCreateSheet.RemovePage(&m_page2);
How I _want_ to add pages:
in the sheet header:
public:
CMsgETIData m_page2;
in the body:
m_DQRMsgCreateSheet.AddPage(&m_page2);
m_DQRMsgCreateSheet.DoModal();
|
|
|
|
|
Sorry...actually I want to do
AddPage(&m_page2)
in the constructor of the sheet!
|
|
|
|
|
Correct. The call to AddPage() should work correct in the constructor.
Kuphryn
|
|
|
|
|
Correct. The call to AddPage() should work correct in the constructor.
Should is the key word...that is the problem!
|
|
|
|