borland-c++

Use #pragma pack with #define on Borland C++

≡放荡痞女 提交于 2020-01-23 01:02:45
问题 I am trying to pack some structs with Borland C++Builder (XE6) (in the future: bcc). I am using a library which uses the following construct to create structs: #ifdef _MSC_VER #define PACKED_BEGIN __pragma(pack(push, 1)) #define PACKED #define PACKED_END __pragma(pack(pop)) #elif defined(__GNUC__) #define PACKED_BEGIN #define PACKED __attribute__((__packed__)) #define PACKED_END #endif PACKED_BEGIN struct PACKED { short someSampleShort; char sampleByte; int sampleInteger; } structType_t;

Blurry print with legacy borland software

一世执手 提交于 2019-12-25 03:03:17
问题 Here is my problem : I have to port an old sofware made for windows NT 4 (i thought) with an old Borland on Windows 7 or newer. The program is running well ( no problem with dependency walker, App Verifier shows a Bad DEVMODE buffer but this error exists on XP and it works well). The programm have to print a label with some information, this works good on windows XP but on seven numbers are blurry, i don't know why and i don't how to troubleshoot that. My printer works because i can print a

How to get JoyStick Z rotation messages in C++

瘦欲@ 提交于 2019-12-24 14:58:12
问题 I'm having C++ code that properly intercepts a joysticks x and y positions for my Saitek Cyborg joystick. This joystick also have the ability to twist around the handle axis, and I'm trying to get the messages for this motion. For the x and y, the message ID's are MM_JOY1MOVE and MM_JOY2MOVE, and they allow me to capture the x and y position for the stick. For the z-axis, there are MM_JOY1ZMOVE and MM_JOY2ZMOVE, but none of these do capture the twist motion. Looking in mmsystem.h, the

Using Frame Buffer Objects (FBO) in Borland C++ Builder 6

旧时模样 提交于 2019-12-24 03:03:27
问题 I have an "access violation" on the Frame Buffer Object (FBO)'s command glGenFramebuffersEXT : void TGLForm::DrawScene() { wglMakeCurrent(ghDC, ghRC); glEnable(GL_TEXTURE_2D); GLuint framebuffer, texturefbo; GLenum status; glGenFramebuffersEXT(1, &framebuffer); // access violation here Founding a help thread concerning the FBOs, I checked that the glext.h initialization were okay and repeated amidst the preprocessor lines this way : #include "glext.h" #include "wglext.h" extern

Explicitly Linking to Classes in DLL's

一笑奈何 提交于 2019-12-13 06:31:47
问题 I have a class that is currently in a .lib file: class __declspec(dllexport) ReportData { public: list<FileData *> ReportFileData; list<SupressionData *> ReportSupressionData; static char *ClientName; static char *DataRecieved; std::string GenFileConfTemplate(); ~ReportData() { ReportFileData.clear(); ReportSupressionData.clear(); } }; I can add this lib file to my project and create instances of this class no problem. My question is, how can i move this to a DLL and dynamically load it, and

How can I compile code that uses graphics.h in DOSBOX?

妖精的绣舞 提交于 2019-12-13 02:26:41
问题 i write a code and in this code i use graphics.h ,in borland c++ or visual I can't open and run it, now i want run this code ,and i have DOSBOX 0.72 , how open this code with DOSBOX? my windows is 7 32bit 回答1: I see you're still trying to write and compile code that uses legacy and unsupported libraries... At least you've discovered now that you aren't going to be able to do this natively in Windows 7, and have installed a DOS emulator. Now, you'll need to find and download a compiler that

Migration from borland OWL to microsoft MFC

点点圈 提交于 2019-12-11 13:54:32
问题 I have an application written in dependence of OWL library about every dialog is inherited from TDialog class , I want to move to the recent MFC I want to depend on MFC CDialog or any of its classes instead of OWL. Is there any guide lines to simplify the task, shorten the time and avoid the famous mistakes in such a case. Also what is the message mapping difference between owl and mfc? 来源: https://stackoverflow.com/questions/15930819/migration-from-borland-owl-to-microsoft-mfc

Creating a button with which a running process can be killed or terminated

∥☆過路亽.° 提交于 2019-12-11 07:58:52
问题 I would like to add a button to my form with which a running process (loop which runs several thousand times) can be terminated if the user wishes to stop the process for any reason or load another file. The program has a part which performs an interpolation for multiple cases and creates and saves a text file for each case. Once the process is launched (this is done by pressing a button after the necessary files have been loaded), it starts running and cannot be stopped until it is completed

Accessing ring 0 mode from user applications ( and why Borland allows this )

白昼怎懂夜的黑 提交于 2019-12-10 10:05:16
问题 As the semester's deadlines approach, I decided to start working on a project in Operating Systems course at my college. The problem with the project assignment is that it requires students to develop a user application ( exe ) that will execute as a simple kernel ( basic process and thread management ). First thing that popped to my mind was : How the hell am I supposed to execute privileged code in user application? After consulting with other students ( who did the project on time ), I