Answer Questions
jlansing How do I run another application from an application using a button?
How do I run another application from an application using a button Is there a function in Visual C++ to do it You have CreateProcess API and ShellExecute / ShellExecuteEx at your disposal. It seems you have asked at the right forum. Move from Visual C# General forum to Visual C++ General forum. Note that your question is actually two questions. How to do something when a button is clicked How to run another application All of that is outside the scope of this forum. See The scope of this forum . Hi, do you want an answer in C++ or C# In C++ you would use the Win32 CreateProcess method to lauch a new process. From C# you can use the System.Diagnostics.Process class to create a new process i.e. r ...Show All
SShor How can I limit the no of lines in an EditBox
Hello, How can I limit the no of lines allowed in a multiline CEditBox Thanks and Regards Shibu Hello The more appropriate place for your question is probably the MFC newsgroup: http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.vc.mfc&lang=en&cr=US Thanks Damien ok. But what should I do, if it reaches the maximum line of limit regards..shibu. Perhaps there is a solution to your problem, but in my opinion you should not limit the user’s relish to edit a text in a multi-line editor. She/He probably should be able to have an intermediate text longer then required, to freely copy and paste fragments etc. I would just check the number o ...Show All
coder2k VC++ 6.0 ,Failed to load application.
I'm using Windows XP service pack 2 and building my application with VC++ 6.0. I failed to run the project, When it is built successfully. The error pop-up message is File: i386\chkesp.c Line:42 The value of ESP was not properly saved across a function all. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. After I clicked abort application the output window shows as follows : Loaded 'ntdll.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\ ...Show All
daimaku Balloon Tooltip Problem using Win Vista SDK
Hi, I have win32 Api Windows Application, my application goes on to system tray intially and keeps running. I have handled event On Left click on application in system tray in WndProc. In this we call a custom balloon Function. Below is part of code i have in WinMain which Push application to system tray NOTIFYICONDATA structNID; //This is defined Globally Above WinMain structNID.cbSize = sizeof (NOTIFYICONDATA); // sizeof the struct in bytes structNID.hWnd = (HWND) hWnd; //handle of the window which will process this app. messages structNID.uID = IDI_ICON1; //ID of the icon that willl appear in the system tray structNID.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; //ORing of all the flags strcpy_s(st ...Show All
Dietz insert a node in bst
hi, unfortunately i found one more problem, regarding my insert-function. as said a greater number than root will be added as right child and a less number as left child. My insert function looks currently like this: [code] template <class Item> void bag<Item>::insert(const Item& entry) // Header file used: bintree.h { binary_tree_node<Item> *cursor; if (root_ptr == NULL) { // Add the first node of the binary search tree: root_ptr = new binary_tree_node<Item>(entry); return; } else { // Move down the tree and add a new leaf: cursor = root_ptr; while(cursor != NULL) { if(cursor->data() > entry) cursor=cursor->right(); else if (curs ...Show All
Melt16 definition of dllimport function not allowed
wrapi.h ... #include "WRAPIExports.h" ... .... //macros #ifdef WRAPI_EXPORTS #define WRAPI __declspec(dllexport) #else #define WRAPI __declspec(dllimport) #endif ..... HRESULT EnumerateDevices(WRAPI_NDIS_DEVICE **ppDeviceList, long *plItems); ... .... ////////////////////////////////////////////////////// wrapi.cpp ..... .... ... //exported function implementation WRAPI HRESULT WRAPIEnumerateDevices(WRAPI_NDIS_DEVICE **ppDeviceList, long *plItems) { return theApp.EnumerateDevices(ppDeviceList, plItems); } ////////////////////////////////////////////////////////// WRAPIExports.h .... .... #ifdef WRAPI_EXPORTS #define WRAPI __declspec(dllexport) #else #define WRAPI __declspec(dllimport) #endif .... ... //exported functions WRA ...Show All
Richard Vaughan LNK2001 unresolved external symbol error !
HI I am compiling a project in VC++ 6.0 and these are the errors: Linking... LINK : warning LNK4049: locally defined symbol "_exit" imported LINK : warning LNK4049: locally defined symbol "_printf" imported LINK : warning LNK4049: locally defined symbol "_sprintf" imported LINK : warning LNK4049: locally defined symbol "_free" imported LINK : warning LNK4049: locally defined symbol "__getcwd" imported LINK : warning LNK4049: locally defined symbol "_calloc" imported LINK : warning LNK4049: locally defined symbol "_fclose" imported LINK : warning LNK4049: locally defined symbol "_fwrite" imported LINK : warning LNK4049: locally defined symbol "_fopen& ...Show All
SNOMan CWinFormsControl and VC.NEt
1) Is CWinFormsControl supported by VC.NET 2) How would I use a .NET control in native code in VC.NET. I wrote some code in VC2005 using the CWinFormsControl class. I included afxwinforms.h in my stdafx.h file to facilitate the class. But when I tried running the code under CV.NET it said that afxwinforms wasn't found. So my question is: Is CWinFormsControl supported by VC.NET . and if so do include afxwinforms.h or something else. and if this is not supported by VC.NET how would I use a .NET control in native code in VC.NET. Thanks! is there some alternative for using a managed control that is analogous to CWinFormsControl Nope, VS2003 doesn't have afxwinforms.h bahh... nevermind.. I talked my ...Show All
Sergey Sorokin 32bit console app on Vista x64
I'm trying to compile a simple 32 bit console application using VS2005 (C++ obviously) on Vista x64. The compiler gives me "Error result 255 returned from 'C:\Windows\SysWow64\cmd.exe'" and when I try to manulally run the 32bit cmd.exe above it tells me that it has been disabled by the administrator. I don't remember doing this, so it must have been a default setting or something. I haven't been able to find out how to enable the command prompt, and I'm not sure that would fix the problem. Any Ideas Thanks, Brady hello Re: 32bit console app on Vista x64 such question is currently not covered in the scope of this forum, for the scope of visual c++ general forum please refer to: http://fo ...Show All
Rush hour Hiding Folders
hi all i m writting a software for Documents mangaments and i want to hide the folders containg the documents, what my aim is that Anobody could not see the files from respective Folder even the administrator, i hadd found a software on the internet that hides the files and folder i mean thase are not shown in the drive,but i m able to read and write through my code without the password or any thing like that, how to hide the folder so that its icon is not visible.any help is welcomed. You can make use of SetFileAttributes function For further questions regarding general win32 dev, please use the newsgroups at http://msdn.microsoft.com/newsgroups Thanks, Ayman Shoukry VC++ Team you can use Following Code as s ...Show All
Fox Me Up how can i turn off the "/gs" flag ?
i hope im in the right forum.. im using MSVC++6 and i want to turn off the /GS flag, how can i do this thanks ! im so sure that VC6 is not support this option.. where did i need to write it in my program i mean after the "include..." and before the "int main()" or where and what is the syntax thanks ! Umh, I'm certain you know that already, but obviously /GS or /GS- are command line options that are passed to the compiler driver (cl.exe) on the command line. You can always look these up in the index of MSDN Library to find the corresponding setting in the IDE. So, it is nothing you would do in the source code. Are you sure you mean /GS (and not /Gs) There's probably a corresponding pr ...Show All
Trevin Chow SerialPort hell
Hey all, I am communicating with an old HP 8591C Spectrum Analyzer via serial port. If i use hyperterminal, the device responds to commands A LETTER AT A TIME!!! It is so frustrating that it doesn't wait for a carriage return. Into the dotnet world. I've tried a million times to make the serialPort control do this. For example: // This doesn't work serialPort->Write("ST 500MS" + "\r"); // Nor does this serialPort->WriteLine("ST 500MS"); // Nor does this serialPort->Write('S'); serialPort->Write('T'); serialPort->Write(' '); serialPort->Write('5'); ...... Any ideas as to why keystrokes in hyperterm get processed, but my individual writes do not ...Show All
AKINAL How to replace the MFC icon at mainframe with a custon icon
Hi, I'd like to know how to change the MFC default icon with a custom one in the mainframe of a MFC program, as well, the icon in the exe file name. Please help. Thanks. Jason Zhang Thanks for the reply. I did draw a new icon with the resource editor and it only works with the Help dialog not the mainframe. That's the 32x32 pixel one, but I can't find the small template to edit. Is that the reason that it doesn't work with the mainframe and the application exacutable name icon Thanks. Jason Got it. But do you happen to know how to reduce the icon from 32x32 to 16x16 pixels, and how to show the same custom icon in the name of the application in Windows e ...Show All
Kiran05 Replacement of CComModule in VS2005
Hi, I'm porting one of the dll from vc6 to vc8. In doing so I have created a complete framework to create a dll and subseqently add atl objects. By default the framewaork adds the follwoing code in the main app file class MyClassModule : public CAtlDllModuleT< MyClassModule> { public : DECLARE_LIBID(LIBID_MyClassLib) DECLARE_REGISTRY_APPID_RESOURCEID(IDR_MYCLASS, "{7C00C752-3DA7-4CB9-B721-7F39F9FEDD2E}" ) }; In previos versions of ATL CComModule _Module was used which has been replaced by CAtlBaseModule. Problem: There was an extern declaration as extern CComModule _Module in stdafx.h and definition in main app file as CComModule _Module . How do I replicate the above behaviour in t ...Show All
BigWinston What is difference between Queued and Non-Queued Messages?
Please tell me the exact difference using proper examples in Queued and Non-Queued Messages. This Q. is relevant to Windows Programming using Visual C++. http://msdn.microsoft.com/library/default.asp url=/library/en-us/winui/winui/windowsuserinterface/windowing/messagesandmessagequeues/aboutmessagesandmessagequeues.asp http://www.geocities.com/practicalvb/vb/windows/messages.html Gaurav Arora wrote: This Q. is relevant to Windows Programming using Visual C++. No, this question is not related to the C++ language. Visit the newsgroups at http://msdn.microsoft.com/newsgroups , and see my notices to you in your other threads. ...Show All
