|
Wrong forum
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Wrong site and attitude too.
using System.Beer;
|
|
|
|
|
give me your names and address, i'll send it to you...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
HI people;),
Please help me out with this one.
I was working on a project for creating a Text Editor.
Everything was going on fine, until i serialized my data.
What i am doing is that i have an CArray of CString , so that a particular index in the array represents one line of the text-editor.
While serializing, i have to use a loop to write the CString of every index of the array to a file. But the problem with serializing is that it breaks out of the loop, when it encounters a \n . In my program, each line is ended by a \r\n .
I have even tried using Write of CArchive . But it doesn't work.
Is there any way in which i could serialize my data to the file?
Help.... SOS.....
Thanks in advance.
AslFunky
|
|
|
|
|
|
Using DirectShow , If i need to capture bitmap from Live video
what is the interface i need to use..??
Also, Is there any interface thru which i can the id of the connected hardware
( webcam or handycam in my case..!! )
Thanks in advance,
Pramod.
|
|
|
|
|
hi
I am doing a pattern matching program uisng MFC, could anyone help me with the equations thats necessary to rotate the bitmap.
|
|
|
|
|
|
Hi all...
plz read it completely...may be it will be helpfull for you also...
I am facing one problem, I get exception in the InitDialog of CPropertySheet()...
I have a Class named CXPropertySheet which is derived from CPropertySheet, I need this class because I want some extra effects and capabilites in property pages and propertysheet, like resizability painting background color etc...
I also have one class derived from CTabCtrl, which I use to paint tab buttons on tab control. I subclass this class to tab control of CXPropertySheet...
in the InitDialog of main dialog...
m_pPropertySheet = new CXPropertySheet("Logkey", this);
//++ Add pages to the property sheet
m_pPropertySheet->AddPage(&m_firstPage);
m_pPropertySheet->AddPage(&m_secondPage);
.
.
//++ display the property sheet...
m_pPropertySheet->Create(this, WS_CHILD | WS_VISIBLE);
//++ Modify the style,
m_pPropertySheet->ModifyStyleEx(0, WS_EX_CONTROLPARENT);
m_pPropertySheet->ModifyStyle(0, DS_CONTROL);
///////////////////////////////////////////////////////////////////////////////////////
In the InitDialog of the CXPropertySheet....to make it resizable…I wrote this code…
// I get exception here...
writeToTrace("CPropertySheet::OnInitDialog");
BOOL bResult = CPropertySheet::OnInitDialog();
writeToTrace("CXPropertySheet::OnInitDialog");
/* Subclass the tab control. */
m_myTabCtrl.SubclassWindow(GetTabControl()->m_hWnd);
writeToTrace("Subclassed the tab control");
/* Make it owner drawn. */
m_myTabCtrl.ModifyStyle(0, TCS_OWNERDRAWFIXED);
If I run it in debug it runs fine....It runs with Release build as well but in very inconsistent manner... but only on my machine...which is Win2000 professional...
I will be very grateful if anybody could give your thought for this problem, I am sorry if I have not described the problem properly...
thanx and regards...
Avya
Avya.
|
|
|
|
|
What is the exact exception you are getting?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
I dont know what that exception was....but fortunately I solved the prob....
I think the problem was I was deriving property sheet from CPropertySheet nad the property pages from my other class, which is derived from CPropertyPage, so in InitDiaog of Properysheet it was not able to add the pages, I suppose. Then I changed the aproach and derived all the property pages from CProperyPage...Noe it is working fine...
Anyways thanks for reply...I would like to get tou comment on this...why it may give exception if the propery pages arent derived directly from CProperyPage...
Thanks and regards
Avya.
|
|
|
|
|
Hi all,
I want to delete temp internet file placed in the directory
C:\Documents and Settings\user1\Local Settings\Temporary Internet Files.
Is any Api available in vc++ which can do this work?
rajesh
|
|
|
|
|
See _unlink() , DeleteFile() and CFile::Remove() .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
I posted a question about tooltips for controls not so long ago.
After searching and searching and searching again I found a solution so I thought I'd share with you.
Problem: The tooltips for controls in a groupbox do not show
even if you moved the position of the groupbox to the back/front (left and right ). Nothing seemed to help.
solution: I called a TrackMouseEvent to create mouse hover messages. I handled this message in a PreTranslateMessage function. There you can determine which window called the message ... and it works!
(PS: actually I set a static text as tooltip for various reasons, but the principle stays the same.)
here's the code in PreTranslateMessage:
BOOL CWFSEC2MailerTestDlg::PreTranslateMessage(MSG *pMsg){<br />
CWnd *window=CWnd::FromHandle(pMsg->hwnd);<br />
<br />
TRACKMOUSEEVENT trackmouseevent;<br />
trackmouseevent.cbSize = sizeof(trackmouseevent);<br />
trackmouseevent.dwFlags = TME_HOVER;<br />
trackmouseevent.dwHoverTime= 0;
if(window != NULL){<br />
trackmouseevent.hwndTrack = window->m_hWnd;<br />
TrackMouseEvent(&trackmouseevent);<br />
}<br />
<br />
switch (pMsg->message){<br />
case WM_MOUSEHOVER: if(!hover_on){<br />
SetToolTipText(window->m_hWnd);<br />
hover_on = true;<br />
}
break; <br />
case WM_MOUSELEAVE: hover_on = false;<br />
break;<br />
case WM_LBUTTONUP: Invalidate();<br />
break;<br />
default:
break;<br />
}
return CDialog::PreTranslateMessage(pMsg);<br />
}
tnx to all who tried to help...!
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Can someone suggest a simple way to shrink/ stretch a BMP? Better not involving MFC. Thanks.
|
|
|
|
|
try that function.....CDC::StretchBlt
|
|
|
|
|
I knew that...;P
Maybe need to talk in more detail...
Some function would provide the BITMAPINFOHEADER and Bitmap buffer data. I wanna change the size of the resulting BMP. The step I thought was that:
1. call CreateCompatibleDC( ) to create a memory DC.
2. call CreateCompatibleBitmap( ), get the handle of a bitmap and use last-created memory DC to select it.
3. call memcpy( ) to copy the data to the last-created compatible bitmap.
4. call StretchBlt( ) from the memory DC to the dialog DC( or memory DC number 2 ).
For I need to save time, the data of the BMP after stretch need to be saved. So...the following work may required to be done only once.
5. call GetCurrentBitmap for the dialog DC( or memory DC number 2 ).
6. call CBitmap::GetBitmapBits( ), get the data( upset-down, need to flip. )
7. CreateDIBSection( ) for the new data in new size.
8. OK, next time when repaint is required, simply use a memory DC to select these bitmap handles and call BitBlt from a memory DC to dialog DC.
( The steps concerning with the deleting of some temp GDI objects are omitted. )
OMG! Too many steps... Is there a simpler way than that? Thanks!
|
|
|
|
|
|
Hi...
How i can access Windows NT bu knowing the username and password via VC++. I am trtying to pass parameters vis URL but there is pop window asking for password and username first so i need to pass this point then send the URL.
|
|
|
|
|
IIRC You can pass the username and password within the URL.
e.g. http://username:password@site.com
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
i tried what you told me but i am geting error page " page cannot be open"...any other suggestions?
|
|
|
|
|
Um, perhaps this only works when the site supports Basic Authentication. I am not sure what you could do to get around this.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
My application (under VC++ .net) should communicate with external hardware, with a protocol that requires the carriage return sent as a control character.
However, when I add the "\r" to the string, e.g.
string s1="\r00220101\r";
my program seem to go nuts.
I use a simple console program for test purposes,and when I try to print the string with "cout", the string doesn´t print at all and the order of the other "cout´s" seem totally random. There are no similar problems with "\n" or "\t".
Does anybody have a suggestion
regards
doneirik
|
|
|
|
|
Hi,
I too dont have any correct idea, but you can try doing one thing.
try clearing the output stream, perhaps using something equivalent to
fflush(stdin) or a flushall before cout ing anything.
Hope that helps.
Bye.
AslFunky
|
|
|
|
|
solved it. (more or less)
|
|
|
|