Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
3
Posts with Upvotes
2
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~10.5K People Reached
This member's community profile is only visible to logged in members until they have earned 15 reputation points.
Favorite Forums

16 Posted Topics

Member Avatar for Xozz

Compress it to file.zip using a password, rename it to "file", attache it and tell your friend to rename it to file.zip and give him the password.

Member Avatar for Yrth
0
327
Member Avatar for BobFX

Hi, I have an app that works with Visual Studio 2010, but not with VS2015. Its purpose is to redirect stdout to a thread that reads from a pipe created with: if (FALSE == CreatePipe(&pipeout, &pipein, &sec, 0)) { mes = strdupa("SCRIPT: Unable to create pipe"); goto err; } SetStdHandle(STD_OUTPUT_HANDLE, …

Member Avatar for BobFX
0
579
Member Avatar for BobFX

Hi, I have built a shell extension handler, using this as a template: https://code.msdn.microsoft.com/windowsapps/CppShellExtContextMenuHandl-410a709a In this instance, it registers with a ".ts" extension: hr = RegisterShellExtContextMenuHandler(L".ts", CLSID_LNtoALL, L"CppShellExtContextMenuHandler.LNtoALL"); The project compiles fine, and the registration works also. But on one PC, it fails to load (the context menu for .ts …

Member Avatar for BobFX
0
390
Member Avatar for BobFX

Hi, I'm using a C++/CLI form, with a printDialog item: { public: Form1(void) { InitializeComponent(); this->printDialog1 = (gcnew System::Windows::Forms::PrintDialog()); I call the dialog with: printFont = gcnew System::Drawing::Font( "Courier New",10 ); PrintDocument^ pd = gcnew PrintDocument; pd->PrintPage += gcnew PrintPageEventHandler( this, &Form1::PrintInstPrintPage); printDialog1->ShowHelp = false; printDialog1->Document = pd; System::Windows::Forms::DialogResult result …

0
102
Member Avatar for BobFX

Hi, The Windows API function to select a directory is really bad, so I'm trying to use GetOpenFileName() instead. For that, the idea is to set a hook function, so that when the user hits the OK button without having actually selected a file, the hook function retrieves the currently …

Member Avatar for BobFX
0
3K
Member Avatar for BobFX

Hi, I'm trying to get the printer name selected by the user with the PrintDlg() dialog. I made a sample Win32 project with VS 2008, (with "Use Multi-Byte Character Set") and inserted the following code in the "About" callback part: PRINTDLG pd; BOOL rc; DEVMODE *dev; DEVNAMES *dvn; char *name; …

Member Avatar for BobFX
0
397
Member Avatar for BobFX

I need to override the Close button an a C++/CLI Form application, allowing the user to cancel the close. This must have been asked a zillion times, but I can't find an example specific to C++/CLI Form applications. My Form class starts with: [code]namespace TR31Forms { using namespace System; using …

Member Avatar for AmrFouad
0
2K
Member Avatar for BobFX

Hi, I have a server running with a Form based managed C++ app. It initializes with: [code] try { listener = gcnew TcpListener(ipAddress, PORT_lock); listener->Start(); // Start listening for client requests. listener->BeginAcceptTcpClient(gcnew AsyncCallback(DoAcceptTcpClientCallback), listener); [/code] The callback funtion is defined as: [code] public: static void Form1::DoAcceptTcpClientCallback(IAsyncResult^ result) { try { …

0
101
Member Avatar for BobFX

Hi, I have a stream server application written in C, that I need to incorporate in a GUI C++ managed new program, but I am having trouble finding the equivalent of the C sockets function calls. The C apps initialize this way: [code] /* * Init socket */ if ( …

Member Avatar for BobFX
0
495
Member Avatar for BobFX

Hi, I'm trying to send an e-mail from a managed application. I found the following example: [code] MailAddress ^From = gcnew MailAddress("[email protected]"); MailAddress ^To = gcnew MailAddress("[email protected]"); MailMessage ^message = gcnew MailMessage(From, To); message->Subject = "Testing sending mail"; message->Body = "Body of message"; SmtpClient^ client = gcnew SmtpClient( "smtp.foo.com" ); …

Member Avatar for jonsca
0
631
Member Avatar for BobFX

Hi, I am trying to make and use my own DLL within a C++/CLI project. The DLL project contains an header utc.h file with the following declaration: [code] namespace utc { __declspec(dllexport) void dthr (int dt[3], int hr[3]); }[/code] The source of the dthr.cpp file starts with: [code] namespace utc …

Member Avatar for Excizted
0
191
Member Avatar for BobFX

Hi, I'm using a Form generated application. Its definition starts with: [code]public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) {[/code] When I'm inside one of its method, I can use calls like: [code]this->StartPosition = FormStartPosition::Manual;[/code] thanks to the this pointer. How can I do this kind of calls …

Member Avatar for BobFX
0
128
Member Avatar for BobFX

Hi, I need to convert some C# code into C++. It starts with: [code=c#] Dictionary<string, ListViewItem> mItems = new Dictionary<string, ListViewItem>(); [/code] I can't find a full example in the C++ Visual Studio documentation. How do I declare a Dictionary object? A small example would be appreciated. Thanks.

Member Avatar for BobFX
0
1K
Member Avatar for BobFX

Hi, I need to convert a BSTR buffer (that contains wchar data) to a straight char*. How can I do that? I only found that info so far: [url]http://msdn.microsoft.com/en-us/library/ms235631(VS.80).aspx[/url] but it covers only CComBSTR types. I'm not sure how CComBSTR and BSTR relate. Thanks.

Member Avatar for BobFX
0
332
Member Avatar for BobFX

I have a very basic problem, which answer is not covered in the 1200 pages of the C++ book I'm using to teach myself. Consider this simple code: [code]#include "stdafx.h" using namespace System; class EventListener { long mRef; public: EventListener() { mRef = 0; } }; int main(array<System::String ^> ^args) …

Member Avatar for BobFX
0
142
Member Avatar for BobFX

Hi, I am learning C#, having a good C background as a programmer. I need to port a C application to C#, but there is a very basic problems that stalls me. My C program has many subroutines, each of them in its own file. They share a common .h …

Member Avatar for BobFX
0
668

The End.