|
thanks
|
|
|
|
|
hi there...
well im new 2 vc so bear my kiddish query
i have an SDI and have a variable of CString in CDocument...
my view class is of type CEditView and i want to save the
contents typed in the edit view in my doc CString variable and then this variable to disk using the file_save button on the toolbar...
thanx in advance
|
|
|
|
|
Hi, can i know how to use median and averaging filter? My program now can capture real image using digital camera. But how do i reduce the noise using averaging and median filter?? I'm beginner to this and do not know what the filters are for. Please help. Thanks Alot!
Regards,
Michelle
|
|
|
|
|
|
I was just pondering one day ....
Well anyway, how would one go about coding a boot disk, like the win98 boot disk, lilo, norton ghost, etc. What kind of code would be necessary so that the system doesn't give an Invalid System Disk Error?
Well what do you know...I ended up finding something already. Heh. Fugetaboutit!
Stephen Caldwell
Blackfission, CEO
http://bf.steffc.yi.org:81
|
|
|
|
|
|
From a DOS/Win3.1/Win95/Win98 machine, do a "format a: /s"
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Ok, I'm wanting to have VC++ go to open a file and go to a particular line in the file... the filename and line number will be sent from an *external* application.
So far, my idea was to write a VC++ add-in that opened a named pipe at waited for a message from the external app. (If someone has a better suggestion, please let me know...) Here is my problem:
In CDSAddIn::OnConnection(...), I create a new thread with AfxBeginThread(...) that makes the pipe and waits. After receiving the message, the pipe calls a new function in the CCommands class, which in turn should open the passed file and go to the line as so:
STDMETHODIMP CCommands::OpenAndGoTo(BSTR szFilename, int nLine)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
IDocuments* pDocuments = NULL;
m_pApplication->get_Documents((IDispatch**)&pDocuments);
// open the file
ITextDocument* pDoc = NULL;
CComBSTR bstrFileName = szFilename;
CComVariant vtDocType = "Text";
CComVariant vtReadOnly = FALSE;
pDocuments->Open(bstrFileName, vtDocType, vtReadOnly, (IDispatch**)&pDoc);
// TODO: go to the line number
return S_OK;
}
Everything works fine until the call to pDocuments->Open(...), which crashes with an unhandled exception: access violation error. The really weird thing is, the exact same function works perfectly fine when called from somewhere inside the main thread (i.e. if I call the function from the CDSAddIn::OnConnection(...) function, everything works perfect). It only crashes when I call the function from the created thread. Any ideas as to why?!
Thanks for your help...
~ Stevo
|
|
|
|
|
I'm actually having a similar problem but not with add-ins.
I have an MFC application that has the Python interpreter embedded in it. We use Python to script our automation stuff. When I had the script running in the main thread, I could automate all the framework stuff (opening files, changing the views, etc). When I moved the script into a worker thread, all of a sudden all my framework manipulation started throwing weird access violations. I traced them down and it looks like the framework is asserting when it goes to touch one of the windows. It looks like the hWnd is null or bad or different or something.
I get the feeling that the MFC framework has issues with multi-threaded access to its internals.
If you figure it out, please let me know.
J
|
|
|
|
|
dear all VC++ programmers. i'm a bigginer VC++ programmer, my first MCP in the MCSD for VC++, which is Desktop applications, will be next monday.i have 9 questions need answer and i don't know thier answers so could any one please help me an answer these questions.
here you are the questions.
1 – you want to use a form view in your MFC-MDI application. You add a close button to the dialog resource that will be used with the form view. You then add to the form view class a button click handler for the close button you want the button click handler for the close button to close MIDI child window that contains the form view.
What must you do in the button click handler of the close button to accomplish this goal?
A. Post the WM_CLOSE message to the form view.
B. Call the DestroyWindow function in the form view.
C. Post the WM_CLOSE message to the parent frame window of the form view.
D. Call the DestroyWindow function on the parent frame window of the form view.
2 – your program uses a COM component. The COM server object has returned a standard HRESULT with a severity field of 1. you want to present to the user a message box explaining what the returned HRESULT means. You need the message string corresponding to that HRESULT.
How must you obtain this string?
A. call OutputDebugString.
B. Call FormatMessage(FORMAT_MESSAGE_FROM_STRING,…);
C. Call FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,…);
D. Call GetLastError.
3- you are using VC++ to create COM component that will scan files for conformance to validity constraints. The component might be used by many client programs at the same time. To avoid duplicate scanning, the component maintains an internal list of files it has scanned. The component does not persist this list when it unloads.
Which type of COM component should you create?
A. active document.
B. ActiveX user interface control.
C. Out-of-process COM server component.
D. In-process COM server component.
4 – you are the administrator of the Microsoft Visual Source Safe database for you company’s main software product. You want to retrieve the code tree from the previous day and rebuild the entire project on a clean system. Only one file has been changed since yesterday. You want to retrieve the code tree from the previous day while preserving today’s changes to this file.
What should you do?
A. Click Show History for the changed file, click Pin, and then click Get Last Version for the project.
B. Click Show History for the changed file, click Rollback, and then click Get Last Version for the project.
C. Branch the project, click Show History for the changed file, click Rollback, and then click Get Latest Version for the project.
D. Branch the project, click Show History, click Pin, then click Get Latest Version for the project.
4 – you want to restrict the size of s frame window in your VC++ windows-based application. You add code to handle WM_SIZE message.
The frame window is now initially displayed in a large frame, and then it snaps to the correct size. In addition, auser can drag the frame to any size while holding down the mouse button.
How should you restrict the size of the frame window?
A. Add the code that restricts the frame size to the WM_GETMINMAXINFO message handler.
B. Add the code that restricts the frame size to the AdjusWindowRectEx function.
C. If the unadjusted frame window too big, resend the WM_SIZE message at the end of the WM_SIZE message handler.
D. Add the code that restricts the frame size to the ON_WM_CREATE message handler.
5 – your company maintains a library of documents in a proprietary format on the intranet. You write an active document component to edit documents of this format.
To manage these documents, you will run the component in Microsoft Internet Explorer on your company’s intranet. When a user clicks a link to one of these documents, Internet Explorer will automatically launch your active document to edit it. You want to obtain in the active document the URL of the document that Internet Explorer has activated.
What must you do?
A. Call the Imoniker::RelavtivePathTo method.
B. Implement the IoleLink::GetBoundSource method.
C. Call the IoleClientSite::GetMoniker method.
D. Call the Imoniker::GetDisplayName method.
E. Implement the IoleObject::GetClientSite method.
6 – you write an ActiveX user interface control by using VC++, the control has a number of properties. You want to accomplish the following goals:
1. Display the available properties on property pages of the control.
2. Allow access to the control properties from Microsoft Visual Basic.
3. Constrain some properties to predefined values.
4. Load ambient property values from the control container.
5. Indicate which user interface element of the control receives focus when the control is loaded.
You implemented the IpropertyBrowsing interface on the control.
Which result or results does this action produce?(choose all that apply)
A. Display the available properties on property pages of the control.
B. Allow access to the control properties from Microsoft Visual Basic.
C. Constrain some properties to predefined values.
D. Load ambient property values from the control container.
E. Indicate which user interface element of the control receives focus when the control is loaded.
7 – you are implementing a COM component by using ATL. You paln to use ATL features wherever possible. You want to allow other COM components to reuse your component by aggregating it.
Which three things must you do?(choose three)
A. Declare an internal reference count for the component.
B. Declare a pointer to the controlling Iunknown interface.
C. Override the FinalConstruct method.
D. Override the FinalRelease method.
E. Override the IclassFactory::CreateInstance method.
F. Add the DECLARE_CLASSFACTORY2 macro to your class.
8 – you write a COM component by using VC++. The component supports the ImangeSales interface, which your company has defined. The component is designed to support aggregation, and it provides a class factory object.
A client object males a call to the CreateInstance function of the class factory object, requesting an instance of the ImanageSales interface. The client object passes a non-NULL pointer to the controlling unknown as a paramater of the CreateInstance call.
Which value must your component’s QueryInterface function return?
A. a pointer to the ImanageSales interface.
B. A pointer to the Iunknown interface.
C. A NULL pointer.
D. CLASS_E_NOAGGREGATION.
E. CLASS_E_CLASSNOTAVAILABLE.
F. S_OK.
9 – a real estate company hires you to develop an application to display homes that are available for sale. You create an ActiveX user interface control that allows the broker to enter a postal code. The application then displays a map of the appropriate area. Homes that are for sale are highlighted on the map. The application sets its color scheme independently of the Control Panel color settings. You want your control to follow the color scheme of the application.
Which two things must you do to accomplish this goal?(choose two)
A. Implement IoleControl::SetColorScheme.
B. Call Idispatch::Invoke(DISPID_AMBIENT_BACKCOLOR,…).
C. Implement IoleControl::OnAmbientPropertyChange.
D. Call IoleControlSite::OnControlInfoChanged.
E. Implement IoleControl::GetControlInfo.
Assem Abdel Maqsoud
C/C++ programmer
|
|
|
|
|
So let's see if I get this right.. you're a beginner, but you want people to pay you like you're experienced - so you try to get the MS "certification" that supposedly tells the world you know what you're doing.
But you don't know what you're doing - so you come to us for help. Is that right?
|
|
|
|
|
You took the words out of my mouth. I was just going to add a bit about how hard can it be to get one of these things when every serious developer owns the books that contain this sort of info and it would appear you get to see the questions beforehand.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
You took the words out of my mouth.
There could be a song in there you know.
I saw this post earlier but was too lazy to take the piss. Knew you would come along and not be able to resist. Also thought you could do with the post to get your numbers up.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
"Don't belong. Never join. Think for yourself. Peace"
- Victor Stone
|
|
|
|
|
I love the comments below, someone who cannot spell or log in is worried their efforts in getting an MCSD will be 'devalued'. My favourite is people who insist on being known as an MVP, which basically means they passed one measly exam at some point. Big fat hairy deal. They have an exam in Frontpage for goodness sakes.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Hey man - don't knock us MVPs, OK?
cheers,
Chris Maunder (CodeProject)
|
|
|
|
|
You are an MVP?
Cool!
I didnt know that. Most MVPs put that as part of their signature. First time I am seein an MVP who doesnt do that
Nish
Sonork ID 100.9786 voidmain
|
|
|
|
|
That's the comment that cost me a T-Shirt, isn't it ?
Seriously, I don't care if people are an MVP, only if they make a huge deal out of it as if it were the equivelant of a degree in terms of effort and achievement.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Actually, since this thread came up I thought I'd ask this question:
Can I post all of my projects here and have other people do them for me so I can get paid for other peoples work?
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Sure you can! And we promise to write fully debugged code with no bugs or back doors
cheers,
Chris Maunder (CodeProject)
|
|
|
|
|
... and what about a delivery of reasonable amount of beer along with code?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
to: Jon Hulatt
Of course and here you are another benefit, send me your mam’s address and I’ll f*** her for you so get two instead of one first you got your projects done. Second, which is the most significant, you will get your mam’s f***ed as she never dreamed of.
Assem Abdel Maqsoud
C/C++ programmer
|
|
|
|
|
I will own up to it. I did not log in because I was on another computer and didn't realize I hadn't logged. Is value added to the comment by logging in?
Merriam-Webster
Main Entry: de·val·ue
Pronunciation: (")dE-'val-(")yü, -y&(-w)
Date: 1918
transitive senses
1 : to institute the devaluation of (money)
2 : to lessen the value of
intransitive senses : to institute devaluation
|
|
|
|
|
this is not to replay your request
this is to replay the replies u got
to all of who call themselves programmers or developers
i thought this site is for helping people who need help or answers
if u do not care or know how to help others why do u even visit such a site.
u know what
i think non of u know a single answer for anything
Just go and f*** online I pet it’s the only thing u can do
so visit sex.com or something but don’t disturb us here idiots.
f*** u all :P
gigi
gigi
|
|
|
|
|
this is not to replay your request
this is to replay the replies u got
to all of who call themselves programmers or developers
i thought this site is for helping people who need help or answers
if u do not care or know how to help others why do u even visit such a site.
u know what
i think non of u know a single answer for anything
Just go and f*** online I pet it’s the only thing u can do
so visit sex.com or something but don’t disturb us here idiots.
gigi
gigi
|
|
|
|
|
I knew the answer to two questions off the top of my head. This site is for helping each other learn, not for giving answers to people who don't even try.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|