|
Well, if all you need to do is parse the data, and extract the info, then create a buffer large enough, and append data to it when it comes, but make sure that it does not overlap the size of the buffer. If it comes to being full, then empty it, or save it to a file etc.
I dont think I have made it much clearer for you, but anyway.
this is this.
|
|
|
|
|
Hi,
I am creating a shell extension and having some problems in Dropping a file on the extension.
My extension actually communicates with an FTP server and whenever a file is dropped in it, I have to copy the file onto the FTP server. This process is working fine in a single threaded component. But I would like to show a progress dialog for the same and I am doing the file copy in a background thread and showing a modal dialog in the main thread.
The problem is IDataObject is created in the main thread and I am passing a reference of the same to the background thread. When I invoke the GetData(..) method of IDataObject, its returning failure. But when the same in inoked from the main thread, I am getting the results.
The extension runs in an Aprtment threading model.
Any help would be appreciated...
Thanks and Best Regards
Jugs
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
It sounds like you're not marshalling the interface across apartments.
|
|
|
|
|
Hi Jon,
You were right.
I was not marshalling the interface across apartment boundaries. I used CoMarshalInterThreadInterfaceInStream and CoGetInterfaceAndReleaseStream methods and was successfull.
Thanks for the support.
Best Regards
Jugs
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Hi! anyone who knows how to use CTreeCtrl's tvs_haslines in CListCtrl? actually, im using custom control - its a list control with first column like a tree control but actually just modifying the item using LVITEM attributes. It works ok but I cannot add the tvs_haslines property.
Please help.
|
|
|
|
|
What have you tried ? What goes wrong ?
~RaGE();
|
|
|
|
|
Hi fellow CPians,
In which dll or executable can I find the icons representing the two arrows IE uses in his toolbar to browse on the next or on the previous page ? it does not seem to be in shell32.dll, and i think it is the same image used twice, one is simply reversed.
Thanks
~RaGE();
|
|
|
|
|
have you tried looking directly into iexplore.exe or into explorer.exe ?
moreover, look at those arrows, the shadows of the upper left border are the same, so they cannot be the same one reversed...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
toxcct wrote: iexplore.exe or into explorer.ex
Yes, no luck
toxcct wrote: shadows of the upper left border are the same, so they cannot be the same one reversed
Hmmm, well done, Watson !
~RaGE();
|
|
|
|
|
I've imported a swf file as a binary resource in my resources. How can I load this file and use it in my code? In general, when I have a binary resource how can I read and use it?
... And nothing else matters!
|
|
|
|
|
|
|
I wanna set a control size by exact values in pixels while I'm in designer. Is there any way?
... And nothing else matters!
|
|
|
|
|
yes, you can, even if this is quite dangerous to.
you can always use the keyboard to size pxl by pxl your controls, otherwise do this :
1. close VisualStudio
2. open the .rc file of you project in a WYSIWYG editor (notepad is sufficient).
3. find the id of the control to edit (e.g. IDC_MY_BUTTON)
4. set its position/size in the following order :
- left border position
- up border position
- width
- height
cheers,
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
No, units in the RC file are in DLU ( dialog (un)logical unit ) and will be converted to pixel when displayed; will scale the dialog according to the DPI and font scaling ( big font vs. normal font ) ( unless I'm really mistaken )
toxcct wrote: in a WYSIWYG editor (notepad is sufficient).
me think notepad is not a WISIWYG editor ...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote: me think notepad is not a WISIWYG editor ...
please explain...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
MSWord is a wisiwyg editor, what you see on the screen is (normally) really what you get when you print it out.
This is not the case for notepad, since you do not know how what you write will come out when you print it (additional footers and headers, page nums and so). You can turn the printer settings in landscape mode while nothing will change on your screen when using notepad.
I think what you meant is a plain text editor, not a wysiwyg.
~RaGE();
|
|
|
|
|
word is not a wysiwyg 'cause all the formatting stuff modify the rendering of the file. create a word file, then open it into another editor (ok, you don't want notepad, so let's say edit or vi) and you'll see some horrible character... with word, What You See Is NOT What You Get !!!
now, i'dd like to know (as notepad is supposed not to be WYSIWYG) where are those hidden bytes which make it not a plain text editor...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
toxcct wrote: word is not a wysiwyg 'cause all the formatting stuff modify the rendering of the file
I think your definition of wysiwg is wrong : it describes a screen to printer behaviour, not screen to file content behaviour. As Maximilien explained, you expect the formatting to be rendered directly on the screen, but you do not care about the file content.
toxcct wrote: ok, you don't want notepad, so let's say edit or vi
I do not think I said anything against notepad
toxcct wrote: with word, What You See Is NOT What You Get !!!
In the file, definitely not, on the printer, it is indeed. So word is wysiwyg.
toxcct wrote: now, i'dd like to know (as notepad is supposed not to be WYSIWYG) where are those hidden bytes which make it not a plain text editor...
Here you mix up two things which are completely different: wysiwig and plain text editor.
Notepad is a plain text editor : no formatting, no special rendering on the screen, one char you type is saved as one or two chars in the file.
Notepad is not wysiwig : printing an HTML file opened with notepad does not render it, as would when printed with FrontPage
Word is not a plain text editor : you have formatting, you can insert a lot of objects (tables and so), and you save far more in a .doc file as the few chars you have typed (this is what you call horrible character)
Word is wysiwig : print a word document, and it comes out exactely as it is displayed on your screen.
~RaGE();
|
|
|
|
|
ok, my mistake, i thought that WYSIWYG was talking about file content...
so replace it in my first reply in this thread with "plain text editor"
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
|
|
a WYSIWYG editor would be something like Word, FrontPage ( in norma view ), where you see mostly graphical changes directly on the screen, and not only when rendered either on paper or on a web page.
for example, "coding" HTML in notepad does not show you the end-result IN the editor; like FrontPage do; so it's not "What You See Is What You Get"
in your example, notepad, if it were a WYSIWYG you display the RC file the same way the resource editor display it to you, even there, it's not a fully WYSIWYG editor because the result will be different than what you expect.
the accronym WYSIWYG is/was really usefull for Page Layout software ( quark, pagemaker, ... ) where the user would place object on the virtual page, and when printed you look the same as on the screen.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
i am using two class
i want to update the CEdit of dlg form different clas
xyz
{
//non MFC Class
extren CEdit *ed
SetEditText()
{
ed->SetDlgItemText(IDC_EDIt1,"Waiting for Call");
ed->UpdateData(FALSE);
}
----
---
--
};
dlg
{
//MFC class
CEdit *ed;
//m_ed is member variable IDCEDIT1 control
oninitdlg()
{
ed=*m_ed;
}
onbutton1()
{
x->setEditText() // x is an instance of xyz
}
----
---
--
};
and also i tried using
((CIVRTraficInfoSystemApp *)AfxGetApp())->m_pMainWnd->SetDlgItemText(IDC_EDIT1,"Waiting for Call");
and
in xyz class
CIVRTraficInfoSystemDlg *dlg;
dlg=(CIVRTraficInfoSystemDlg *)::GetActiveWindow();
// dlg->m_ed2.SetWindowText(IDC_EDIT2,"Waiting for Call");
//dlg->UpdateData(FALSE);
// dlg->UpdateDialogControls(((CIVRTraficInfoSystemApp *)AfxGetApp())->m_pMainWnd,TRUE)
//dlg->UpdateWindow();
and i also tried the following
from xyz class
SetDlgItemText (AfxGetApp ()->m_pMainWnd->m_hWnd, IDC_EDIT2, "some thing");
//delete [] lpBuffer;
UpdateWindow (GetDlgItem (AfxGetApp ()->m_pMainWnd->m_hWnd, IDC_EDIT2));
but i am not able to update the text in the IDC_EDIT1
pls suggest me some idea
Thanks & Regrads
kattavictor
|
|
|
|
|
You can use:
class CXyz<br />
{<br />
public:<br />
CEdit* m_pEdit;<br />
void SetTheText()<br />
{<br />
m_pEdit->SetWindowText("Hello");
}<br />
<br />
};
//here, m_Xyz is a member variable of CMyDialog, an object of CXyz.
void CMyDialog::OnButton1()<br />
{<br />
m_Xyz.m_pEdit = &m_Edit;
m_Xyz.SetTheText();<br />
<br />
}
this is this.
|
|
|
|