Hello.
I have a C++ function that ouputs a set of data text files. I pass the directory path of where I want the files to be stored to the function through a BSTR variable. I then need the function to take this path string and append it to the front of the name of each text file. For...
Hello.
Is there an operator or function in C++ that allows you to divide two numbers and return just the integer part (ie. the number on the left side of the decimal point)? The opposite of the modulus (%) operator!
Examples:
7 / 2 would return the integer 3
14 / 3 would return the integer 4...
Hello.
I am trying to draw points in a Picture control overtop of an image. I initially load an image into an Image control that I've placed inside the Picture boundaries. Then I stretch the image to the size of the Picture control. Then I run a loop that should draw a set of points every...
I'm calling a C++ DLL from another application written in Visual Basic. When declaring a function in the DLL, what's the difference between using __declspec as opposed to _stdcall? For example:
void __declspec(dllexport) CALLBACK MyFunction()
//or:
void _stdcall MyFunction()
Is one...
I am writing a C++ DLL that runs a very long While loop. How can I allow the user to break out of this loop by pressing Esc on the keyboard?
Thanks alot!
Nikolai.
Hello.
I am having problems scaling a Visual Basic Picture control from a C++ DLL. Here is the code that I am using:
In Visual Basic, I call the scaling routine in the C++ DLL using the following code:
Call ScalePicture(Picture1.hWnd, Picture1.hDC)
where:
Declare Sub ScalePicture Lib "C:\...
Hello.
I have a Visual Basic 6 program that calls a C++ DLL that I am in the process of writing. The DLL does some calculations and should draw some points in a Picture form contained in the VB exe. How can I scale the Picture form to a custom scale from the C++ DLL, so that the points are...
Hello. I've run into a strange problem that I can't figure out. It involves a while loop that sometimes loops one too
many times for some unknown reason. A simplified version of my code is included below:
void MyFunction(float StartTime, float TimeStep, float Interval)
{
do
{
StartTime...
I have a BSTR type variable (passed in from a Visual Basic application) that I'm trying to convert into a char* so that I can use it in an iostream. For some reason, the conversion function that I'm using only converts every SECOND character of the BSTR variable to the char variable. For...
I have a C++ program that does a long set of calculations for up to 45 minutes. At periodic intervals during the calculations, it outputs some values and comments.
Is it possible to turn this program into a Dynamic Link Library (DLL) and then run it from a Visual Basic interface. I was...
I have a simple SDI program that prints text onto the window using a CPaintDC device context. However, whenever I drag another window overtop, minimize and maximize, or scroll the window, the text that has been covered up gets erased. How do I prevent this from happening?
Thanks for the help...
I'm having problems visualizing in my mind the physical relationship between logical coordinates and device coordinates when using the mapping modes MM_ANISOTROPIC / MM_ISOTROPIC and the CDC:SetWindowExt() and SetViewportExt() member functions to customize screen coordinates.
I am trying to...
Hello.
In Visual C++, Is there a simple way of implementing scrollbars into a CWnd class (in an SDI application) without using CScrollView?
My program prints a whole column of data on a blank window, and I need to be able to scroll down to the bottom of the list.
Thanks for any tips,
Nikolai.
How do I convert an integer variable to a char that can be displayed onto the screen? For example, this is the code I'm using, but it won't write out the value of the integer:
int anynum = 0;
char mymessage[30]={0};
strcpy(mymessage,"My number is: ")...
In Visual C++, if I create a CPaintDC object in a global function (any function other than the OnPaint message-handler), as follows:
void myfunction(CWnd* pWnd)
{
CPaintDC dc(CWnd* pWnd);
CPen newpen;
CPen* oldpen;
newpen.CreatePen(PS_SOLID,1,RGB(0,0,0))...
I’m having problems trying to draw simple graphics (using the CDC::Ellipse function) in my SDI application. My program consists of the following classes :
class CMainFrame : public CframeWnd
class CChildView : public CWnd
class CVDANApp : public CWinApp
I also have a menu resource. I need...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.