|
jhwurmbach wrote:
So, where do you use that control? I can only imagin a Edit control on
A) a dialog
B) a view or
C) modeless (but that would again be a dialog)
What are the other possibilities to place it?
I've written a custom tree control which doesn't use the MS TreeCtrl and I needed this to allow editing of tree items. The tree is on a dockable control bar in a new app I'm working on.
When I was trying to resolve this I found a post to a mailing list where the person was trying to use a CEdit in a CView and had exactly the same problem I had.
You'll see people using CEdit on Toolbars, Status bars etc. and they don't have the problem there, as these bars don't get focus!
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
This is not a specific C++ question, so if anyone suggest a more suitable board, I'm all ears.
Does anyone know of any good sorting utility? I have huge test files (20-30MB) that needs to be sorted on a regular basis. I have used a DOS program called MSORT, but this takes ages to finish,
and has no batch processing facility.
Any suggestions welcomed.
"..Even my comments have bugs!"
Inspired by Toni78
|
|
|
|
|
But first of all, what is the topology of your file ? What have to be sorted ? Is the file binary ? Ascii ? Is it numbers to sort ? Strings ?
Is it a data base file ? DBF ? MID ?
Try to cut your file in more little parts, it is easier to manage. Then write your own program with sorting algorithms you may find on the CodeProject site (use the Search engine)...
Kochise
In Cod we trust !
|
|
|
|
|
Kochise wrote:
But first of all, what is the topology of your file ? What have to be sorted ? Is the file binary ? Ascii ? Is it numbers to sort ? Strings ?
The files are Plain text ascii files. These files contain respondent data that needs to be sorted by an identifier (serial number, but possibly alpha-numeric).
"..Even my comments have bugs!"
Inspired by Toni78
|
|
|
|
|
Are the lines fixed length? If so, I might have something at home that handles huge files by reading in the "key" elements and line numbers, sorting them, then reading and exchanging data in place in the file, which I did as a pure 16-bit DOS app many moons ago. If not, it's trickier, since you have to store start and end offsets too, so it would need some more work.
By batch, I presume you mean it cannot be driven from the command line...
Steve S
|
|
|
|
|
Hi,
The following code to create a window,hangs the application(It keeps on sending WM_PAINT message)
LPCTSTR m_lpszGammaClass = AfxRegisterWndClass( CS_VREDRAW | CS_HREDRAW,
::LoadCursor(NULL, IDC_ARROW),
(HBRUSH)::GetStockObject(NULL_BRUSH),
::LoadIcon( NULL, IDI_APPLICATION ) );
GetDlgItem(IDC_STATIC_FRAME1)->GetWindowRect(&the_rect);
ScreenToClient( &the_rect );
CCYGImages the_image;
if(!m_image)
m_image.Create( m_lpszGammaClass,
"",
WS_CHILD|WS_VISIBLE ,
CRect( the_rect.left, the_rect.top,the_rect.right ,the_rect.bottom ),
this,
IDC_STATIC_FRAME1 );
One strange things is if i make the class as a local variable it is fine.But if it is a member variable it hangs. I am using that object anywhere else.
Regards
Neha
|
|
|
|
|
From MFC's AfxRegisterWndClass you set a pointer to some internal memory buffer where the NULL-terminated name of your new WndClass is located.
You do not know where that buffer is or when it will go away. So, if you need the name later, simply store it in your own CString:
In the .h-file:
CString m_GammaWindowClass;
In the .cpp:
m_GammaWindowClass = AfxRegisterWndClass(...)
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
I am develop one program that load jpeg image into picture control (CStatic) and then cut portion of the image, I can cut it but I can not save it into a new file name.
Here the code I use to load the image;
if (m_image.Load(m_SavePath) == S_OK)
{
m_CPicture.SetBitmap((HBITMAP)m_image);
//m_Cpiture is the variable of picture control(source)
//m)image is a CImage class
}else{AfxMessageBox("File not found or invalid format");}
Code I use to cut it;
CDC *mycdc;
mycdc=m_DestPic.GetWindowDC();
//m_DestPic is a variable of picture control(destination image)
m_image.StretchBlt(mycdc->m_hDC,1,1,300,400,25,25,300,400,SRCCOPY);
or I can use a quite long code like this;
CpicturetestDlg *CpThis;
HDC hdcDest,hdcSrc;
CpThis = (CpicturetestDlg*)this;
hdcDest = ::GetDC( CpThis->m_CpDest->GetSafeHwnd() );
hdcSrc = ::GetDC( CpThis->m_CpSource->GetSafeHwnd() );
::SelectObject( hdcSrc, CpThis->m_BackSurface.hBmp );
::StretchBlt(hdcDest,0,0,300,400,hdcSrc,pointlx,pointly,cutwidth,cutheight,SRCCOPY);
::BitBlt(hdcDest,0,0,300,400,hdcSrc,pointlx,pointlx,SRCCOPY);
::DeleteDC( hdcSrc );
::ReleaseDC( CpThis->m_CpDest->GetSafeHwnd(), hdcDest );
In this code I know that the hdcDest store the cutting image.
I need to save this image that already cutted. How to do it?
Is it possible to dump hdcDest into CImage? if possible this can solve this problem.
Is it anyway to cut the image? Could some one please help me to solve it?
Thanks
|
|
|
|
|
Hi,
I have a class CXImage and i had derived 2 objects namely image1 and Image2 from that class.In this class OnPaint() function goes like this:
OnPiant()
{
CDC *dc=GetDc();
If(/*image 1 loaded*/)
//Display the image 2 through BilBlt();
If(/*image 2 loaded*/)
//Display the image 2 through BilBlt();
}
Now first i load the image 1 ,it displays the image properly.
Now i load image 2 ,it won't displayed in the image 2 window,Eventhough i have explicitly given Invalidate() for image 2. If i minimize and maximize i can see the image in both the windows.
How can i paint both the windows simultaneously?
Regards
Neha
|
|
|
|
|
CPaintDC dc(this);
dc.DrawWhatever();
Is what you should be using instead of GetDC() . The CPaintDC constructor prepares the window for drawing according to the docs (Begin/EndPaint basically).
Note that if you use GetDC() anywhere else you should also release the DC by calling ReleaseDC(dc) ;
--
Ich, du, sie, er, es, ihr, sie, Sie.
|
|
|
|
|
Hi Dears
I've created a VC++/ATL Com Add-in for MS Outlook, to delete mail attachments.
Now please guide me how to make Installation Program to load ATL Com Add-in(.dll) with MS Outlook ? so that the user with no Visual Studio can also use the add-in.
Please guide me ..............
I'll be very grateful.
Kind Regards
Atif (abqau@hotmail.com - abqau@yahoo.com)
Watch Your Thoughts for they will become your actions.
Watch Your Actions for they will become your habits.
Watch Your Habits for they will become your beliefs.
Watch Your Beliefs for they will determine your destiny.
|
|
|
|
|
How do I write
<br />
ActiveChart.SeriesCollection(1).XValues = "={""Date <br />
08102003"","" Date 08102003""}"<br />
in MFC?
Here is my code for the chartwiz..
<br />
this->m_xlChart->ChartWizard(var,
COleVariant((short)3),
COleVariant((short)2),
COleVariant((short)2),
COleVariant((short)0),
COleVariant((short)1),
COleVariant((short)TRUE),
COleVariant("MyChart"),
COleVariant("Date"),
COleVariant("UNITS"),
covOptional<br />
);<br />
Basically I want to change Category (X) axis labels to something other then 1, 2, 3... etc.
Sincerely,
Mardigin
|
|
|
|
|
Disregard, I just solved this problem. Silly me.
Here is the solution if anyone is interested.
<br />
<br />
xlSeries = this->m_xlChart->SeriesCollection(COleVariant((short)1));<br />
<br />
VARIANT vResult;
VARTYPE vType;<br />
<br />
DISPID dispID;
unsigned short *ucPtr;
ucPtr = L"XValues";<br />
HRESULT hr = xlSeries.m_lpDispatch->GetIDsOfNames(<br />
IID_NULL, &ucPtr, 1, ACCESS_PROPERTY_GUID, &dispID<br />
);<br />
<br />
CString lpszNewValue= "={""Label1"",""Label2""}";<br />
<br />
if(hr == S_OK)<br />
{<br />
xlSeries.SetXValues(COleVariant(lpszNewValue));<br />
}<br />
Sincerely,
Mardigin
|
|
|
|
|
Mardigin wrote:
CString lpszNewValue= "={""Label1"",""Label2""}";
In C++, to insert a "" " character you have to use "\" ", not """ " like in VB.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
How can I export a Func ,object and so on in Dlls .I want to create a Dll for PB .i think it's very easy to you,but it's very hard to me ,because i come from china ,my mother lauguage is chinese .
can anybody help me ? give me an example .
Thanks
Hellin
|
|
|
|
|
Could anyone help me ? I really really come from china.
|
|
|
|
|
Try something like...
(This comes from a wrapper around the NetUserAdd function)
Declare your function / routine like this...
extern "C" int __declspec(dllexport) AddUserAccount( LPSTR domain, const char *acct, const char *pass, const char * comment)
|
|
|
|
|
Hi ,Judd
Thanks a lot .What is the "__stdcall" different from the "__declspec" .I am trying ...I think my enlish is very bad .are you American?
Good luck
Hellin
|
|
|
|
|
No problem,
"__stdcall" and "__declspec" are calling conventions, and effect how argumetns are passed (e.g. by ref or by val) and also how they are 'decorated' when externalised.
You might find some use reading here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_core_adjusting_naming_conventions.asp
(I'm actually English and since you are talking about __stdcall are you doing mixed language with FORTRAN by any chance?)
|
|
|
|
|
Hi, buddy
That all right .a Func of DLLs for PB must be de Declared like this "__stdcall" .Others don't work .do you understand me ? My craft brother.
Thank you very much .
Hellin
|
|
|
|
|
Hi,buddy
Sorry ,i will go to the class.I must leave .
see you
bye
hellin
|
|
|
|
|
hi
i need some information related to indigo press devicess , the factors on which the efficency of these devices depends (w.r.t development point of view)
regards
ab
|
|
|
|
|
Ok since VS2003 i have a new References folder in every of my (Native-) C++ solutions.
Now frankly i have no idea what this is for. I'm familar with references in the managed envirement and for web services, however two oddities :
1) If i have a multi project solution it offeres me to add one project as reference of another. Nice but what does that do.
2) If i select browse it lets be browse for "Component files". What the hack is a component file.
I dreamed for a long time for some sort of component system in c++ where i can pack my different mini projects in a zip file including all source and a make file like xml and than just drag drop them on the project i'm working on and it will be included in the build process. Is this new reference folder anything which comes close to my wish ?
|
|
|
|
|
I may be starting an application before long which will receive digital audio streams, and then run these streams through an algorithm before passing the streams back out of the application (sort of a filter). I've not really processed digital audio streams before, and I'd like a reference to begin with. I am best with C++, but I'm not against using some other language like BASIC if it is necessary, but I'd prefer to stick with what I am the most comfortable with. If anybody has experience with receiving and processing digital audio streams, could you please guide me with a book or two that would be a good starting point to learn from? I'd greatly appreciate it. Thank you!!!
Douglas A. Wright
dawrigh3@kent.edu
|
|
|
|
|
If you are doing this on a Win32 platform. You should probably look at DirectX DirectShow. If you download the SDK there are a bunch of Audio Filter Examples. DirectX has a comprehensive framework for encoding, decoding and transcoding media streams.
|
|
|
|
|