|
Henry miller wrote:
If you want some example source code, search for "diff", which is a unix utility that does what you want. (and many other things)
Good idea. However, "diff" is for text files. If you want to compare binary files, try the unix utility "cmp"
If you don't have the source to the unix utilities, try looking at cygwin, a Unix-on-DOS implementation:
http://www.cygwin.com[^]
|
|
|
|
|
A simple check on length would be a quick way to say they are different.
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)
|
|
|
|
|
hi all,
I want to add check Boxes to every Column Field data in a List Control..How do I do that?.
Thanks in advance..
|
|
|
|
|
I've used this control for just such a problem.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
can anyone here tell me functions that handle Windows MIDI driver(usb)?
new to this stuff
tahnx in advance
|
|
|
|
|
Hi,
In my program I have huge data sets(about 100,000,000 integers) and I was wondering how much memory overhead it has?
For a 32bit integer array of size 100,000,000 x 4bytes = 400MB memory is just needed for the data set. How much std::vector in Windows would add to that? How about in Windows for x64?
Thanks!
Rob
|
|
|
|
|
hey,
I have a child window with Flat scroll bars. The scrolling is handled in OnVScroll and OnHScroll. I need to implement the scrolling in mouse wheel operations too. How can I Implement it?
Thanks in Advance.
shijuck
|
|
|
|
|
OnMouseWhell(): generated by the class wizard when you select to handle WM_MOUSEWHEEL.
Example:
BOOL CSMyScrollView::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
{
return CScrollView::OnMouseWheel(nFlags, zDelta, pt);
}
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
How to get Dialog Handle?
On Visual C++ 6.0, how to I identify a user who is having what kind of privileges? (i.e admin privilege, etc)
|
|
|
|
|
max_gundam15 wrote:
How to get Dialog Handle?
What do you need this handle for (i.e., what problem are you addressing)?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Interface expert wanted!
Has anyone ever seen this? Can anyone help?
I have built a VC dll to be accessed by a vb app. I am a so-called professional
programmer who has done this plenty of times before and know my way well around both
languages (at least I thought I did)
My C code consists of just 4 entry points from which I then call lots of internal code
The whole thing works great if I build it in VC.net and use it in a vb.net app
(one odd thing though, I always thought that you defined a function as __stdcall
rather than __cdecl - I can only make the dll work in vb.net if I DO declare the funtions
as __cdecl !)
When I go over to windows apps and build the dll in vc6 and use it in vb6 I get
"bad calling convention" (I did use __stdcall this time and expected no problems)
I have tried everything I can think of, a ".def" file, "__declspec(dllexport)" defining,
you name it. I have even run diagnostics: bindump.exe and depends.exe and can
visibly see the entry points apparantly correctly set up by vb6
I have spent much time browsing the web trying different suggestions. None have helped.
I am quite familiar with the differences between calling sequences. Recalling previous
problems experienced with mismatching parameters I even added a special void function
with no parameters (__stdcall) - I can't even call that, same "bad calling" message
Do I have a bad install (?!) - has anyone been through this? I am losing my confidence
and may be applying for a different job real soon!
|
|
|
|
|
I have a menu structure like
A B->f,g,h
on selecting B it leads to f,g,h when i select any one of the menu (f,g,h) the same dialog window (X) opens. I just need to make a few changes to the dialog window X depending on which of the menu f,g,h were selected. Is there any possible way for me to detremine this?
Thanxs
|
|
|
|
|
I assume that you create the dialog in each handler for f, g, h; you simply need to pass a "hint" to the dialog that you create telling it that it came from f, g, or h.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I want to help me more by saying how to pass the hint. I dont know how i can pass this information to the new dialog window that opens up.
|
|
|
|
|
how do you create the dialog ?
for example (really pseudo-code) :
void MyClass::OnHandleE()
{
CYourDialog dlg;
dlg.Caller( isE );
dlg.DoModal();
}
void MyClass::OnHandleF()
{
CYourDialog dlg;
dlg.Caller( isF );
dlg.DoModal();
}
void MyClass::OnHandleG()
{
CYourDialog dlg;
dlg.Caller( isG );
dlg.DoModal();
}
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Menu items f, g, and h each have their own handler function. In that handler function is where you can create an instance of the dialog object and pass it one of three values. Make sense?
Here's an example:
BEGIN_MESSAGE_MAP(CMyDoc, CDocument)
ON_COMMAND(ID_ITEM_ADD, OnItemAdd)
ON_COMMAND(ID_ITEM_EDIT, OnItemEdit)
ON_COMMAND(ID_ITEM_DELETE, OnItemDelete)
END_MESSAGE_MAP()
void CMyDoc::OnItemAdd()
{
CMyDialog dlg(1);
dlg.DoModal();
}
void CMyDoc::OnItemEdit()
{
CMyDialog dlg(2);
dlg.DoModal();
}
void CMyDoc::OnItemDelete()
{
CMyDialog dlg(3);
dlg.DoModal();
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
{
ON_COMMAND(ID_WAVEFORMSUMMATION_USERDEFINEDGROUPING, OnWaveformsummationUserdefinedgrouping)
ON_COMMAND(ID_WAVEFORMSUMMATION_GP246, OnWaveformsummationGp246)
ON_COMMAND(ID_WAVEFORMSUMMATION_GP123, OnWaveformsummationGp123)
ON_COMMAND(ID_ANALYSE_WAVEFORMDIFF, OnAnalyseWaveformdiff)
}
void CMainFrame::OnWaveformsummationUserdefinedgrouping()
{
SwitchToView(ANALYSEMULWAVEFORM);
}
void CMainFrame::OnWaveformsummationGp246()
{
SwitchToView(ANALYSEMULWAVEFORM);
}
void CMainFrame::OnWaveformsummationGp123()
{
SwitchToView(ANALYSEMULWAVEFORM);
}
void CMainFrame::OnAnalyseWaveformdiff()
{
SwitchToView(ANALYSEMULWAVEFORM);
}
void CMainFrame::SwitchToView(eview nView)
{
CView* pold = GetActiveView();
CView* pnew = (CView*)GetDlgItem(nView);
if(pnew==NULL){
switch(nView){
case SINGLEWAVEFORM:
pnew=(CView*) new CSingleWaveform();
break;
case MULTIPLEWAVEFORM:
pnew=(CView*) new CMultipleWaveform();
break;
case ANALYSEMULWAVEFORM:
pnew=(CView*) new CAnalyseMultipleWaveform();
break;
}
CCreateContext context;
context.m_pCurrentDoc=pold->GetDocument();
pnew->Create(NULL,NULL,WS_CHILD|WS_BORDER|WS_MAXIMIZE,CFrameWnd::rectDefault,this,nView,&context);
pnew->OnInitialUpdate();
}
SetActiveView(pnew);
pnew->ShowWindow(SW_SHOW);
pold->ShowWindow(SW_HIDE);
if(pold->GetRuntimeClass()==RUNTIME_CLASS(CSingleWaveform))
pold->SetDlgCtrlID(SINGLEWAVEFORM);
else if(pold->GetRuntimeClass()==RUNTIME_CLASS(CMultipleWaveform))
pold->SetDlgCtrlID(MULTIPLEWAVEFORM);
else if(pold->GetRuntimeClass()==RUNTIME_CLASS(CAnalyseMultipleWaveform))
pold->SetDlgCtrlID(ANALYSEMULWAVEFORM);
pnew->SetDlgCtrlID(AFX_IDW_PANE_FIRST);
RecalcLayout();
}
this is how my code is.when the child window is created i dont know from which menu option this child window is opened. please guide me through. Now in class CAnalyseMultipleWaveform i would like to know which menu option was selected.
thanks.
|
|
|
|
|
Araj01 wrote:
when the child window is created i dont know from which menu option this child window is opened.
Did you not see my code example? As your code is right now, SwitchToView() is called with the same value no matter what menu item was slected. Is this intentional?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Yes i saw your code. I am calling the same value in SwicthToView() intentionally. Once i switch to the view i need to know from which menu option i came to the view. Is this possible?? I am switching to the same screen in all the cases because 90% of the operations are same for all 3 and differing only by 10%. Id i get to know from which menu i came to this screen, then i would be able to code accordingly.
|
|
|
|
|
My bad. I overlooked one small thing in your request that has only now become clear to me.
Does the call to GetActiveView() not tell you which of the three views is the active one?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
GetActiveView() only tells me which of the dialog view is currently active but it doesnt give me any clue about the one of the menu option which i have selected.
My only question is when I come to the class CAnalyseMultipleWaveform i somehow want to know if it was due to OnWaveformsummationUserdefinedgrouping / OnWaveformsummationGp246 / OnWaveformsummationGp123 / OnAnalyseWaveformdiff.
|
|
|
|
|
Araj01 wrote:
My only question is when I come to the class CAnalyseMultipleWaveform i somehow want to know if it was due to...
void CMainFrame::OnWaveformsummationUserdefinedgrouping()
{
SwitchToView(ANALYSEMULWAVEFORM, 1);
}
void CMainFrame::OnWaveformsummationGp246()
{
SwitchToView(ANALYSEMULWAVEFORM, 2);
}
void CMainFrame::OnWaveformsummationGp123()
{
SwitchToView(ANALYSEMULWAVEFORM, 3);
}
void CMainFrame::OnAnalyseWaveformdiff()
{
SwitchToView(ANALYSEMULWAVEFORM, 4);
}
void CMainFrame::SwitchToView(eview nView, int nOpt)
{
...
pnew = (CView *) new CAnalyseMultipleWaveform(nOpt);
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanxs a ton!! It works fine now. I am able to get what i needed. Thankyou so much.
|
|
|
|
|
Araj01 wrote:
am able to get what i needed.
It's all just a matter of asking the right question.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hallo,
I am creating the dsp-file vor Visual Studio 6.0 by Hand and need urgendly any documentation for this purpose.
Who can give me some links???
thanks
Reinhold
|
|
|
|