|
That ok sir using win32 api is any function to control the operation.If i use that in my application it will affect the actual word operation or not.
|
|
|
|
|
Search MSDN for
GetOpenFileName / GetSaveFileName function .
Wishes.
Anshuman Dandekar
Dare to Dream,
Care to Achieve.............
|
|
|
|
|
Hi all
During debugging i am not able to see the full string in a CString variable . It always shows the first letter of the string .
For ex
CString var = "hello";
the debugger variables windows shows "h" and pchData. IS there anyway to make it show full value ?
redindian
|
|
|
|
|
|
hi
the result is same ..
redindian
|
|
|
|
|
Are you sure you have not loaded an Unicode string in your CString while compiling in non Unicode mode ?
~RaGE();
|
|
|
|
|
You options need to be set to show Unicode strings... In VC6.0:
Tools menu
Options...
Debug Tab
Display Unicode Strings
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
You may post this to the original threader, next time
~RaGE();
|
|
|
|
|
CString var;
var.Format(_T("hello"));
|
|
|
|
|
Use this instead in the Watch window:
var.m_pchData,su
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
I have 10 set of x and y values..i have to draw graph for this 10 values..
anybody can give sample code for drawing graph in MFC...i need a sample code..
Pls help me..
|
|
|
|
|
Just giving a simple process
This is the drawing method
<code>
INT nY1 = LPtoDP(AXIS_Y, dblDataY.GetAt(0));
INT nX1 = LPtoDP(AXIS_X, dblDataX.GetAt(0));
pDC->MoveTo(nX1, nY1);
for (int i=0; i < dblDataX.GetCount();i++)
{
INT nY2 = LPtoDP(AXIS_Y, dblDataY.GetAt(i));
INT nX2 = LPtoDP(AXIS_X, dblDataX.GetAt(i));
pDC->LineTo(nX2, nY2);
}
</code>
besides this you need two additional funtion for converting form actual data to sceen coordinate and vise versa
<code>
LPtoDP( AXIS_TYPE AxisType, DOUBLE dblData)
{
switch(AxisType)
{
case AXIS_X:
nPos = (INT)(m_dblOrgX + ( dblData * m_dblScaleFactorX ));
break;
case AXIS_Y:
nPos = (INT)(m_dblOrgY + ( dblData * dblScaleFactorY ));
break;
default:
return 0;
}
return nPos;
}
</code>
DPtoLP( AXIS_TYPE AxisType, DOUBLE dblData )
{
switch(AxisType)
{
case AXIS_X:
wdPos = (WORD)( (dblData - m_dblOrgX) / m_dblScaleFactorX);
break;
case AXIS_Y:
wdPos = (WORD)((m_dblOrgY - dblData) / m_dblScaleFactorY);
break;
default:
return 0;
}
return wdPos;
}
And also find minmum and maximum of all the data and use this to calculate the scale factor
CalcScaleFactor( CRect rctDrawArea )
{
DOUBLE dblScaleRangeX = m_dblScaleMaxX - m_dblScaleMinX;
DOUBLE dblScaleRangeY = m_dblScaleMaxY - m_dblScaleMinY;
m_dblScaleFactorX = ( dblScaleRangeX == 0 ) ?
0 : (DOUBLE)rctDrawArea.Width() / dblScaleRangeX;
m_dblScaleFactorY = ( dblScaleRangeY == 0.0 ) ?
0 : (DOUBLE)rctDrawArea.Height() / dblScaleRangeY;
m_dblOrgX = rctDrawArea.left - ( m_dblScaleMinX * dblScaleFactorX );
m_dblOrgY = rctDrawArea.bottom + ( m_dblScaleMinY * dblScaleFactorY );
}
}
There are some member variables in the code you can understand by close look at the code. Just simple of drawing graph is convert your points to screen coordiante and then simple line draw between points.
|
|
|
|
|
|
Hi. To obtain an horizontal scrolling text, I created a transparent window on which I move a text. After I set the windows as TOPMOST, so my application can show messages like a TV. The problem is that sometimes, other applications create a TOPMOST window too. So, using a timer, I look if my window is on top; if not I call:
if ((WindowOverMine = GetWindow(myWindow, GW_HWNDFIRST)) != myWindow)
SetWindowPos(myWindow, WindowOverMine, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
In this way everything works fine... only a problem... I can't click another window or menu of my application... I think because the transparent window is ALWAYS over the others. It doesnt'happen with other application windows . Have you a suggestion ??
Thank you !
|
|
|
|
|
Why don't you set a region for your transparent window to have the holes in places where your menu should be clickable?
OlZeBest
|
|
|
|
|
Hi
I have a drag drop handler. When i drag drop a file to a network path. I am getting the path like this "C:\Documents and Settings\720452\NetHood\Temp - infch01152\新規Microsoft Word Document.doc". But the share name is \\infch01152\temp. Is there any way by which i can get the original path from the path mentioned above. Thanks in advance.
|
|
|
|
|
hi,
I want to create a mdi application without menu which has 3 child window with 3 different behaviors one contain some controls other one does not contain these it has different behavior. can DOC/View arch. is usefull.
Any idea about these types of req. or i need to create my own MDI archi.
Dinesh Kulkarni.
|
|
|
|
|
Oh sorry ,
I mean I used IsNetWorkAlive and IsDestinationReachable.
these two functions always returning true.
I didnt understand the ISensNetwork how we can use that
|
|
|
|
|
Aby Skaria wrote: I didnt understand the ISensNetwork how we can use that
See here.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
hi...
let get straight to the question... if i want to implement MS SAPI interface, so i can have my custom TTS have the same interface with MS SAPI, what should i do?
thx...
|
|
|
|
|
Greetings,
I would like to retrieve the whole document text from an active text window in Visual Studio 98.
For now I select all text and retrieve it via TextSelection (language: C++). Here the pseudo code:
...<br />
TextDocument doc = getActiveDocument();<br />
rememberCurrentSelection(sel);<br />
TextSelection sel = doc.getCurrentSelection(); <br />
<br />
sel.selectAll();<br />
wstring wholeText = sel.getText();<br />
<br />
restorePreviousSelection(sel);<br />
...
Drawbacks:
o Selection of all Text causes flicker effects
o Restauration of previous text selection often will change scroll position
Is there any way to retrieve the text without these drawbacks?
Thank in advance,
Jacek
>> User error. Replace user and strike a key <<
|
|
|
|
|
hicks22 wrote: an active text window
If you have a handle on the window, you should be able to get the text easily, no ?
~RaGE();
|
|
|
|
|
GetWindowText() will return NULL for the desired window, already tried.
|
|
|
|
|
Hi,
I have been thinking about the problem below for a week , Is there anyone can help me?
I m working on a MFC program, and I want to make the program support console (Command Line). I don't know why I can't use cout or printf to print anything out. I thought It could display messages on console when I launch the program on console (windows xp), like:
c:\app.exe -number 1
but nothing came out on consle actually. I know that I can create another console to recieve messages from cout and printf, but I don't want to create any console in my program, I just want print some message on original console. In Java, we can print message on console by using System.out.print(), so is there any way, function or class I can use to print messages on the console in MFC program? Could you show me a simple example?
Thanks so much!
David Zuo
|
|
|
|
|
Everything is a bit mixed up in your post.
- A console program does usually not involve any mfc. It is a program that usually does not have any GUI and in which you can use cout and cin.
- An MFC application is an application using classes that makes it easy to handle the GUI.
Both are seldom mixed together.
- A command line is a set of parameter you can give to your executable, no matter if it is a console application or a MFC app, it works in both ways.
c:\app.exe -number 1
David.YueZuo wrote: nothing came out on consle actually
What did you expect here ? How are you handling the command line in your application ?
David.YueZuo wrote: I can use to print messages on the console in MFC program
As I explained, MFC and console are usually different types of app. If you want to display something in a MFC app, use a CEdit , a CStatic or a MessageBox .
~RaGE();
|
|
|
|