|
Until you call delete or the application is shut down, the memory remains allocated.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I am writing two ActiveX objects in MFC 7, one server and one client. I want my client object to connect to the server object through the Internet(not LAN); how can I pass through the firewalls/proxy that reside on the Internet ?
|
|
|
|
|
Hello everyone.
I am quite new at COM and DirectX programming, and I have some problems to understand how to use properly all of this stuff to build my own transform filter.
My app take the voice as an input, convert it into UMTS format and send it through the internet, at the end of it, the data stream is uncompressed and played. But this is just my dream. For now I would like to know how to build a Transform filter, and how to use the CTransformFilter interface.
I have started to build a COM object with VC++ ATL Wizard, but any "public CTransformFilter" throws me away, even if the appropriate "#include "Streams.h" and "Strmbased.lib" in the Settings.
Thanks for any kind of help.
|
|
|
|
|
When I using SetIpNetEntry( ), I got wrong IP in ARP Table
MIB_IPNETROW at1;
...
at1.dwAddr = inet_addr("80.0.0.30");
//or at1.dwAddr = pMib->table[0].dwAddr;
SetIpNetEntry((MIB_IPNETROW *)&at1);
Then I get 0.0.0.30 in ARP Table instead of 80.0.0.30.
Even if I get MIB_IPNETROW by means of GetIpNetTable( ) and then insert it to SetIpNetEntry( ) I get 0.0.0.X
Help me.
|
|
|
|
|
When I using SetIpNetEntry( ), I got wrong IP in ARP Table
MIB_IPNETROW at1;
...
at1.dwAddr = inet_addr("80.0.0.30");
//or at1.dwAddr = pMib->table[0].dwAddr;
SetIpNetEntry((MIB_IPNETROW *)&at1);
Then I get 0.0.0.30 in ARP Table instead of 80.0.0.30.
Even if I get MIB_IPNETROW by means of GetIpNetTable( ) and then insert it to SetIpNetEntry( ) I get 0.0.0.X
Help me.
|
|
|
|
|
hi all,
I have ATL composite control, when the control in loaded is IE the background color is changed (to white). I want the default background color for my composite control dialog box.
Do i have to create a brush and set the background color?
Thanks in Advance
Abhi Lahare
|
|
|
|
|
Hi guys,
I am going to add Tab control to my Project.There are 3 Tab labels in my Tab Control.Now I want to add Images to Tablabel. BUT I DON'T WANT TO ADD TEXT FOR that Label.I just want to add a Image Completely to the Label.
I do like this:
CImageList img;
CTabControl m_tabctrl;
img.Create(IDB_BITMAP2, 11, 4, RGB(0, 255, 0));
m_tabctrl.SetImageList(&m_imagelistTab);
pfirst=new first;-------->This is a Pointer from a dialog..
pfirst->Create(first::IDD, &m_tabctrl);
m_tabctrl.AddTab(pfirst,"", 0);
The Image is adding to the Label.But there is a small space remaining in the Label.I don't want to add Text to the Label.
So How do I add Image completely to the Tablabel with out remainng Space?
Thanks...
|
|
|
|
|
Hi all,
I want to call a CDAODatabase class from my Regular MFC DLL, I have followed the instruction of Microsoft MSDN. But the following code incorrect run.
Can you help me on it ?
Thanks a lot for your reply.
Tuan
PS : This is my code
extern "C" BOOL PASCAL EXPORT VehicleChange()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CDaoDatabase* connData;
try{
connData = new CDaoDatabase ;
if(connData->IsOpen()) {
AfxMessageBox("The connection has been openned");
}else{
CString strConnect= "ODBC;DSN=FieldTrip;UID=;PWD=;";
connData->Open(_T(""), TRUE,FALSE, strConnect);
}
strSql = "update VehicleInformation set cAacity=11";
connData->Execute(strSql,dbSQLPassThrough);
} catch(CException *e){
connData->Close();
delete connData;
AfxDaoTerm();
return false;
}
AfxMessageBox("success");
connData->Close();
delete connData;
AfxDaoTerm();
return true;
}
|
|
|
|
|
TuanTriTue wrote:
But the following code incorrect run.
Which means what exactly?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
berkeley sockets.
there are enough tutorials here at codeproject.com
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Greeeg wrote:
there are enough tutorials here at codeproject.com
Apparently not in his case since he has already been pointed in that direction. This is about the 5th time he has posted this question.
He is looking like someone trolling to get someone to do his job for him because he is incapable, irresponsible and of course lazy. I would have responded to his post myself but I couldn't find the [get lost] icon
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
I want to launch a .job file in C:\Windows\Task\ directory.
I use system(), WinExec(), ShellExecute(), CreateProcess,
but they all don't work
Is there any other way to implement this function?
Thanks a lot
Jesa
|
|
|
|
|
What is a .job file?
If it has a registered executable associated with the file extension then the process will start if you use ShellExecute() correctly.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
A .job file is created by task scheduler.
We can launch the .job file by double clicking it,
but it can't be launched by using ShellExecute() in VC++.
Maybe it doesn't have the registered executable associated with .job file
extension.
Jesa
|
|
|
|
|
Hi All
i have a nice and groovy CListCtrl which is showing images (100x100)
I have a thread which inserts the images into the control as the images are received. (the number of images is unknown beforehand)
When an image arrived, i add it to the Imagelist and then i do a SetImageList
(and then finally give it a title with InsertItem)
When i have a largish number of images, the control fickers when an image arrives and is inserted ...
I was wondering if there was a better method for what I am trying to do and what would be the best way to rid myself of the flicker?
cheers
bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
Have you tried CWnd::LockWindowUpdate()? I don't know that it will help but I wonder.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
|
ovveride the folowing
OnEraseBkgnd
OnPaint
in the errasbackground method you should do nothing..
and in the on Paint you should do something like this:
void CIcoListCtrl::OnPaint()
{
CPaintDC dc(this);
CRect r;
GetClientRect(&r);
CMemDC memDC(&dc,&r);
Errase(&memDC);
CWnd::DefWindowProc(WM_PAINT,(WPARAM)memDC.m_hDC,0);
}
I have a CustomDrawListControl with Icons and the Icons are zooming on mouseenter and mouseleave...
and it dont flicker at all!
I hope this helps..
|
|
|
|
|
OK, If I have read correctly I should be able to take a single executable file from the development environment and use it on another Windows based machine if I statically link with the MFC dlls. I appreciate that this will make it a more cumbersome .exe but it keeps my customer happy. As a final check I will not need any additional dlls to permit database access since I accomplich that using the MFC CRecordset classes. Is this correct?
I currently use the standard edition of VC++ ver6 and think that I have to get the Professional edition to do this. Again before I spend the dollars am I correct?
AndyB
|
|
|
|
|
|
TallAndyB wrote:
I will not need any additional dlls to permit database access since I accomplich that using the MFC CRecordset classes. Is this correct?
I don't believe that will be correct. It's been a long time but you should need files for whatever database product you are using. Also CRecordset uses ODBC I believe, so all of that has to be installed.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Hello, I have an editbox that is in a child dialog – this child dialog is a “cancel test” type screen having a single button that when pushed cancels a long series of calculations, and a single multilane editbox that receives information from my main program and displays them in a multilane form.
Here is my problem: I can get the multilane part to work great, but I always have to scroll down to see the most recent message. For example, if I were to make an editbox that is only tall enough to print a single line, then I will always see the very first string that I sent to the editbox – I am wanting to see the most recent string, not the oldest.
I know I need to use something like pcanceldlg->LineScroll(1, 0); but I always get an error saying LineScroll' : is not a member of 'CCancelBoxDlg' If anyone can help me with how to use the LineScroll function in a child dialog I would greatly appreciate it.
If it helps any, here is the code I am using to send the strings:
pcanceldlg->GetDlgItemText(1015, s_oldprogress);<br />
s_newprogress = s_oldprogress + "\r\n" + s_progress;<br />
pcanceldlg->SetDlgItemText(IDC_MOVEMENTDIALOG, s_newprogress);
Thanks,
Loren
|
|
|
|
|
Hi,
LineScroll is a member of the CEdit class, not CDialog , which is why when you try to call the function using the dialog pointer, you get a syntax error. To call LineScroll , therefore, you need to have the CEdit control variable or a pointer to it. Try this instead:
<br />
CEdit *myEdit = ((CEdit*)GetDlgItem(IDC_MOVEMENTDIALOG));<br />
<br />
myEdit->LineScroll(1, 0);<br />
Hope that helps!
Sincerely,
Alexander Wiseman
Est melior esse quam videri
It is better to be than to seem
|
|
|
|
|
Sounds very much like an editbox I'm using to log messages. This is how I scroll to the bottom of the editbox.
int len = m_SystemStatus.GetWindowTextLength();
m_SystemStatus.SetSel(len,len,FALSE);
|
|
|
|