|
if you dont want to use Invalidate did you see CDC::RestoreDC and CDC::SaveDC
|
|
|
|
|
Hi whitsky,
Please give a snippet of code so that i can understand how to erase the Ellipse when i click the Button in a CDialog.
Please help me out.
Uday kiran
|
|
|
|
|
|
Drawing with an XOR operation is the usual way of restoring the original bitmap - just do the same XOR draw again. Otherwise, the original draw overwrites the bits where the ellipse goes, and you have to redraw the window to remove the ellipse.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Hi
I m using RFX_Text function to retrieve the resultset from the query sp_who (back end is SQL Server 2000). But 3 columns of sp_who returns me nchar data due to which I m getting "Unicode conversion failed" error.
Please suggest me a way to deal with unicode characters.
The member variables m_strLoginame, m_strHostname and m_strDbname are declared as CString.
My sample code snippet:
void CTestdgSet::DoFieldExchange(CFieldExchange* pFX)
{
//{{AFX_FIELD_MAP(CTestdgSet)
pFX->SetFieldType(CFieldExchange::outputColumn);
RFX_Long(pFX, _T("[spid]"), m_nSpid);
RFX_Text(pFX, _T("[status]"), m_strStatus);
RFX_Text(pFX, _T("[loginame]"), m_strLoginame,500); // nchar
RFX_Text(pFX, _T("[hostname]"), m_strHostname,500); //nchar
RFX_Long(pFX, _T("[blk]"), m_nBlk);
RFX_Text(pFX, _T("[dbname]"), m_strDbname,500); //nchar
RFX_Text(pFX, _T("[cmd]"), m_strCmd);
//}}AFX_FIELD_MAP
}
|
|
|
|
|
N.T.Srikanth wrote: RFX_Text(pFX, _T("[loginame]"), m_strLoginame,500); // nchar
Have you stepped into the RFX_Text() method to see why it is failing?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
if i am working with dialog based applicatuion and want to call function like these how to use these means which class should should b include and how??
CMain* m_Main=(CMain*)GetParent();
m_Main-> function/data
|
|
|
|
|
priyanka s wrote: CMain* m_Main=(CMain*)GetParent();
m_Main-> function/data
GetParent() allows you to retrieve a handle to the specified window's parent or owner.So with this pointer that you create ,you will be able to access the data(of the public section)and the member functions of the class that are in the public section of the owner.
Suppose class A is your class from where you are calling another dialog.Then the header file for your called class should be included in A.h(Believing that this is the default header file for class A that you create.)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
let me give u brif explanation:
wartzDlg.cpp is my main from where i am calling function whcih are dige and declare in arielapi.cpp and arielapi.h
These are my function call:
<void CWartzDlg::Onconnect()
{
// TODO: Add your command handler code here
sessionid = m_arielapi.Login("username","password","userid");
}>
Now i want when i click these function button other window or .txt will open
and from there i will call other finction to display data .
But as i am new to vc++ I dont know hopw to achive these.
These is second function
<void CWartzDlg::OnPrice()
{
// TODO: Add your command handler code here
requestid == m_arielapi.RequestPrices(sessionid,pageno);
}
>
can u help me pls
|
|
|
|
|
your problem is open a dialog or send a data?
|
|
|
|
|
my prob is opening a new window and display data coming from server.
|
|
|
|
|
Do you want to open an external application eg Notepad to display the text file(Use ShellExecute in this case)
If you want to show the text somewhere else you need to pass a pointer to another class from where you want to access the functions.
eg:
in wartzDlg.h include MyNewDlg.h(Supposing you name your class this way)
in MyNewDlg.h include wartzDlg.h . Create a pointer for wartzDlg in the header file MyNewDlg.h like CwartzDlg *myDlg;
Now when you call this new dialog from wartzDlg
CMyNewDlg *newDlg=new CMyNewDlg();
newDlg->myDlg=this;
newDlg->DoModal();
Now with the help of myDlg pointer you would be able to access the variables/member functions of the wartzDlg in MyNewDlg
-- modified at 2:17 Monday 7th August, 2006
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hai
I want to display all the filenames in particular Folder in list control with particlar extension(ex:jpeg,bmp).is there any classes and methods to display filenames.it is very urgebt for me.
|
|
|
|
|
check
FindFirstFile & FindNextFile
nave
|
|
|
|
|
See
<br />
WIN32_FIND_DATA find;<br />
HANDLE handle=FindFirstFile("*.bmp",&find);<br />
while(FindNextFile(handle,&find)!=0)<br />
m_List2.AddString(find.cFileName);
FindClose(handle);<br />
<br />
|
|
|
|
|
Since it appears that you are using MFC, check out the CFileFind class. For each file found, use CListCtrl::InsertItem() to insert the item in the list control.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
if i want to do comparison between 2 files(images), i'll have to take the bytes of the files right? AND.... how should i go about doing it?
Thanks
Regards....
|
|
|
|
|
|
Erm...... i could not open the link above....
|
|
|
|
|
Copy the link and paste in addressbar.
Regards
Amar
|
|
|
|
|
|
Do you get this error with other articles, too?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
I have captured image buffer frames from webcam and I want to store these as mpeg video format (.mpg). Please help me with how way to convert a image buffer as byte that captured from webcam to a mpeg format frame and store this as mpeg video?
Thank in advance!
|
|
|
|
|
If you are prepared to change from MPEG format to AVI or WMV format, there is a lot more information on CodeProject. CodeProject does not have much on MPEGs, probably because the format is not supported directly by MS.
When I wanted to save an AVI file, this article http://www.codeproject.com/bitmap/createmovie.asp[^] was very useful.
|
|
|
|
|
hey all,
I am using VC++6.0. iam in need of plotting graph using MFC.
i have to plot the data values received from USB.
I have to plot data vs time as and when the USB receives the data.
What MFc class would best suit my need.
As this is my first attempt in MFC, can you please help me with some code that shows the implementation of the above.
Thanks in advance.
|
|
|
|