|
Hi
I have a SDI application, within that i have a property sheet, which has several property pages
I need to pass my Document pointer to some of the property pages
I can pass the doc pointer to the sheet via DoModal OK like
ie.
CMyAppDoc* pDoc = GetDocument();
CMySheet dlg;
dlg.DoModal(pDoc);
however once at the sheet i need to pass it to some of the pages
does anyone know the correct way of doing this
i load each of my pages in the constructor in my property sheet
like
AddPage(&m_Page1);
Thanks
Si
|
|
|
|
|
put a call in your sheet that can take the pointer and pass it to all the pages:
void CMySheet::SetDocPtr(CDocument *pDoc)
{
m_page1.m_pDocPtr = pDoc;
..etc
}
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
thanks
|
|
|
|
|
how i give to a variable the numbers of tick (my Timer is on every 1000ms). so how i can give the number of seconds have passed at a variable
-- modified at 16:48 Sunday 14th May, 2006
|
|
|
|
|
use ctime.h and use st_time() and end_time()
|
|
|
|
|
makaveli_07 wrote: st_time() and end_time()
sorry i Can't able to find any information of these function in MSDN!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Dear All
Can I compile C code on the Visual Studio 2003/2005?
If yes, please tell me how?
Thanks a lot
|
|
|
|
|
Yes, just name the files with a .c extension and they'll be treated as C files. There's also a compiler switch to force this behavior for any file (in case they don't have a .c extension and you can't rename them).
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
How to delete an object by giving time limit to it.
Like, if an object is not referenced by anyone for say 5 minutes then it must get deleted by itself.
Please give me some logic for this.
|
|
|
|
|
|
MaheshKalose wrote: Like, if an object is not referenced by anyone for say 5 minutes then it must get deleted by itself.
Set a timer after last refernced when that timer complete, delete the object!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hellp i want to display data from an interger variable into an AfxMessageBox
i have no compilation errors but when i run the App i have a diaglog Box with 3 buttons ' Ignore ' ' Continue' ...
What's the problem !
UpdateData(true);
AfxMessageBox(m_terma);
CDialog::OnOK();
Thank you very much for your help!
|
|
|
|
|
CString strMessage;
strMessage.Format ("var = %d", m_terma);
AfxMessageBox (strMessage);
You're probably better off using the TRACE() macro.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Mahhouraaaaaa wrote:
UpdateData(true);
AfxMessageBox(m_terma);
CDialog::OnOK();
i think m_terma is of type integer.
so this
CString csMsg;
csMsg.Format("%d", m_terma);
AfxMessageBox(csMsg);
try it out
Loka Samastha Sukhino Bhavanthu..!!!
( May all beings be happy and free )
|
|
|
|
|
<br />
CString str; <br />
int m_terma=20;<br />
<br />
str.Format ("Value = %i", m_terma); <br />
AfxMessageBox (str);<br />
------------------------------------<br />
TCHAR buffer[50];<br />
itoa(m_terma,buffer,10);<br />
AfxMessageBox (buffer);<br />
------------------------------------<br />
TCHAR buffer2[50];<br />
wsprintf(buffer2,"Value = %i",m_terma);<br />
AfxMessageBox (buffer2);<br />
whitesky
|
|
|
|
|
Mahhouraaaaaa wrote: Hellp i want to display data from an interger variable into an AfxMessageBoxi have no compilation errors but when i run the App i have a diaglog Box with 3 buttons ' Ignore ' ' Continue' ...What's the problem !
What about setting the breakpoint after UpdateData, and seeing the value in the Quick Watch Window!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
hi again
I have file path
CString sPath = "c:\some folder\some file.txt"
I need to convert it to following path :
CString sPath = "c:\\some folder\\some file.txt"
how to achieve it ?
thanks
-- modified at 12:52 Sunday 14th May, 2006
|
|
|
|
|
|
If this is your actual C++ code:
CString sPath = "c:\some folder\some file.txt"
then it's wrong. The \s will be treated as one character. In a string literal, \ is a special character, and you write \\ to get one backslash.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Are you sure that you need this conversion???
The char \ is coded into the symbol \\ only to find a way to tell at the compiler that we want to use that char: So I can't understand why you need this char conversion: they are only 2 way to see the same thing.
And this is the reason because the first line
(
CString sPath = "c:\some folder\some file.txt"<br /> )
is wrong(see \s , as is saying Michael), and you can't use it.
Hope it helps.
|
|
|
|
|
Hi i got a project that connect on server ftp and i want to add options :
Send File to the server
Delete File to the server
Get File from the server
and IF it is possible Open file(.txt), make changes , save changes (file will be on the server)
-- modified at 12:00 Sunday 14th May, 2006
Oh yes Microsoft VS C++ 6.0 (MFC applicatoin).
|
|
|
|
|
|
Immunity18 wrote: Hi i got a project that connect on server ftp and i want to add options :Send File to the serverDelete File to the serverGet File from the server
try CFTPConnection Class
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
hi all
can anybody explain me what is the difference, between C++ structs and classes
thanks
|
|
|
|
|