Visual C++ :: Paragraph Formatting And Justification
Aug 6, 2014
I am using CRichEditCtrl in a dialog. I want to have auto wrapping off and paragraph justification as center or right. To turn off auto wrap i used SetTargetDevice which worked fine but the justification changed to left automatically. I tried to use SetParaFormat after setting the SetTargetDevice but unable to make the justification center or right when auto wrap is off.
I made a fibonacci series with label above it now how to put the label after the first layer because as you can see in the screenshot the label is continuous.
I have a 3x3 array which is filled up of random numbers, the limit being set by the user. So if the user chooses 3, the array will be filled up of 1s, 2s and 3s randomly. That bit is fine.
So when I display the array I use:
Console.WriteLine("The values in the 2 dimensional array are: "); foreach (int number in twoDimensional) Console.Write(number.ToString() + " ");
The output will then be 3 3 2 1 3 1 2 3 3. Is there a way I can display it like:
I'm trying to write a short program that takes the input from a user and trims any leading/trailing white space, and then checks how many words are in the string. Problem is, I'm only allowed to use stdio.h and stdlib.h. How can I accomplish this? Also, how would I check if any of the characters which were entered aren't either a number, letter, or '-'?
The project is about reading data from PIC and display the data on the dialogue created by the MFC GUI of Visual studio 2010. There are 4 data need to be displayed (2 weight and 2 angle). the data will be display on the edit control box on the dialogue.
I have try to solve the COMPort and Readdata issues many times, but I'm fail. I have read many sources and implement the source codes... They are never work....
The detail about the issues that I need to solve is clearly mentioned on the main dialogue.cpp. Take a look to an uploaded zip file that I have attached.
I heard that you can't use it with express, but that doesn't seem right... Can you use it with Codeblocks, at least? I just hate the Qt Creator IDE. I don't like the UI... all I want to do is code Qt. I don't care much for the GUI editors.
I am trying to create a OCX from a C++ dll., Here's the scenario I have a C++ dll and this dll needs to be called in VB.net program my boss want's me to create an OCX out of this.
C++ dll and use it in a VB.net class library, apparently I have created an OCX but it requires a form but the VB.net program is a class library.
In a C++ project, I need to call a C# created COM object (as a .dll)
Is there a way to use such a COM object without having it be registered in the registry?
The C# COM dll is just a "go between" our C++ code and a .NET library, there's no "COM contract" of any kind, the COM interfaces change each version. The fact it's COM and needs registration is annoying because it makes it hard to have multiple versions of our software installed (needed under some circumstances) and running at the same time.
I'd like a way to not have any registration at all. And just be able to do a LoadLibrary("c:TheRightPathcom.dll") of the right dll and then get going from there.
I had tried to use something appropriate founded on CP, but they are using DrawItem, and I had problems with windows style, and I had tried to make myself one, overriding OnPaint, but I front with flickering (I put the sample below)... so, I wonder if I could get (from somewhere) CSplitButton and add to my project ... if you say that I could, can you provide me the CSplitButton source code ? I mean, only .cpp implementation file ...
I have an assignment where I need to go through all the files in a folder. For each file I need to know each unique file extension, how many files for each unique file extension, and the total size for each unique file extension. I have to be able to sort through this using either the file extension or the total size of the file extension. The first thing I thought of using was a map. This will keep track of each unique file extension and the amount of times that file extension was found. How do I now associate the total size of the file extension to my map? So for example I need the output to be something like this:
Using file extension for sort .cpp : 1 : 3400 .exe : 3 : 3455600 .mp4 : 25 : 200000404
Using total file extension size for sort .mp4 : 25 : 200000404 .exe : 3 : 3455600 .cpp : 1 : 3400
I got a program from somebody. He had its initialization to run his program but never bothered to save the data for later use. Now I wanted to add the New, Open, Save, and Close to it, so I add OnNewDocument ahead of his program. It crashed every time I ran it.
Shall I include his initialization in the OnNewDocument? If I can not separate the initialization part from his code, e.g., they come in as dll, what shall do?
Is it possible to create an app that can be saved on my desktop that can be used with an excel file that is saved on my desktop? I have opened VS 2010 and I have created a form design that has a button for every sheet name in my excel file. All of the sheet names are hidden with the exception of one. When a button is pressed on the c# form, I would like for that sheet to be shown in excel. Then once the updates have been made to that sheet in excel, I want a button to be at the top of the excel worksheet that will hide that worksheet again and return to the form c# form...can that be done?
I'm compiling some open source code (originally written for Linux / gcc) which uses the following line to determine if a particular section is being compiled for an x86 processor:-
Using mfc I have an application where I'm not allowed to use a mouse and alt+tab will be regularly used. Using alt+tab to come back to my application kills the focus in the view. Once my application comes back to the foreground how can I set the view as the focus?
My question contains two projects that are under the same solution.
Project_1: I have created a dll where I use inside the project, OLE Db Template. In the project, I use this code.
class MyClass { public: LONG _value1; SHORT_value2; BEGIN_COLUMN_MAP(Accessor)
[Code] .....
Project_2: Is a project testing the Project_1.
- I want to call one of the exported functions. - In Linker/Addional Dependencies, I have added the .lib - In Linker/Additional Libray Directories, I have added the directory where is the lib. - In C/C++/General/Additional Include Directories, I have added the directory on project 1. I did that because I want to #include a header in Project_1. But, when I do that, I get:
I wrote a routine in one C++ file and I decided to break it up into some smaller more manageable C++ files. When I copied the variables out of the first one and into the new smaller file (same solution), everything compiles fine but I get a ton of linker errors saying the variables have already been defined in another (the previous) file. Using Visual Studio 2008.