|
the problem was solved.
reason was that MFC DEBUG_NEW Does Not Work with GDI+
|
|
|
|
|
I have 2 views, both of them displaying some data, which is not comming from DOCUMENT class.
How do I display the content of both the VIEW's in Print-Preview...
Please Help
Rahul
|
|
|
|
|
void CConnect::OnGroupTrend()
{
CConfigurator oConfig("Configurator");
CGraphviewConfig oGrphconf;
CGrpTrnConf oGrpConfig;
oConfig.AddPage(&oGrphconf);
oConfig.AddPage(&oGrpConfig);
oConfig.DoModal();
}
This is my PropertySheet function.The two dialogs are derived from PropertyPage.(i.e) i replaced CDialog in the code in to CPropertyPage.
Configurator class is derived from CPropertySheet.
Assertion error occurs in DoModal() line.I dont why yhe error occurs.
|
|
|
|
|
This assert is a hint that there is something frong in your construction code.
Check the replaced CDialog code, maybe there havent you changed all.
Try it with 1 page and step in the code, the error details are important what the MS-Code didnt like.
Greeting from Germany
|
|
|
|
|
What line of what file asserts?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
I've got a file containing many lines made up by a string followed by numbers like this:
string1 double1 double2 double3
string2 double4 double5 double6
...
I need to store the first column in a string vector,
something like CString[numberofstrings]
How can i do that ?
Thanx,
Desmo16.
|
|
|
|
|
|
I'm not going to write the code
do the following. (you should do the required error and out of boundary checking of array
1. Read fist line to a buffer.
2. use strtok function to get the tokens (in this case seperated by space)
3. add to the vector.
4. Do above till the EOF
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
The is a CStringArray class in the MFC.
Read The F. Msdn.
Greeting from Germany
|
|
|
|
|
Try something like this (not tested):
-------------------------------------
#include <fstream>
#include <vector>
#include <string>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <iterator>
int main(int argc, char *argv[])
{
using namespace std;
// Open the file.
ifstream ifs("C:\\a.txt");
if (!ifs)
{
return 1;
}
// A collection of strings.
typedef vector<string> strings_t;
strings_t StringColl;
// Read in the file line at a time.
string line;
while (getline(ifs, line))
{
// Get the first string in the line.
string FirstString;
istringstream iss(line);
if ( !(iss>>FirstString) )
{
break;
}
// Add it to the collection.
StringColl.push_back(FirstString);
}
// Output the strings in the collection to the console.
copy(StringColl.begin(), StringColl.end(), ostream_iterator<string>(cout, "\n"));
return 0;
}
Steve
|
|
|
|
|
Desmo16 wrote: I've got a file containing many lines made up by a string followed by numbers like this:
vector<CString> vecString;
let szTmp of type Char* contain your First line of File...
then this small code will read all the string in the Vector string;
TCHAR *sztoken=strtok(szTmp," ");
int iCount=0;
while(sztoken!=NULL)
{
vecString.push_back(sztoken);
sztoken = strtok( NULL, " ");
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I'll never understand why people insist on still using old CRT functions such as strcmp and strtok and worst of all printf . Naturally there are exceptions to every rule, but in general the world if better of without these APIs.
Steve
|
|
|
|
|
Stephen Hewitt wrote: 'll never understand why people insist on still using old CRT functions such as strcmp and strtok
People Don't want to forget there old c/c++ skills that why , anyway there is also a function called CString ::Tokenize().. which is replacing StrTok api quietly!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I don't think people should forget; just enhance.
Steve
|
|
|
|
|
mine is an SDI application n I have got two views .one is displayed on print preview n i need to print the other view at the end in a new page of the same print preview
RVS
|
|
|
|
|
Hi All,
once I was assigned in a project which is concerned with some streaming to the clients connected. anyway I have implemented a single server - multi client system which can be used for stream video from the server to the number of clients connected. Initially the clients were showing the video very slowly (even if there's only one client connected) in an 100 mbps network. the frames are send in compressed jpg format (around 70%). Now I have came out from that project. now some other person working on that for the performance improvement of server client system. ( when I was there, this feature was in not included in the first phase so I escaped ) that story over.
When I worked with remote deskop of Windows XP, I really get impressed because of the peformance hit I had in my system. anybody can give some inputs to make sure that, the network transfer is optimum and how to improves the streaming across?
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
I think the color depths is scaled down to 256 colors to minimize data. (->Citrix)
Another possible optimization can be to only transport parts of the client which had changed recently. It leeds to compression schemes as mpeg.
I hope it helps.
Greeting from Germany
|
|
|
|
|
thanks for your valuable suggestion.
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
How do I send keys to application?
I tried like
::SendMessage(hwnd,WM_CHAR,(WPARM)VK_KEY,NULL)
But it's not right I guess.. please help me.
NULL
|
|
|
|
|
|
sendInput doesn't take Hwnd as a param so is it not possible to specify the window? and hence you said "The window must have focus" ?
NULL
|
|
|
|
|
Yes it's not possible to specify a window as it's simulating keys at the lowest level. You would have to set the window as the foreground window.
Raymond talks about this. You can also read the comments for more good info.
http://blogs.msdn.com/oldnewthing/archive/2005/05/30/423202.aspx[^]
Using PostMessage with WM_KEYDOWN / WM_KEYUP / WM_SYSKEYDOWN / WM_SYSKEYUP (WM_CHAR is generated by the TranslateMessage function) might work with a number of applications though (there's that problem with key states though). You would have to test with all the applications you wish to send input to if you would like to still continue with this route.
-- modified at 6:49 Thursday 6th July, 2006
|
|
|
|
|
Meat Loaf wrote: endInput doesn't take Hwnd as a param so is it not possible to specify the window? and hence you said "The window must have focus" ?
then First SetFocus on window and then send Keyinput to that window. Is setting focus on That window incurred any problem?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I haven't tried that yet. There must be no problem in setting the focus. But still I'd try to do it with a sendMessage.
NULL
|
|
|
|
|
Meat Loaf wrote: I haven't tried that yet. There must be no problem in setting the focus. But still I'd try to do it with a sendMessage.
then Simulate KeyPress by sending WM_KEYDOWN and WM_KEYUP message one after another!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Re
|
|
|
|