-
- Read VGA Palette
by nice_group
- 5 Replies
- Last post
by AZEH
- Hi
I am trying to read the VGA palette color table using the following code in c:
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include <ctype.h>
#include <stdio.h>
#include <dos.h>
#ifdef __cplusplus
extern "C" {
#endif
//#include <iostream>
-
- Is there a recommended standard name for a C++/CLI member function to free resources?
by KevinHall
- 6 Replies
- Last post
by djdowd
- I have just been learning about finalizers in C++/CLI and saw quite a bit of sample code that duplicated the same resource-freeing code in both the destructor and finalizer. It seems obvious to me that I should put the resource-freeing code in a single place -- another private member function (see sample code at the end of this message).
So I have to questions:
Am I doing the correct thin
-
- erro c2059 while migrant project from vc6.0 to vc2003
by Jerry.bao
- 1 Replies
- Last post
by Simple Samples
- When I migrant the project from vc6.0 to vc2003 and rebuild it, there's always a 'C2059 newline' erro.
One of the source file is as follows:
/////////////////////////////////////////////////////////////////////////////// // Imports
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename ( "EOF", "adoEOF" ) #import "c:\progr
-
- Porting a project from C to Unmanaged and Managed C++
by aemami
- 1 Replies
- Last post
by crescens2k
- I hope someone is in the same situation as me - at least to share in my misery.
At our company, we have an existing codebase that consists of about 10 projects. All of the projects are a mix of C and unmanaged C++. We are using VS2005. The projects are not set up to have any /CLR support.
What I want to do is, convert all the .C files to .CPP. Once all the files are unmanaged C++, th
-
- Calling C++ dll from C#
by ssli2005
- 9 Replies
- Last post
by keerti_maverick
- I am trying to use a C++ dll in my C# application but unsuccessul. Here is what I have done:
1. The C++ code was developed using open BSD.
2. I made a C++ CLR dll using visual studio 2005 - "tc.dll"
3. In my C# application, I add the "tc.dll" as a reference from the solution explorer
4. I tried to instantiate the class of tc.dll using
myClass mc = new myClass();
-
- SendKeys in C++
by Fromethius92
- 2 Replies
- Last post
by Bite Qiu - MSFT
- Hello everyone, Is there an equivalent to SendKeys.Send in C++ I have looked into keybd_event and SendInput, but to my knowledge you can only send one key at a time with those functions. Thanks for any help.
Edit: I'm not using the .Net Framework so I can't use any of that stuff.
-
- Closed Captioning on Amcap
by Geek01
- 3 Replies
- Last post
by Peter Ritchie
- Hi all,
I am not sure whether this is the right place to post this query, but here goes..
Can anyone help me to get Closed Captioning to working on Amcap.
Wheever I use the "CC" option in Amcap, it throws an error saying "Cannot render closed captioning". Am I missing some filters that amcap is not able to enumerate
Any help would be appreciated.
Thnx in adv,
Geek
-
- Webbrowser control's BeforeNavigate2 event question
by kareshi
- 1 Replies
- Last post
by Simple Samples
- Hi all
Just want to ask how to retrieve the string( ) value of the TargetFrameName parameter in webbrowser control's BeforeNavigate2 event:
void CMyClass::BeforeNavigate2Explorertestnews(LPDISPATCH pDisp, VARIANT* URL, VARIANT* Flags, VARIANT* Target
-
- Maximizing compatibility of VC++ 2k5 projects
by NumberFour&#33;
- 2 Replies
- Last post
by CJPO
- Hello ALL,
I've got following question: how can I setup up the C++ compiler in VS2005 to compile applications with compatibility across win NT family... all applications I build can run only on XP SP2, failing to run under Win 2k and XP without SP2 (throws errors like "Invalid Win32 application, please reinstall"). I actually need to run my applications on Win NT family or at least on
-
- Finding in network service "File and Printer Sharing for Microsoft network " is installed
by Vinod Seshadri
- 1 Replies
- Last post
by Ayman Shoukry - MSFT
- Is there a way pogramatically,that I can determine if the network service "File and Printer Sharing "is enabled in a system
-
- Still having problems with printing out INT64 integers
by James2007
- 6 Replies
- Last post
by James2007
- Still having problems with printing out INT64 integers
I am still having problems with this code. This prints out a number, but it's not exactly what I want. I need to print out an INT64 number that is in sync all the way through. For example:
The hex: FF D8 FF E1 1E 63 45 78 is the first line of the file test.jpg. I would like to display its integer (unsigned) value: 1843576641698367
-
- [C++/CLI] STL/CLR's Vector Problem.
by Kansuu
- 4 Replies
- Last post
by Kansuu
- Hello, sorry if this isn't the good forum to post my question to. I have a STL/CLR vector called "vecteurMot":
Code Snippet
private: cliext::vector<mot^>^ vecteurMot; then I do a pusback to test it :
Code Snippet
vecteurMot->push_back(gcnew mot("Mot FR : ", "Mot JP : ", "Ceci n'est qu'un exemple" )); Everything compil
-
- Wow i am suprised i cant find this....
by Tiberius147
- 5 Replies
- Last post
by Simple Samples
- I searched google i searched here and i searched mIrc and no one seems to know how to do this, they tell me to use a difrent compiler but i love microsoft and could not do that. I am sure you guys probably covered it some where but i can't find it so here goes. I use visual studio 2005 standard edition. I recently finished learning the core language of c++ and am moving on to implement that knowle
-
- Win 32 timer - OnTimer not called
by IdleBrain
- 5 Replies
- Last post
by Pintu Shukla
- I am a newbie to VC++ and I am trying to use a win32 timer (with MFC and VS 2005) . The problem is that the OnTimer function is never called. Here is part of the code that I've been trying to implement:
void CxxDlg: nBnClickedStart() { //Create a Timer utmrTx = SetTimer(1, 1000, NULL);
} void CxxDlg: nBnClickedStop() { // To Stop the timer KillTimer(utmrTx);
} void CxxDlg: nTi
-
- Win32 Application Wizard Problem in VS2005 under Vista
by Farhad K
- 5 Replies
- Last post
by Farhad K
- When I try to create a new C++ static library project, the Application Wizard's welcome screen that has both 'overview' and 'application settings' is completely disfunctional. Hyperlinks, 'Finish' and 'Cancel' buttons do nothing. Also some text is missing from the dialog (the current application settings bullets are blank).
The only way out is to close the dialog using the red cross on th
-
- TreeView Control HitTest doesn't work
by Lolka
- 2 Replies
- Last post
by Lolka
- Hi all.
i have treeview control on my dialog. TreeView with cechkboxes. I need to find, on wich item user click.
In NM_CLICK i try to found item through HitTest method:
1) Getting current Cursror coords:
GetCursorPos(&pt);
2) Convert to Client coords:
ScreenToClient(&pt);
3) And trying to recieve HTREEITEM through HitTest:
HTREEITEM hItem = pTree->HitTest(pt,&a
-
- Debuggin
by patti_nyl
- 5 Replies
- Last post
by patti_nyl
- Hi, when I am trying to debug, now and then Visual Studio opens a Assembler file to debug, I don't want that, eaven when it is my own code it opens a dissambly file.
What is wrong
thanks in advance, Patrik
-
- How do i view external source dependancies in 2005 .Net?
by Swiftblade
- 5 Replies
- Last post
by Simple Samples
- I am porting legacy code from Visual Studio C++ version 6 to 2005 .Net and i would like to know how do I view the external source dependancies in the solution explorer as you can in VS 6 These are usually header files that are declared in a C++ module but not part of the header folder of the project. I've looked all over the IDE / help to no avail, can anyone help me
Thanks in advance!
-
- HeapReAlloc user break point
by Shakje
- 5 Replies
- Last post
by Shakje
- I'm looking for a problem with some particular code that's written in C and have been looking around the line that calls the "user break point" all of today just about. The HeapAlloc function is working fine and I've inspected the memory around pObjects (especially near the end) to make sure it's not an overrun and that everything is alloced cleanly.
nRecordMax is at 2000 here, bu
-
- windows service
by indurajagopalan
- 2 Replies
- Last post
by Bruno van Dooren
- hi
im programing for a windows service.
if i get an error in d program, how do i display it.
that is while running the service, if i get an error, how do i display it
-
- How to export C++ templates to CLR library to be used in C#?
by mastermemorex
- 3 Replies
- Last post
by Bruno van Dooren
- Hi!
I am trying to export some libraries that are written in C++ to a DLL with the /clr option so it can be used in C#. I have some troubles to fully understand the how to export templates and generics to a CLR library. I have been searching the web for days for a good answer and I only find blogs that explain the goods and bads between generics and templates. And that is not the answer I
-
- Passing template function to _beginthreadex
by dhelmer
- 4 Replies
- Last post
by einaros
- I'm creating a new thread but I'd like to supply a templated function to beginthreadex.
My thread function prototype is:
template<typename T> unsigned int _stdcall GetArrayThread(void* pvStruct)
However, when a supply: "GetArrayThread<IClass1>" as the 3rd parameter to _beginthreadex, the compiler gives the following error:
error C2664: '_beginthreadex' :
-
- Interface dereference operator ( * ) implementation not creating LValue
by eldiener
- 14 Replies
- Last post
by Brian Kramer
- I have an interface with static operators like below: public interface class IA { static operator int (IA ^ parm); // convert to int static operator IA ^ (int i); // convert from int static IA ^ operator * (IA ^ parm); // dereference returning self, gives error ( see below ) // some instance functions which are used by the first two static operators IA ^ ReturnSelf(); // called by thi
-
- data type conversion in VC++ 8.0
by Rajeshacme
- 2 Replies
- Last post
by Rajeshacme
- When i execute the below test program #include<stdio.h> void main() { double l_double_value; l_double_value = (double) (0xffffffff) ; printf("%lx\n", (long) l_double_value); } I get the below output. in VC++ 8.0. 80000000. But in VC++ 6.0 i get fffff... Can you pl help me to know about this.. Regards rajesh.
-
- Frustrating Error - error C2259: cannot instantiate abstract class
by PootyTanG
- 2 Replies
- Last post
by PootyTanG
- The Error error C2259: 'SphereEntity' : cannot instantiate abstract class 1> due to following members: 1> 'void Entity::render(G3D::RenderDevice *) const' : is abstract 1> : see declaration of 'Entity::render' 1> 'G3D::RealTime Entity::getIntersectionTime(const G3D::Ray &) const' : is abstract 1> : see declaration of 'Entity::getIntersectionTime' SphereEntity is a declared as a