|
Can anybody tell me..How to insert table in richtextbox control as in MS word..I'll be helpful to u...PLease help me sir..
I'll be very thankful to u.
OK! Good Bye...Have a Nice Life..Bye. Sumit Kapoor
Never consider anything Impossible before trying to solve that..---Sumit Kapoor---
|
|
|
|
|
Do you want to create a table by programming or do you want to be able to copy and paste a table from other RTF applications?
Copy/Paste should work.
Since the Windows WordPad application can not create tables and this is a demo application which has been build using CRichEditView (a CRichEditCtrl wrapper) it seems to be not very easy to create tables by programming.
You may have to write the RTF code yourself to do this, but I don't know how to do it.
|
|
|
|
|
Hello
Ihave a programe store about 40,000 record in database,and make report from them .
but the programe work so slowly when I want to find last ID number.
I use ODBC to connect to database. to get the last ID I use m_strFileter and m_strSort properties & Requery MethodRequery .
wat can I do to get better performense ?
(please show me a way to use database )
tnX
Iman Ghasrfakhri
|
|
|
|
|
If your database is MS ACCESS you should use DAO instead of ODBC, that means CDaoDatabase and CDaoRecordset and not CDatabase and CRecordset. To my experience this is much more faster.
Hope this helps.
MS
|
|
|
|
|
The "last ID number" field must be indexed. The speed difference between ODBC and DAO, if any, is negligible.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
hi, i need help in recording and playback the sound. i want to learn how to use C/C++ to do this application.
the sound should come in from a microphone and playback to the speaker.
thx
|
|
|
|
|
Try using DirectX - DirectSound/DirectShow.
|
|
|
|
|
Where can i find the details for this directX-directsound/directshow?
is there any sample that i can refer to in learning or as an example?
any suggestion?
can u pls explain in brief what this directX can do? as i know this is for gaming purpose. but i dun know how true it was.
thx for the help!!!
|
|
|
|
|
Why My Programm is getting out when i try to place Rich Edit2.0 on my Dialog Panel??? Just when i get Rich Edit 2.0 out of my Dialog panel my programm works properly.
|
|
|
|
|
You need to call
AfxInitRichEdit();
I usually add it into the InitInstance function.
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
Can I control the Volume and Microphone of a USB Device from my application? Presently using MIXERCONTROL I am able to control both Volume and Microphone of the system from an application.
Is it possible to use this MIXERCONTROL it self or any other method?
|
|
|
|
|
Is there a simple way to hide the mouse on entering a window and show it on exiting it. I'm assuming there is a windows message that i need to handle, but I'm not sure which one.
[edit]ShowCursor does some of what I want, but I want the cursor to show in the menu-bar so I can click the minimize/maximize button[/edit]
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
You probably call ShowCursor in the main frame. Try to call it in the child window (or, generally, in the window, which occupy the client area of main window)
Robert-Antonio
"CRAY is the only computer, which runs an endless loop in just 4 hours"
|
|
|
|
|
CFile::GetLength() and CFile::Seek() return a UINT in VC6 and a ULONGLONG in VC7. Is there a predefined macro that can be used to declare a variable in my source that will differentiate between the two. Right now I am using the following macro, but my code would be more portable if I used a predefined one.
#if _MFC_VER < 0x0700
# define SIZE_TYPE UINT
#else
# define SIZE_TYPE ULONGLONG
#endif
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
|
Michael Dunn wrote:
You could also just use ULONGLONG everywhere. Assigning UINT to ULONGLONG is fine by the language rules, because it's a widening conversion.
Thanks Mike
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Im trying to run in debug mode an app that was converted by VS 2003
but in debug mode not compile, it say this error:
APP fatal error LNK1181: cannot open input file 'shlwapi.h'
i add the include path where this file exist, but i get the same error
In release build works fine.
|
|
|
|
|
When the compiler starts acting "strange" it sometimes helps to exit VStudio and delete the *.ncb file in the same directory as the project. This file is some type of cache of information and it can get "stranged".
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
|
hi
i am having a problem with an infinite loop
can someone check out the code and tell me
what is wrong with it...
[code]
int main()
{
int numberOfResponses; //number of responses for candidates
int accumulator = 0; //adds up total number of votes
do
{
char* stateName = new char[30]; //char pointer array for stateName
char* dateOfPrimary = new char [30]; //char pointer array for date of primary
cin.getline(stateName,30) ;
cin.getline(dateOfPrimary,30);
cin >> numberOfCandidates;
primaries NewPrimary(stateName,dateOfPrimary);
cout << NewPrimary <<endl;
delete="" []="" statename;=""
delete="" dateofprimary;=""
for="" (int="" i="0;" <="numberOfCandidates;" i++)=""
{=""
char="" nameandspent[50];="" char="" array="" for="" name="" and="" money="" spent=""
cin.getline(nameandspent,50);=""
if="" (i="" !="0)"
candidates="" newcandidate(nameandspent);=""
cout="" <<="" newcandidate="" endl;=""
}=""
results="" newresults;=""
int="" votes;=""
cin="">> votes;
accumulator = accumulator + votes;
NewResults.voteArray[i-1] = votes;
}
NewResults.totalNumberOfVotes = accumulator;
NewResults.percentage();
cout << NewResults << endl;
cin >> numberOfResponses;
for (int i = 0; i <= numberOfResponses; i++)
{
int c, i, v;
cin >> c;
cin >> i;
cin >> v;
election MyElection(c,i,v);
}
char blank[5];
cin.getline(blank,5);
cin.getline(blank,5);
}while(!cin.eof());
return 0;
}
[end code]
the INPUT is like this:
Iowa
January 19, 2004
6
Kerry 50000
Clark 20000
Dean 40000
Gephardt 20000
Lieberman 10000
Edwards 40000
1128
83
540
318
60
957
15
1 2 8
3 2 5
1 3 6
1 1 6
6 1 7
5 2 5
2 4 7
4 3 6
6 2 7
1 4 9
6 4 7
3 4 7
2 3 6
1 4 8
4 2 6
New Hampshire
January 27, 2004
5
Kerry 500000
Clark 200000
Dean 400000
Lieberman 100000
Edwards 50000
84229
27254
57788
18829
26416
25
1 2 8
3 2 7
1 3 6
1 1 7
3 1 7
5 1 7
2 4 6
5 3 6
4 1 4
1 4 9
3 4 8
1 2 7
2 1 7
3 2 8
4 2 6
5 2 8
2 2 6
3 3 7
1 2 8
2 3 7
3 2 7
4 4 6
5 4 7
2 2 6
3 3 6
ps....if i use just one set of data...my program works...but when i add another set of data....such as above (there are two) one for iowa and one for new hampshire...it keeps going on forever...help please
|
|
|
|
|
Which version of VC++ are you using. I'm assuming VC6.
After a quick glance, I think your problem is
for (int i = 0; i <= numberOfResponses; i++) <br />
{ <br />
int c, i, v; <br />
cin >> c; <br />
cin >> i; <br />
cin >> v; <br />
election MyElection(c,i,v); <br />
}
You are redeclaring the variable i and then setting it to a different value. I think this may be throwing off your loop.
VS.NET wouldn't let the code compile, but VS6 would.
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
When you use iostream and some read function fails, a failbit is set to the input stream. Any subsequent readings will simply return without doing something. Hence you will never pass the eof of the input stream.
Because you declare a cycle iterator inside the cycle (as Michael P. Butler wrote), this cycle probably doesn't repeat numberOfResponses -times. And the subsequent read operations probably read different types, that they expect, so the read operation fail.
The solution is:
* check whether cin.fail()
* if yes, restore the failbit by cin.clear()
Robert-Antonio
"Friends come and leave, but teddybears stay in forever."
|
|
|
|
|
Can u make a graphic interface which interacts with some buttons ? .. for eksample if u have a dialog with some balls and a button, and when u press the button the balls start moving .. what should i look for? .. i tryed working with SDL but that dosent work for MFC or does it?
|
|
|
|
|
The interaction of a GUI, in it's simplest form, is implemented by a series of WM_PAINT calls.
You can, for example, create two integer variables xPos and yPos that determine the position of a ball when it is drawn on-screen. Then, a click of a button sends these balls into a continous WM_PAINT loop, and during each iteration of the loop, the positional variables are altered, thus causing the ball to "move".
This approach, however, will result in your application looking pretty much frozen, as it will stop answering to other messages during the animation loop. I suggest you dwelve into concepts like Direct3D and OpenGL if you want to draw fast graphics without obscuring the messaging queue.
Unfortunately I cannot provide you with a code example..
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I'm not sure about SDL, but if you need a lot of control you can use DirectX. If all you need to do is use buttons and GUI components try RHW vertices and textured quads. It's a fair amount of work, but worth it once you've got it going. Some of the game programming sites www.gamedev.com and www.flipcode.com are good resources.
Integrating DirectX with MFC[^]
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|