-
- Vertical, rotated LABEL
by bucz
- 3 Replies
- Last post
by Bite Qiu - MSFT
- How to display a vertical label, rotated 90deg
-
- get User Objects/Handles for a process
by Nikolay Georgiev
- 1 Replies
- Last post
by Nikolay Georgiev
- Hello,
I'm new to using the windows libraries and I try to figure out how can I found the user objects (handles) for some process (like in the task manager). I've searched two days in MSDN, but couldn't find something useful. So far I understood, that using the PSAPI.dll I can iterate over the processes, so I can get the process ids of the current running processes. I can't make the next step -
-
- Calling function from another Form. C++
by robben07160
- 9 Replies
- Last post
by Christiawan
- Hi,
I have two forms (implemented using Windows Forms - C++) using the same namespace the main form [FORM1] sets values in [FORM2] which works correctly. FORM1 file therefore includes (#include "FORM2.h¡±) in the header.
But, what I'm trying to do is in the FORM2 file is to call a function which is located in FORM1 [I have included the FORM1 in the file (#include "FORM1
-
- [.NET] sent keyboard command to a program
by tlemcenvisit
- 3 Replies
- Last post
by Bite Qiu - MSFT
- Hello
I am working with Visual C++.NET. I would like to launch a program (for example notepad.exe) then, I'd like to send a keyboard command to this program (in the case of notepad.exe this implies writing). In an old version of VB I used the command sendkey to accomplish this task. To launch the program, I use:
Code Snippet System::Diagnostics::Process ^proc = gcnew System::Dia
-
- Why does VS2005 do a full compile on mananged C++ prjoect every time when debugging, even with no changes?
by Luo Cao
- 2 Replies
- Last post
by Luo Cao
- I searched in the forum, but I can not find the answer. Every time when I start to debug, VS will rebuild all managed C++ projects, and only these managed C++ projects; it cost me 2 minutes every time. That is too worse.
-
- using unmanaged code
by Participant
- 7 Replies
- Last post
by nobugz
- Hi there,
I am facing a problem of acessing unmanaged code from my managed C# application. The problem is that I have C++ based dll files that seems to be unmanaged since I was not able to add them using Add References fromVisual Studio 2005. The problem is that C++ code used to generate dll files is Object Oriented so I can't use P/Invoke with it. Does anyone know how can I add their reference
-
- Callback implementation
by Nikam Shailesh B
- 3 Replies
- Last post
by einaros
- Hi,
I want information about callback function. What are callback function. How they are implemented using function pointers
-Shailesh
-
- How to obtain date diffrence of two dates in years?
by Aleksandr Tokarev
- 11 Replies
- Last post
by Simple Samples
- How to obtain date diffrence of two dates in years I can do it manually, but I whant to know any API or CRT function. It should give date diffrence between two dates in days, month, years. somthing like datediff in MS T-SQL.
for instance date diffefence in years between '29 july 1981' and '29 july 2007' == 26 (years).
-
- About delete this
by Sam1981
- 14 Replies
- Last post
by Brian Kramer
- Hi,
Is it valid that delete this ptr in a class method And why And it should be used in which the case if it's valid
-
- Input/Output (save/load files)
by Jerry584894
- 8 Replies
- Last post
by Simple Samples
- this is my file:
Code Snippet
#include <iostream> #include <cstdlib> #include <string> #include <afxwin.h> using namespace std;
void main() { char* pszFileName = "\test.dat"; CFile myFile;
if ( ! myFile.Open( pszFileName,CFile::modeCreate | CFile::modeReadWrite)) { TRACE( "Can't open file %s\n",pszFileName); } }
Howeve
-
- benefits of private or protected constructor
by George2
- 10 Replies
- Last post
by George2
- Hello everyone,
I am thinking about the benefits of a private or protected constructor. The only benefits I could think of is we could use singleton design pattern and make a public function (e.g. CreateInstance) as a single point to create instances and hide the constructor to outside.
Any more comments
thanks in advance, George
-
- how to install/register a windows service programatically?
by bijubiju
- 3 Replies
- Last post
by Damien Watkins - MSFT
- hi, I have created a windows service using ATL wizard in visual c++ 6.0. How do i register, start and stop the service programatically Is there any other way to create a service( not to be an exe)
-
- How to get index of currently selected item in case of MFC Listcontrol?
by ketu0001
- 6 Replies
- Last post
by ketu0001
- How to get index of currently selected item in case of MFC Listcontrol
-
- MSDN OLE DB Sample Provider entry point
by George2
- 7 Replies
- Last post
by Holger Grund
- Hello everyone,
I have built MSDN OLE DB Sample Provider and successfully built/debug it using Microsoft Excel as client. I have found that in DllGetClassObject (classfac.cpp), the class SampProv is initialized as the 1st coclass, then DataSource object will be created in QueryInterface.
http://msdn2.microsoft.com/en-us/library/ms715011.aspx
The entry point of a COM server (like this Samp
-
- error LNK2019: unresolved external symbol
by SFyffe
- 8 Replies
- Last post
by SFyffe
- Hi Everyone,
I have worked through a number of the threads but I can not get past this Link Error.
MS Visual Studio 2005 Express
Version 8.0.50727.42
My header file looks like this:
#ifndef WAREHOUSE_H
#define WAREHOUSE_H
template < typename T>
class warehouse
{
public :
warehouse();
void additem( const T& it
-
- VS.NET 2005 VC++ ERRORS?????????????????????
by el_fuerte
- 6 Replies
- Last post
by Hao Tian
- HI there
i'm running an app. in vs.net 2005 with .cpp in pure c++ and files in vc++ .
but the app retrive me this kind of errors:
Error 1 fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source e:\Program Files\Point Grey Research\PGR FlyCapture\src\pgrflycap\rtCalib.cpp 504 Error 2 fa
-
- About OnOK()!!!!!!!!!!!!!! Very Urgent
by Hi,
- 1 Replies
- Last post
by Bruno van Dooren
- Hi i ahve modal dialog which is activated when a button in the another dialog is clicked. This modal dialog has two custom buttons with id IDOK and IDCANCEL. The problem here even if i give ENTER when the dialog is activated, the dialog wont close. In other wards when i press ENTER key it wont call OnOK() function. But ESCAPE key works fine.. Please give me the solution as soon as possible
-
- best practice for storing recent files used by my application
by baxybaxy
- 5 Replies
- Last post
by baxybaxy
- Hi all,
I have a pretty typical application where the user can choose from of a series of files to open.
I would like to add a 'recent document'* facility to this, in common with apps such as excel, word etc
There would appear to be a load of ways to do this and I'm not sure which road to start down
Can anyone advise on whether there is a best practice for this (in orde
-
- Detecting debugger
by brietje698
- 5 Replies
- Last post
by einaros
- Anyone has a sample source on how to detect debuggers without IsDebuugerPresent
-
- Reading from Config file
by Mannee
- 4 Replies
- Last post
by Mannee
- Hi! In my C++ application I use a COM Object (written in C#). When I try to call one of the methods (that tries to read settings from configuration file) I get a nasty error -0x7c812a5b (unfortunately it's hard to debug COM objects). My c# method looks as follows: public string ReadConfigValue() { System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUs
-
- Async named pipe functions
by zbenjamin
- 14 Replies
- Last post
by Simple Samples
- Hello, is there a way to get a async notification from a named pipe handle that new data is available to read. A message or a event would be okay. i know i can wait with ReadFile for available data. But if i want to use named pipes in a gui application with that would block my application loop. regards zbenjamin
-
- Calculate size of a project
by Jason Zhang
- 5 Replies
- Last post
by Jason Zhang
- Hi,
Do anybody know how to automatically count the number of lines of a C++ project or a solution in VS IDE
Thanks in advance.
/Jason
-
- Celsius to Fahrenheit converter
by Anonymoususer
- 4 Replies
- Last post
by Anonymoususer
- could someone figure out how to fix this
errors: --------------------Configuration: ctof - Win32 Debug-------------------- Compiling... ctof.cpp F:\Program Files\Microsoft\C++\MyProjects\ctof\ctof.cpp(13) : error C2065: 'cout' : undeclared identifier F:\Program Files\Microsoft\C++\MyProjects\ctof\ctof.cpp(13) : error C2297: '<<' : illegal, right operand has type 'char [34]' F:\
-
- Error C2248
by Wessel571579
- 1 Replies
- Last post
by Wessel
- Hi,
I made this "lobby" but it gives me error c2248 how can I fix this problem
I'm new to C++.
He say's its private but I made it a friend.
when I try to compile it in Dev-C++ it works, but when I use Visual Studio it gives me the error c2248
Code Snippet
#include <iostream>
#include <string>
using namespace std;
class P
-
- adding member functions
by Andrew Linzey
- 6 Replies
- Last post
by Bite Qiu - MSFT
- I'm new to vc++ 2005 express. I've created a class in an empty win32 consol project,. the on line help says I should be able to right click the class and select 'add member function'. the menu I'm getting has 'got to definition', 'go to declaration' but no 'add meber function' . Do I have to configure something in IDE to to get thios to work
-Andy