Hello i am Mujtaba having problem in a visual c++ program. In that program i have used liberaries means(abc.lib etc) from path where it is stored.When i execute program it compiles sucessfully but on running give this error
LINK:fatal erro LNK1104: can not open file "C:\Program.obj"
My program is a multi monitor application . I want to set the other monitors as extended screen of the primary screen in program when I need . I know it can be done in windows control panel ,but I hope to do it by myself. I don't know how and where to find the api to do that.
Any suggestion for me?
I read some articles about docing control bar. But that isn't what i need.
I create a modeless dialog in mainframe. it is fixed size (for example 128*128), and on top of all childframe(views). I hope the dialog has the docking capability to align itself to some corner of the mainframe. But don't know how to do it.
I try MoveWindow to 0, 0 (left corner of mainframe), but it cover the toolbar!
the client rect of mainframe including the area toolbar accupied. But childframe is smart to know the right size and position when it resize to largest. How can childframe know the exactly free space in mainframe?
Any suggestion for me?
sorry, what i wanna is just a modeless dialog not control bar.
I write a large image's browser. There is a modeless dialog which show the overview of whole image. It is on top of all the views. Its size is about 200*200, if I take a docking control bar, it will take the space 1024*200 that waste two much space.
It just like photoshop, the panels of all kind tool on top of image. But I wanna my modeless dialog has a docking capability.
In fact, it is also acceptable to make this dialog just on the left corner of the free space in mainframe. But I need the rect in the mainframe beside the toolbar, for GetClientRect doesn't get rid of the space toolbar occupied.
Alex Ngai wrote: I changed the outs, which is ofstream object, to cout <<.
It works, but I don't know why.
ofstream is used to output to a file. Since you didn't specifically call the constructor for ofstream, it used the default constructor which does nothing, so output to it goes nowhere. cout is the pre-opened stream for writing to the screen (the "console").
How about you read each line and store it in an array of lines.
As you read each line, shuffle the existing lines through the array and read in the current line.
That way you will always have the last 4 lines in your array.
When you reach the end, just display the contents of your line array.
Be aware that your file may not have 8+ lines. It might have only 2 or it might have six (resulting in the two middle lines being printed twice).
You will have to check for this.
If sex is a pain in the ass, then you are doing it wrong!
I face some trouble in set the window's size. It seems MoveWindow set the size of whole window including the header. But I try to set the window has the exact client size I want, for example 128*128. How can i realize it?
i don't know if it is the right place to go with this question but mayby somebody will help me. i need to check if control(button,window,desktop icon etc.) i going to click with right mouse button, has context menu or not, and of course i have to do it from my programm , not just by clicking this control. Unfortunatly api getmenu() is no use here.
i will by greatful for any help.
I've got a situation where I would like to be able to OpenPrinter(...), and then be able to AddPrinter(...) using the configuration from the First printer.. Thereby duplicating the printer (with a different name), but keeping all the configuration on Windows2000.
Has anyone done anything like this before, or am I going down a dangerous path?
I am trying to use the MM_ISOTROPIC mapping mode with a CScrollView. I keep getting the "Error: must call SetScrollSizes() or SetScaleToFitSize() before painting scroll view." message. To work around this I put a call to SetScrollSizes in my OnInitialUpdate() method. With this call I set the mapping mode to MM_TEXT and size to 100 x 100. I reset the mapping mode in OnPrepareDC to MM_ISOTROPIC and use the SetWindowExtent and SetViewportExt to get the right part of the document to show. This prevents the error but does not show any scroll bars?
Does any body use MM_ISOTROPIC with a CScrollView or know of a demo/sample that does this.
I would like to have single instance app that does the write
thing on XP. If some user tries to start the app and it is
running, the bring it to the front otherwise start new instance.
Also if a differnet user starts the app then they should get there
own instance. Anyone know of any place to read up on this behavior.