|
Yes, ALL .NET "compilers" compile IL code too!
doesn't it!?
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
I have dialog based application,If user click on a button I waana exit from application.Can some one tell me the code?I know it must be one or two line.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
I think if you call OnOK() in the main Dialog it should work. If not
PostQuitMessage(0) always does
|
|
|
|
|
Thanks.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
The function used to close a dialog box is EndDialog(int nResult) .
OnOK() or OnCancel() will automatically call EndDialog for you -- OnOK passes 1 (IDOK) for the nResult and OnCancel passes 2 (IDCANCEL).
Regards,
Alvaro
Intellectuals solve problems; geniuses prevent them. - Albert Einstein
|
|
|
|
|
Thanks.)
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Thanks.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
hi friend
There is a plenty of ways.........
void YourDialog::OnOK()
{
//just call
CDialog::OnOk();
or
exit(exitcode);
or
PostQuitMessage(exitcode);
or
EndDialog();
or
ExitThread(exitcode);
or
ExitProcess(exit code);
or
SendMessage(this,WM_DESTROY,0,0);
}
and many other
u can pas the exitcode as 0
ok
try it now..!!
RRenjith
Hai Friends me from Pandalam..and i think there is a sofware behind everything...
so enjoy with the codes...
|
|
|
|
|
woww,perfect.Thank you.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
I have a CListCtrl object set to Report mode and I was wondering if there is any way to add a new record to the beginning(0) and shift the existing onces down one?
Can this be done?
So far all I do is the destroy the data and rebuild it. Seems like there should be an easier way than this.
Thanks,
JD
|
|
|
|
|
CListCtrl::InsertItem()
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Is this obtained by setting the LVITEM.iItem to 0?
Thanks,
JD
|
|
|
|
|
Yes.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
ClistCtrl::InsertItem( int nItem, LPCTSTR lpszItem );
using nItem = 0;
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Hi,
I'm trying to allow my users to open a file with the read-only check boxed selected. If the user selects a single file and checks the box, GetOpenFileName properly returns the OFN_READONLY flag. If the user selects multiple files, and selects the read-only checkbox, the OFN_READONLY flag is not returned.
This appears to be a bug. Is there a workaround, or am I stuck?
thanks,
Dennis
|
|
|
|
|
I use this code:
CStdioFile inFile;
CString indatastring;
inFile.Open(strpath , CFile::modeReadWrite | CFile::typeText);
while(inFile.ReadString(indatastring))
{
AfxMessageBox(indatastring);
}
inFile.Close();
It only show one message box,my file is .doc file with many lines.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
The mode CFile::typeText relies on a end of line marker to determine a single text line. Based on what you've said, I'm guessing that your DOC contains a single marker, and it's at the end of the document, not at end line.
You may want to consider setting your ReadString statement to read a pre-defined number of characters (like 80 )
char buf[80]
inFile.ReadString( inDataString, buf )
Hope that helped somewhat,
D.
|
|
|
|
|
Douglas Troy wrote:
Hope that helped somewhat
Yes,it works,thank you.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
hi MAZY
here Renjith..
mmm The CStdioFile::ReadString()
function stops the readingwhen it see the first \n charecter
accoring to u thers ia many lines of text so there will me many newlines..so it will stop when it see the first '\n'.so only the first line displays..
you can do it in this way
extern CFile ofile;
char buffer[MAX_PATH];
UINT nReadedBytes = ofile.Read( pbuf, MAX_PATH );
it will consider the linefeed carriage return as a Single Charecter
try thi snow..!!
Renjith
Hai Friends me from Pandalam..and i think there is a sofware behind everything...
so enjoy with the codes...
|
|
|
|
|
I've just written a program with VC++ .Net (My first one with this environment ), and i realise that when I close the window, the process does not close.
It makes access to an oracle and a MS access database through MDAC (jet for Access, and ODBC for Oracle)
Any clues?
Regards,
Frank
|
|
|
|
|
Hi !
I have several databases (in mdb format) for my MFC project. I decided to put them on a server in the network. The path is like this:
//netbackup/multimedia/erginasil.mdb
The problem is: The server (netbackup)has a password which I have but the users will not have.If I first connect there ,the program runs normally. How can I acces a password protected server in the code. I found in msdn opening a password-protected "file" but I must give the "server password" to connect normally.
Thanks in advence..
|
|
|
|
|
You need to connect the resource.
See the Network Functions...
For example WNetAddConnection
Best Regards.
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Hi
Does anybody know where I can find a symbol/character picker (MFC/C++ source code) where you can choose font and character? I'm looking for something like the character map application (charmap.exe) in Windows.
Any suggestion? Thanks in advance.
/Mauritz
|
|
|
|
|
Hi i'm writing a FTP-client using win32 functions.
I need to compare the "ftLastWriteTime" of a file on a ftp server with a file on a local client without downloading the file from the server(s). I can use FtpFindFirstFile and FindFirstFile to retrieve this time. The problem is that FtpFindFirstFile returns the time by the local timezone.
How can i convert this time to UTC(zone independent) format??
Thanks
Fred
|
|
|
|
|
I have written a custom web browser for my company. I wrote it in MFC using the CHtmlView class. Everything is working well except:
I handle the OnNewWindow2 method to popup a new window and I have everything working as far as popping up the window, showing/hiding the toolbar, menubar, status bar. The problem is I can't find a way to determine the appropriate size of the new window. The info is not passed in with the call and does not appear to be available through the interface.
My best guess (from looking around) is that I need to create an event sink against the WebBrowser object itself and capture the settings there. I am not sure if this is the right approach and I am not quite sure how to go about doing this anyway.
Does anyone have any suggestions?
Thanks in Advance
Matt Gullett
|
|
|
|