-
- Convert char* to System::String^
by AridTag
- 4 Replies
- Last post
by AridTag
- After hours of searching I was able to find a function to convert System::String^ to a char* but now I need to convert a char* to System::String^
Could someone help me with this please
-
- Creating an Image from a byte array
by Mats Upptrom
- 4 Replies
- Last post
by Mats Upptrom
- Hello,
need a little bit of help, I'm trying to build a new Image using data stored in a byte array, however I'm getting an Invalid Parameter exception when I use the FromStream() method.
Code Snippet
...
int sz = img->height * img->width;
array <byte>^ tbuf = gcnew array <byte>(sz);
// converting data from externally read tiff fi
-
- Hashtable vs some other Collection?
by Modeller
- 6 Replies
- Last post
by Ryan Lamansky
- Hi!
This question is related to Managed C++.
One of my important data in the program is a point structure which includes the x-, y- and z-coordinates. The total number can be as many as one million.
I am not sure what kind of collection I should use. Right now I am using array but I am considering hashtable with the following hash code :
(int)x ^ (int)y ^ (int)z ^ id; /
-
- Cannot register OCX after migration from 2003 to 2005
by Jeroen94704
- 1 Replies
- Last post
by Bite Qiu - MSFT
- I am in the early stages of migrating a fairly large project from VS .NET 2003 to VS 2005. One problem I'm runing into is that I can compile and link an ActiveX OCX, but registration fails. When I manually try to register the ocx with regsvr32, I get the message "LoadLibrary("name.ocx") failed - Invalid access to memory location". Dependency walker does not show anything critic
-
- mystery.c how does this work
by Marius F
- 3 Replies
- Last post
by Sdi
- hey how can explain me how is this freaky program working
this is alien stuff
Code Snippet
#include <stdio.h>
main(t,_,a)
char *a;
{ return !0<t t<3 main(-79,-13,a+main(-87,1-_,
main(-86, 0, a+1 )+a)):1,t<_ main(t+1, _, a ):3,main ( -94, -27+t, a
)&&t == 2 _<13 main ( 2, _+1, "%s %d %d\n" ):9:16:t<0 t<-72 ma
-
- hello, a program with release and debug
by Tony2008
- 4 Replies
- Last post
by Ramkrishna Pawar
- when does an program run normally with release version but debug version
-
- How do a create a new text file, and how do I insert an eof into it?
by dangrmous
- 12 Replies
- Last post
by karist
- Hi,
I'm looking to create a new text file. I am in second term C++ so we're not using the MFC or anything. We have covered opening, reading, closing ifstream and ostream objects from fstream.h , but nothing about how to create a file if one's not there. Is this possible
Also - anyone know how to insert an eof into a file through a text editor or something in Windows I am given to understand
-
- Casting DataGrid to Dataset
by robben07160
- 5 Replies
- Last post
by robben07160
- Hi, I'm trying to cast DataGrid to Dataset see below (C++)
Dataset *mydataSet = __try_cast<DataSet*>(myDataGrid->DataSource);
However, I get the following error: "S pecified Cast is not Valid".
I'm trying to loop through the rows in the datagrid therefore I need to cast the datagrid to a dataset, I populate the datagrid with a datatable.
Would anyone have any sugge
-
- The warning of the type casting from "HANDLE" to "long"
by AddOil
- 11 Replies
- Last post
by Simple Samples
- I need to cast "HANDLE" to "long". I use the following code:
lStdHandle = (long)GetStdHandle(STD_ERROR_HANDLE);
But there is a warning in VC2005:
warning C4311: 'type cast' : pointer truncation from 'HANDLE' to 'long'
How can I solve this warning
Thanks!
-
- Code templates in Visual C++ 6.0
by rKarthik
- 2 Replies
- Last post
by rKarthik
- Can anyone tell me if there is a way to automatically add code templates for Visual C++ 6.0 so that a new cpp or header file would be created with that template.
Thanks,
KarthikR
-
- "Layered" precompiled headers
by Jelle van der Beek
- 6 Replies
- Last post
by Simple Samples
- Hi,
I'm reading the book "C++ templates, the complete guide", and in section 6.5 the writers suggest to use layered precompiled headers. With that they mean to have multiple precompiled headers, but also to have a precompiled header to use another precompiled header, as if it inherits the other precompiled header.
For instance, have one header containing all std includes like vecto
-
- Windows progamming question for the experts
by Howler72
- 5 Replies
- Last post
by Simple Samples
- Hello All,
I am new to microsoft programming and had a question. I am attempting to write a small Windows 32 console application that will create a directory on the file system. I know that I need to use the windows.h include library. However whenever I compile my app I get the following error: Error 1 fatal error C1083: Cannot open include file: 'window': No such file or directory . I am
-
- Find a especific String inside a txt file
by JGLP
- 9 Replies
- Last post
by JGLP
- Hi I need to search a txt file and find a especific string, and then i need to return the rest of the line. For example , a have a text file like this: [example.txt] abc={a,b,c} def={d,e,f} ghi={g,h,i} [/example.txt] And now i need to search for "def", and i need to get in return the "{d,e,f}" Anyone know how can i do this and show a small example please thanks!
-
- to sort the data depending upon a column in excel sheet thro VC++(excel automation)
by Ajax24
- 4 Replies
- Last post
by Ben Anderson MSFT
- Hi, I'm doing automation of Excel 2003 using VC++, so how to sort the data depending upon particular column in excel sheet , i have 3 columns(A,B,C) in my excel sheet have to sort depending on 3rd column ie.. column C (the respective data in other columns should also get sorted depending on that sorted column) i not able to use the function range.sort / range.sortspecial i have tried like this
-
- Excel Automtation
by Alice S.C
- 4 Replies
- Last post
by Sahir Shah
- Hi,
How do i perform excel automation in VC++ I need to be able to export data to a Microsoft Excel spreadsheet.
Any pointers to web sites that contain this info for beginners, or sample code or anything would be greatly appreciated.
Thanks.
-
- Switching Between Forms
by tosif
- 2 Replies
- Last post
by Ðãv? S. Â??????
- Hi I am new to Windows Forms pro gramming.I am using VisualStudio 2005. I am facing a problem in switching between two forms. I have two forms form1 and form2. And i want that on clicking a button on form1 form2 should show up. So i make an object of form2 and on button click event i do f2.show(), where f2 is an object of form2. But i am getting an error saying that f2 cannot access private member
-
- How to disable validations on click of cancel button?
by ketu0001
- 0 Replies
- Last post
by ketu0001
-
- Remote management issue
by r&#38;&#35;228
- 3 Replies
- Last post
by räven
- Hi! I've been working on a small remote management project. The purpose is to start a commandline render process on remote system from a "server". I've managed to connect to the clients, and I've also managed to start processes as for example "mspaint.exe" and "calc.exe". When trying to start the render process it seems to work, but after a while the process terminat
-
- what is supported by GDI
by Tran Ngoc
- 6 Replies
- Last post
by Tran Ngoc
- I want to write a project that has some function likes WordArt of Microsoft Words. it can fit the text to any pattern I want to use GDI to deverlop my project. so, could you tell me, what is supported by GUI (not use GUI plush) . thanks & regards!!!
-
- finding open files
by Kumar Puran
- 5 Replies
- Last post
by einaros
- Hi,
I want to find out all the open files which is in a particular drive (Eg:- F: Drive) of my system.
After finding all these files, i want to close all these files from my Application.
(Eg:- If F:\test.txt is open, i want to close the notepad used to open this test.txt file)
Is it possible using SDK/API/VC++ 6 If yes, please help me out.
Thanks
Kumar
-
- WinAPI Books
by rutski89
- 1 Replies
- Last post
by SvenC
- I'm looking for books on WinAPI. I've found one already and it looks great ( http://tinyurl.com/ypl7o6 ). The only problem is that it covers everything except for the GUI bits of WinAPI. Does anyone out there know a good book on the GUI bits
P.S. If you know any other good books on the non-GUI bits then please feel free to mention those as well.
-
- createremotethread
by cadouthat
- 14 Replies
- Last post
by cadouthat
- ive been messin around with threads and processes and stuff lately (i was just curious) and i found a function called createremotethread(), it is supposed to make a new thread in another process, but even when i set everything up right, the process i create the thread in "has an error and needed to close"... i checked the exit code and it had to do with access rights - does this mean tha
-
- Press any key to continue
by imanish11111
- 4 Replies
- Last post
by imanish11111
- I am using a windows 2000 OS . Every time i run a console application in VC++ IDE using ctrl+5 i get this message "Press any key to continue" Is it possible to remove this message. Or put any other message like my name or somethign else Plz help
-
- OnClosing function
by Anton574418
- 1 Replies
- Last post
by Viorel.
- Hi, I can't figure out what is wrong in my application. I try to display a messagebox when the user clicks the [X] icon. I tried so many things and searched for help so many places
My code looks like this:
In:
Code Snippet
void InitializeComponent( void ) {...}
I have:
Code Snippet
//
//Form2
//
this ->AutoScaleDim
-
- _MIDL_user_free@4
by Xorgnem
- 3 Replies
- Last post
by Anders Dalvander
- Hi,
I don't manage to find which library is missing to my project, can you help me please
The 2 errors I have are :
error LNK2001: unresolved external symbol _MIDL_user_free@4
error LNK2001: unresolved external symbol _MIDL_user_allocate@4
My project is an RPC application, for the moment the interface just contains messageBoxA function to display a t