|
i want to start a local process that should be started by loading the executable located on the remote computer into local memory.
i am sharing the folder on the remote machine.but it could not be started.
can any body tell the sample code of running a process at network path?
i will be very thank full to you.
r00d0034@yahoo.com
|
|
|
|
|
Try to see what exact error you've got. I used ShellExecute and it worked fine wherever the file is located
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
Hello,
I am trying to create an email application in which users send HTML emails to one another. I am debating at present how to create the GUI for when a user composes the email. The problem is that I have to convert the email when it is sent, into HTML.
I first thought of CRichEditView, but that can't convert a formatted message into HTML. I looked at CHTMLView, but I think that all this does is provide a read-only browsing service with the Web Browser control.
Is there any way I can use CHTMLView to convert a text message into HTML? Or does anyone know of a library/DLL which can parse formatted text into HTML?
I would be very grateful for guidance here.
Thanks,
Trimtrom
|
|
|
|
|
Formatted text can easily be converted into HTML depending
on exactly what you want. For example,
CString convertToHTML(CString s)
{
return CString("<PRE>") + s + "</PRE>";
}
will do it. However, that doesn't allow the browser to reformat
line breaks. to do that simply search your string for any
blank lines (use the Find function in CString) and replace them
with "<p>".
Oh, and one other thing, you might have to hack grough the
string replacing special characters with their equivelents
in HTML. Specifically "<" with < ">" with > and " with
" (?? not sure of the exact spelling of this.)
Note that you don't need to put all the <HTML>, <HEAD> or
<BODY> tags as they are all optional. Though theoretically,
but not in practice, you are supposed to start all HTML with
the following tag:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
(assuming you are using English.)
If you need more complex formatting, you need to pull together
some sort of GUI to manipulate the text (i.e., have a bold button
insert <b></b>) If that is the case you need to look at
CHTMLEditCtrl.
HTH
|
|
|
|
|
Thanks for the reply.
I am using Visual C++ 6.0, and I have had a look all over the Help, and I can't find anything on CHTMLEditCtrl. Did this come in with version 7.0?? It sounds like something I would want.
I think basically I am looking for some control to turn text into HTML the same way the RichEditCtrl writes RTF files.
Any comments appreciated,
trimtrom
|
|
|
|
|
Check MSDN, it'll give you the info you need.
|
|
|
|
|
umm how do i convert c++ to hex?
or does anyone have a program that will do it for me?
|
|
|
|
|
what does "convert c++ to hex" mean?
-c
There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'.
--Holgate, from Plastic
|
|
|
|
|
I think he can't find a "Build" button in his VC
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
LOL
Cheers
Kannan
|
|
|
|
|
Yeah, the program called Visual Studio. Just press F7 in it
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
LOL, that's exactly what I thought
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
[edit]N/m, DEFAULT_GUI_FONT works, although SYSTEM_FONT doesn't for some reason. [/edit]
I'm baffled.
I have a scenario like this:
I have a splitter window. One pane contains a window, written by me, which itself hosts two windows - one list control and one window written by me. It's in this last window my problems occur.
In the WM_PAINT handler I do the usual CPaintDC dc(*this) and then I get on with the actual drawing. I want to draw some text (using DrawText ) using the default gui font. So i HFONT hOldFont = dc.SelectObject((HFONT)GetStockObject(DEFAULT_GUI_FONT)) . But guess what? It's not the default gui font (Tahoma)! It's that damn fixed font. I also tried with SYSTEM_FONT to no avail. I did try OEM_FIXED_FONT which gave me Courier which seems ok according to the MSDN docs. GetStockObject() does not return NULL. I'm stumped! Have I missed some initialization, window style, window class style, or something?
--
Only in a world this sh*tty could you even try to say these were innocent people and keep a straight face.
|
|
|
|
|
It seems as if I posted this in the wrong forum, but I think it's in the right forum. I think the error is related to windows in general, not the toolkit.
--
Only in a world this sh*tty could you even try to say these were innocent people and keep a straight face.
|
|
|
|
|
I get weird results from this code:
void CGDlg::OnButton1()
{
WIN32_FIND_DATA wfd;
HANDLE hRes = FindFirstFile("C:\\Documents and Settings\\dator19\\Skrivbord\\MUMMEL\\*.txt", &wfd);
BOOL bOk = (hRes != INVALID_HANDLE_VALUE);
while(bOk)
{
bOk = FindNextFile(hRes, &wfd);
m_ListBox1.AddString(wfd.cFileName);
}
}
I have 4 files (1.txt, 2.txt, 3.txt and 4.txt) in the directory but when I show the filnames in a listbox (m_ListBox1) the output is:
2.txt
3.txt
4.txt
4.txt
Hmm... what is wrong!
It should be:
1.txt
2.txt
3.txt
4.txt
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++!
|
|
|
|
|
FindFirstFile actually gives you a file - you need to add that to your list, too.
There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'.
--Holgate, from Plastic
|
|
|
|
|
That fixed one bug... but it still print out the last file two times;
1.txt
2.txt
3.txt
4.txt
<code>4.txt <-- Damn %¤#"¤#¤&!!!</code>
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++!
|
|
|
|
|
Try reversing the code in the while block
while(bOk)
{
m_ListBox1.AddString(wfd.cFileName);
bOk = FindNextFile(hRes, &wfd);
}
------- 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:
Try reversing the code in the while block
YES!!
Thanks!
void CGDlg::OnButton1()
{
WIN32_FIND_DATA wfd;
HANDLE hRes = FindFirstFile("C:\\Documents and Settings\\dator19\\Skrivbord\\MUMMEL\\*.txt", &wfd);
BOOL bOk = (hRes != INVALID_HANDLE_VALUE);
while(bOk)
{
m_ListBox1.AddString(wfd.cFileName);
bOk = FindNextFile(hRes, &wfd);
}
}
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++!
|
|
|
|
|
May I ask one more question: If I change to *.* instead of *.txt it adds .. and ... into the listbox. What's that?
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++!
|
|
|
|
|
current and parent folders.
you should add this check:
if ((findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)==FILE_ATTRIBUTE_DIRECTORY)
{
skip it
}
a working example:
http://www.codeproject.com/file/sadirread.asp[^]
-c
There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'.
--Holgate, from Plastic
|
|
|
|
|
You're calling FindNextFile too soon.
--
Only in a world this sh*tty could you even try to say these were innocent people and keep a straight face.
|
|
|
|
|
Hello !!!
I want to(ok i have to...)make a simulator for a operating system.Can anyone help me with this?Any resources code or something else will help me, thanks.
|
|
|
|
|
What exactly do you mean?
For example if you want to run Linux in Windows you can install something like VMachine. It will take some of your HD, say 2Gig. Then you can run VMachine in a window and install Linux to it. Meaning you boot windows, work inside it. Then if you want to run Linux, you open the VMachine window and have a fresh new computer inside the window to run your Linux environment.
We used this to test a Corparate web page on Windows 95/98/ME/2000/XP on one machine, and various Linux on another.
Is this something like what you need or am I completely off base?
|
|
|
|
|
I have some shell extension which splits the filename(s).
I use _tsplitpaht(..) API and have this error:
for Release MinSize/MinDependency configuration
while _tsplitpaht(..) is in use
I get this Linkage error message:
Linking...
Creating library ../CopyFilePath.lib
and object ../CopyFilePath.exp
LIBCMT.lib(crt0.obj) : error LNK2001:
unresolved external symbol _main
../CopyFilePath.dll : fatal error LNK1120:
1 unresolved externals
Error executing link.exe.
while commenting _tsplitpath(..) I get no error msg.
for Debug configuration
while _tsplitpaht(..) is in use I get NO error msg
Any ideas
|
|
|
|