Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by nhungr

  1. nhungr

    Text file output

    Ok, never mind. I got it. Rather silly mistake. ie. char filename1[MAXCHARS]; strcpy(filename1,DirPath); strcat(filename1,"\\Textfile1.txt");
  2. nhungr

    Text file output

    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...
  3. nhungr

    Division operator that returns an integer

    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...
  4. nhungr

    Drawing points in a Picture control

    That's it, you solved it!!!! Thank you very much. I knew it had to be some simple one-liner. I want to star your post, but my browser doesn't respond to the "Thank you" link for some reason. So thanks anyway...
  5. nhungr

    Drawing points in a Picture control

    Here's a very simplified version of my drawing code. The Picture's Autoredraw is set to False. Note that the call to TimeStepLoop is actually a call to a function in a DLL library that I created in C++. This function loops through some calculations and returns the set of X and Y coordinates...
  6. nhungr

    Drawing points in a Picture control

    I've already tried that! And there's no change???
  7. nhungr

    Drawing points in a Picture control

    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...
  8. nhungr

    __declspec VERSUS _stdcall

    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...
  9. nhungr

    How to prematurely escape a While Loop

    Thanks so much for the help. I figured it out. I just modified your KbTest function with the following code: bool KeyboardTest() { if (GetAsyncKeyState(VK_ESCAPE)!=0) { return true; } return false; } and it works... Thanks again, Nikolai.
  10. nhungr

    How to prematurely escape a While Loop

    Thanks alot for the tips... ArkM: I tried implanting a version of your code into mine, but for some reason there is no response to any key presses. _kbhit() always returns 0 regardless of what key I press!?! The loop I am trying to interrupt is in a DLL that I call from a separate executable...
  11. nhungr

    How to prematurely escape a While Loop

    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.
  12. nhungr

    Scaling using SetWindowExtEx

    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:\...
  13. nhungr

    Rescaling a Picture from a C++ DLL

    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...
  14. nhungr

    While loop malfunction

    Ahah! Thank you both for clarifying the problem. Makes sense now. This is my modified code now, which works: void MyFunction(float StartTime, float TimeStep, float Interval) { do { StartTime = MyLoop(StartTime,TimeStep,Interval); } while(StartTime<5); return } float...
  15. nhungr

    While loop malfunction

    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...

Part and Inventory Search

Back
Top