|
I have dialog in MDI with a simple text box that i want to change and update the text when a button is clicked. I I can't remember how to update the text box. I have the following code for the button press.
void CNeuralNetTwoView::OnBnClickedButton1()<br />
{<br />
<br />
UpdateData(true);<br />
ScottsTextBox = "JERNIE CORPORATIONS";<br />
<br />
ScottsTestBoxCtrl.UpdateData(true);<br />
<br />
UpdateData(true);
<br />
UpdateData(FALSE);
<br />
}<br />
Scott Dolan
Jernie Corporation
Engineering & Manufacturing
Software, Hardware, & Enclosures
|
|
|
|
|
Assuming ScottsTextBox is a CString associated with the control (using DDX)...
void CNeuralNetTwoView::OnBnClickedButton1()
{
ScottsTextBox = "JERNIE CORPORATIONS";
UpdateData(FALSE); // Transfer data from variables to controls
}
or maybe ...
ScottsTestBoxCtrl.SetWindowText("JERNIE CORPORATIONS");
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
i want to start a video in a powerpoint slide how can i do?
i tried sending mouse click into the video, however it is not working
mouse_event, sendinput, sendmessage, peekmessage... all of these functions don't work to send click into video
Please write what ever you know to solve my problem
|
|
|
|
|
You've posted this to every board I have visited. Please don't. If you're using VB, what will you do with an answer in C+ ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
because it is not important for me, i can change codes into my system
i want to get any idea or solution who knows
|
|
|
|
|
It's important to us that you don't spam the entire site.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: You've posted this to every board I have visited.
Even the PowerPoint board?
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
I cant get the program to display it appears then dispears very quickly.
someone please help
heres the code:
//Please someone help
#include <iostream>
#include <string>
using namespace std;
class Critter
{
//make following global functions friends of the Critter class
friend void Peek(const Critter& aCritter);
friend ostream& operator<<(ostream& os, const Critter& aCritter);
public:
Critter(const string& name = "");
private:
string m_Name;
};
Critter::Critter(const string& name):
m_Name(name)
{}
void Peek(const Critter& aCritter);
ostream& operator<<(ostream& os, const Critter& aCritter);
int main()
{
Critter crit("Poochie");
cout << "Calling Peek() to access crit's private data member, m_Name: \n";
Peek(crit);
cout << "\nSending crit object to cout with the << operator:\n";
cout << crit;
return 0;
}
//global friend function which can access all of a Critter object's members
void Peek(const Critter& aCritter)
{
cout << aCritter.m_Name << endl;
}
//global friend function which can access all of Critter object's members
//overloads the << operator so you can send a Critter object to cout
ostream& operator<<(ostream& os, const Critter& aCritter)
{
os << "Critter Object - ";
os << "m_Name: " << aCritter.m_Name;
return os;
}
|
|
|
|
|
Run it from a command prompt (instead of double-clicking it frm within Windows Explorer).
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How would i do that can u show an example??? Please.
|
|
|
|
|
Spartan16 wrote: How would i do that...
It's hard to fathom that you might actually be serious.
Click Start
Click Run
Type cmd
Click OK
Now change to the folder where your program resides and run it from there.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
lol of course i know how to run cmd. but in cmd what do i type to run the program thats all i am asking.
|
|
|
|
|
Spartan16 wrote: ...in cmd what do i type to run the program...
Whatever the name of your program is.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thank u. Sorry i sound so uneducated
|
|
|
|
|
Hi,
I am looking for a fastest way to scale up/down a binary image. I may end up scaling images only in X direction. Is there any easiest/fastest way to do this in VC++?? For now my images are stored in an array (not a two-dimensional array, but just a single strip array(one row after another from the image). Since I am dealing with binary images, I hope I dont need to use interpolation.
The data that I have is the original dimensions of the image and the final dimensions of the image. For example, my original image is 9x9 and my new dimensions are 15x9.
thanks,
-Pavan.
|
|
|
|
|
if you're not limiting your output size to certain whole multiples of the input size, you're going to have to do some interpolation (if you want reasonable-looking output).
but, bi-linear interpolation is pretty easy.
|
|
|
|
|
Any articles on bi-linear interpolation that is easy to understand...
-Pavan
|
|
|
|
|
in 1-D, linear interpolation looks like this:
factor1 = inputPoints / outputPoints
for (current=0 to outputPoints-1)
{
inputPixelLocation = current * factor1
input1 = pixel[floor(inputPixelLocation)]
input2 = pixel[floor(inputPixelLocation) + 1]
factor2 = fractional_part_of(inputPixelLocation)
output = input1 * factor2 + input2 * (1.0 - factor2)
}
in 2D, you pick four pixels: two from the current pixel row (as above) and another two from the row immediately beneath. and then you combine all four with the a two-factor weighted average.
factor1X = inputPointsX / outputPointsX
factor1Y = inputPointsY / outputPointsY
for (currentY=0 to outputPointsY-1)
{
inputPixelLocationY = currentY * factor1Y
for (currentX=0 to outputPointsX-1)
{
inputPixelLocationX = currentX * factor1X
floorX = floor(inputPixelLocationX)
floorY = floor(inputPixelLocationY)
input1 = pixel[floorX ][floorY]
input2 = pixel[floorX + 1][floorY]
input3 = pixel[floorX][floorY + 1]
input4 = pixel[floorX + 1][floorY + 1]
factor2X = fractional_part_of(inputPixelLocationX)
factor2Y = fractional_part_of(inputPixelLocationY)
factor2X_inverse = 1.0 - factor2X
factor2Y_inverse = 1.0 - factor2Y
outval = input1 * factor2X * factor2Y +
input2 * factor2X_inverse * factor2Y +
input3 * factor2X * factor2Y_inverse +
input4 * factor2X_inverse * factor2Y_inverse
output[currentX][currentY] = outval
}
}
that's a basic bi-lin algorithm. there's a lot of room there for optimization in general, and even more for monochrome data.
/div>
|
|
|
|
|
Thanks for the info... will try to implement this as easy as I can..
-Pavan.
|
|
|
|
|
I added a tab control to my project, but seeing which tab is selected is not really obvious. I would like to highlight the selected tab. How do I go about doing this?
Thanks,
Brandy
|
|
|
|
|
Here[^] you go
There are two things that one must get used to or one will find life unendurable: the damages of time and injustices of men
Fold with us! ¤ flickr
|
|
|
|
|
As part of a large application, I need to detect which devices are available on a SCSI bus, some are hard disks, and one or more DTF tape drives.
This example works for finding the hard disks:
hDevice = CreateFile(TEXT("\\\\.\\PhysicalDrive#"), 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, NULL);
but when I use "\\\\.\\Tape#" it does not find the tape drive (SONY GY-8240)
Am I missing something?
Note: # is set in a loop from 0 to 14.
Thanks.
|
|
|
|
|
Hi,
I have created an Workers Thread in my application.
It Enumerates the IP address in the Network.
If i close the Application after the thread is returned.There is no prob;
But if i close the Appliction before the enumerating all the IP Address(B4 Thread function's return is reached). I get Runtime error.
Could i know how to Terminate the Thread form the View file's OnClose();
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
Have a look at this excellent article[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi,
I got that article.I will check out that.
I think thats is enough for Solving my problem.....
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|