|
Hello!
Maybe someone knows books titles or papers / articles about multi-threaded software development. I mean structure development: where do I need to use synchronization or locking and where I don't need to use neither of them, and how to avoid interlocks.
Maybe there are some methods that can be used to simplify multi-threaded software development (building some diagrams or something).
I used to develop small applications with 2 threads and a few objects (that used simultaneously by different threads), but now I have to develop application with huge amount of objects managed by lots of threads. And it's hard to imagine and to envisage all possible communications and interactions.
With regards,
Pavel Krupets
|
|
|
|
|
I use the "advanced windows programming" from Jeffrey Richter and Microsoft press.
That book has a lot of examples, explanations... related to multithreading.
Hope this helps...
|
|
|
|
|
How can we call a "SDI canvas form" from a dialog box ??
ie. if we select a SDI project and we want to invoke some dialog boxes and then SDI canvas form
How to proceed ??
|
|
|
|
|
Well, I'm not really sure what you want to do ...
but
How can we call a "SDI canvas form" from a dialog box ??
sounds like you've a dialog box and from there want to open a document. If yes, this could be done by calling OpenDocumentFile from you CSingleDocTemplate that's used to handle your documents.
If you rather want to display dialogs when a document gets opened, you can implement OnOpenDocument/OnNewDocument of your CDocument derived class and invoke your dialogs.
|
|
|
|
|
I Have Visual C++ .NET Standard (version 2002, Spanish), if i create a new project (based on CView, with Print and Print Preview support), or import old VC6 projects, when i activate the print preview and then zoom in, everything seems to go OK, but if i push the 'Next Page' button, the preview moves to the left, and if you scroll down the preview, the part of the preview that appears, do it centered, so the preview is shown broken. Does anybody notice this bug or occurs only in my version of MFC 7.0 ?, Any solution?. Thanks in advance.
|
|
|
|
|
:-OI developed form on SDI canvas. Suddenly I remembered to add a dialog box before that. i.e
I need a dialog box(sort of password screen) and then that SDI form shall appear. Is there any way to do it ??
Please comment !
|
|
|
|
|
Insert your dialog code somewhere in your applications InitInstance() , before creation if the FrameWnd.
At this point is not much of the framework (like Doc, View) already running, but for a login dialog this should be no problem.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
I want to write a program need to read some doc file, but I don't have office, who can tell me how to get the text content of the word doc?
thanks
|
|
|
|
|
- suggestion 1 : try to open a .doc document with notepad. You'll figure out the content is actually clearly displayed (without all the formatting).
- suggestion 2 : use OLE/DocViewer to figure out the storage/Stream hierarchy from the .doc internal, then it's easy to grab a code from somewhere which opens a given IStorage/IStream and reads its content.
- suggestion 3 : buy a third-party lib for a couple bucks.
|
|
|
|
|
I need to insert "Control List" in SDI view . Where do I have to place code to add columns in that control List ??
|
|
|
|
|
If you mean the standard list control, derive your view from CListView , and add columns in the view's OnInitialUpdate() function.
--Mike--
The Internet is a place where absolutely nothing happens.
-- Strong Bad
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
Hi! I'm a sig virus. Attach me to the end of your sig to help me take over the world!
|
|
|
|
|
Hi friends,
I am working in VC 6.0 SDI, I am having three pages (different bitmaps as background), I am using Function keys to select the pages. I am using BitBlt function to show the Bitmaps on the screen. I am drawing on the foreground of this bitmaps. My doubt is when I switch between the pages I want to remember the content I drawn already. Can I use BitBlt function for remembering this content with my screen as source and memory as destination so that I can use this memdc for drawing. I tried but it didn't seem to work. Can any body suggest what to do??
cheers,
Satya
|
|
|
|
|
I want a nice GUI on SDI view. Is it possible to make the layout on canvas (ie adding edit , button, radio etc controls) and embedding it on view ?? Or any alternate way...
Please comment!
|
|
|
|
|
Since it sounds like you're using MFC, check out CFormView. You use the dialog editor to lay out the controls, then the dialog gets placed in a frame window.
--Mike--
The Internet is a place where absolutely nothing happens.
-- Strong Bad
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I'm adding a menu item to the IE standard context menu (See: Adding Entries to the Standard Context Menu http://msdn.microsoft.com/workshop/browser/ext/tutorials/context.asp?frame=true[^]) and I want this to launch my application. I can get it to open a HTML page stored in a resource in my application, in a HTML dialog, but that's not what I want.
What I'm trying to do is:
a) User selects text in IE and right clicks on it.
b) They choose my new contect menu item.
c) My app starts, if it isn't already running and gets the selected text.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
I do not know enough javascript so there might be another easy alternative , but anyway here is my suggestion.
You can access COM components through Javascript's createactivex method, from inside the component you can do whatever you want. I'm not sure if you can access the shell through javascript etc which should be the straight forward method.
And instead of having to execute html inside resource, you can simply put the necessary javascript in the html page and point to that location in the registry.
Let me know if you find any other alternative.
regards
Kannan
|
|
|
|
|
Hi Kannan,
Using a COM component sounds like it will work. Unfortunately this is one area I don't have any experience. I assume ATL would be the way to go, but I have done any ATL either! It wouldn't have a UI and should only be a few lines of code. Can you give me a URL where I can read about writing a COM object which can be accessed from a HTML page. I've looked around MSDN and couldn't find anything obvious.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Hi Neville,
For creating simple components, you can start with this[^] article.
Once you have the COM component, you can call it from javascript using the techniques specified in this[^] article.
If you have trouble with COM, another option that springs to mind is to create an instance of the windows scripting host(wsh), through the above technique and call the external program.
Have a look here[^] and also here[^]
Hope this helps
regards
Kannan
|
|
|
|
|
Hi Kannan,
Thanks for the detailed reply and the links, very helpfull. I had a look at WSH however I'm unable to use the WScript object from JS in a HTML page in IE, which makes sense. If I could use WScript then I could launch my app.
To my surprise though I could use ActiveXObject("Scripting.FileSystemObject") and then create and delete files and folders.
Looks like I'll spend some time now investigating the COM route. I'll let you know where I end up.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
Hi Kannan,
I've been able to build a simple COM component that gets run from javascript when the user right clicks in IE. The COM component then launches my application, so I have a solution. If you need any specific details please let me know.
Thank you very much for your help.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
1. UpdateAllViews() member function has 3 parameters. After writing a Bitmap file in the CDocument class, how will I update my view with new Bitmap using UpdateAllViews().
2. I’m writing a program to display two different outputs. A Bitmap image and some textual information in an AppWizard created MDI application. I want to display this in two different child windows that popup at the same time i.e. with out using Splitter windows.
I would also like to know whether it is possible to set sizes for these child windows.
3. How do we display the percentage completed font (in numeric values) on a Progress Bar control and update it along with the progress bar ?
|
|
|
|
|
Neel Abraham wrote:
how will I update my view with new Bitmap using UpdateAllViews().
In your CView -derived class you have a OnUpdate() -handler. In this you do whatever your View needs to do when a new bitmap comes along. Maybe resizing etc. Your view does not hold a copy of the bitmap, instead it accesses the one inthe document, so it will at once display the new bitmap.
If you happen to have more than one message to send using UpdateAllViews() , you define some so called HINTS:
const LPARAM HintNewBitmap = 1;
const LPARAM HintTwo = 2; and call
UpdateAllViews(NULL, HintNewBitmap, NULL);
and in your handler you switch on the Hint.
Neel Abraham wrote:
I would also like to know whether it is possible to set sizes for these child windows.
Sure. In OnSize() you can set the sizes to whatever you want before calling the Base-class with it.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Hi,
There is an application that comunicates with a printer through a serial interface. If i start this application, is there anyway to spy what commands have beeing sent through the used serial port?
Thank u very much,
Dirso
|
|
|
|
|
Connect serial port 1 to 2 via crossover cable.
Write program to open ports 2 and 3 and just act
like a bridge the two-- and to report on what is
sent. Then connect your printer to port 3 and
that application to port 1.
I've not had to go this far before, but I think
that should do it for you.
|
|
|
|
|