Visual C++ :: PDF Creator Printer - Setting Print Options

Apr 12, 2014

I am using PDF Creator printer to print my files. I have set it as default printer. It displays two dialogs .. "Printer Setup Dialog" and "Dialog asking filename and other details to save to file".

I want to avoid these two dialogs. But EndDoc calls the other dialog by default. How to do this ?

View 13 Replies


ADVERTISEMENT

C++ :: Setting Up Menu (With 4 Options) As A Function

Mar 4, 2014

I am having problems with setting up a menu as a function. The point of the menu is to display a list of 4 options and the user is supposed to choose one option and then the program will run. I am having trouble understanding how to display the menu once I run it because it is not working.

#include <iostream>
using namespace std;
int menu(int ans); // function declaration for menu
void draw_triangle(int size, char ch); //function declaration for triangle
void draw_downtri( int size, char ch); // function declaration for upside-down triangle
void draw_diamond(int size, char ch); //function declaration for diamond

[Code] ....

View 1 Replies View Related

C++ :: Turbo Code To Print String Through Installed Printer

Nov 10, 2013

C++ Code To Print String through Installed Printer. How to user Printer File Name?

View 9 Replies View Related

Visual C++ :: If Else Statement Displaying Both Options

Oct 21, 2013

I am new to coding and have a question with my if else statement. This is a VERY simple program that I have made something like in Javascript before, but when I do it in C++ it does not work correctly. It displays both the options. Here is my code.

// Practice.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
// Asking for a number {
int x;

[Code] ....

View 14 Replies View Related

Visual C++ :: Printer Left Margin

Jun 28, 2013

I have code that prints.

PrintDlg.
StartDoc
StartPage
TextOut
EndPage
EndDoc

I am trying to calculate left margin from (inchis * 100) to pixels. So the left input for TextOut will be correct. How do I do this?

View 8 Replies View Related

Visual C++ :: How To Find Printer Resolution From GetDeviceCaps

Dec 6, 2012

I have written a program to capture signal from machine and display it on screen in the form of sinosoidal wave. I have print buffer for 256 X 400 pixel strip chart. This prints fine if I set page size A4 and resolution 600 DPI. If anyone changes print parameters , there is problem. I can resize the printer buffer and interpolate the stored signal.

My problem is , how to find the printer resolution from GetDeviceCaps ? how to know the Print Type Normal / Draft etc in mFC.

View 2 Replies View Related

Visual C++ :: Setting Icon Of Exe File?

Oct 9, 2013

I have a MFC dialog project, I move all the icons including the IDR_MAINFRAME icon into a resource-only DLL, so there is no icon embedded in the executable file. In the dialog initialization, the dialog loads the icons using LoadIcon(hResdll, MAKEINTRESOURCE(IDI_MYICON))). The icons shows correctly on the dialog.

But in the Windows Explorer, the icon of the .exe file is not the icon of IDR_MAINFRAME, I check the resource file in the resource-only dll project, the ID number of the IDR_MAINFRAME is the lowest one of all icon ID numbers. I also try

Code:
SetClassLongPtr(m_hWnd, GCLP_HICON, (LONG)LoadIcon(hResdll, MAKEINTRESOURCE(IDR_MAINFRAME)));

But it doesn't work. The IDR_MAINFRAME icon doesn't show in the Explorer window, the system provides a default icon for the .exe file.

View 4 Replies View Related

Visual C++ :: Setting Slider Position Programmatically?

Jan 31, 2014

I have a problem to set sliderposition programmatically. This is my try:

//pointer to my slider control:
// On the begining the range ist 1 to 10
// and the position is on 5
// change the range:
pSliderCtrl->SetRange(1, 100); // ok no problems

Now, how to "move" btw. how to redraw the position of the slider thumb programmaticaliy with c++? Need to send some message, if yes what message i need to send to slider control to move (reposition) the slider thumb?

I try with
// first:
::SendMessage(pSlider->m_hWnd, WM_NOTIFY, TRBN_THUMBPOSCHANGING, 0);
// then with:
::SendMessage(pSlider->m_hWnd, WM_NOTIFY, NM_RELEASEDCAPTURE, 0);

but nothing happens?

View 2 Replies View Related

C/C++ :: Setting Up GLFW In Visual Studio 2013 Correctly?

Feb 27, 2015

I believe I set up everything correctly. I linked the library folder, the includes, and included the libraries needed. It still comes up with an error that it can't find the functions or something like that.

The error:

Do I need to include the DLL some way? I tried adding it to the build directory and the EXE directory, but it did not work. My code is just a small test.

#include <GLFW/glfw3.h>
#include <cstdio>
#include <cstdlib>
int main() {
if (glfwInit() == false) {

[Code] ....

View 6 Replies View Related

Visual C++ :: Unable To Find Setting For Exception Handling In MFC

Jan 24, 2013

My MDI Project(VC++2010 Professional) is unable to catch errors ,though I return ,try catch block. So I developed simple dialog based application .Placed one button on Dialog and on its click written following code

Collapse | Copy Code
void CMFCExecDlg::OnBnClickedButton1() {
try {
int j = 0;
int i = 10/j;
}
catch(CException * e) {
MessageBox(_T("Hello"),_T(""),MB_OK);
}
}

But still program control does not come in catch block it simply gives error. I tried all child classes of CException but no use.I think there will be some setting in Visual Studio. How to handle exceptions

View 1 Replies View Related

Visual C++ :: MFC GUI-setting COMPort And Read Hex Data From Pic (ASCII)

May 22, 2014

I want to setup my MFC-based dialogue "IDD_LOADCELL" with serial communication so that when that dialogue is pop up, the data from PIC (external device) which is in hex file format is display on the edit control box on the dialogue. The variable name of the edit control box is "m_loadP "and "m_loadT1". type of variable for both are string. I want to get the code for the COMPort setting and reading the data from pic and finally display it on the edit control box created on the dialogue.

View 11 Replies View Related

C++ :: Library Not Found In QT Creator

Jan 23, 2015

I am trying to link OpenCV to my qt project, but for some reason it doesn't seem to able to find my files. my .pro file looks like this

QT += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = opens
TEMPLATE = app
INCLUDEPATH += /usr/local/include
HEADERS += mainwindow.h
LIBS += -lm -lopencv_core -lopencv_highgui -lopencv_video -lopencv_imgproc
SOURCES += main.cpp
mainwindow.cpp
FORMS += mainwindow.ui

I get the error message saying library not found for -lopencv_core and it is the same for the other ones.

I've been following this guide : [URL]

What is going on?

View 4 Replies View Related

C :: Labyrinth Creator Does Not Work Properly

Dec 16, 2013

this programm should in theory create a labyrinth but it doesnt and i really dont have the skill to pick up where i have been mistaken so gcc runs it but it crashes and it doesnt produce any remarkable results even when it runs....
for example this should you run it with these parameters .

5
5

appear something like this
10111
10101
10101
10001
11111

or like this

10111
10001
11101
10001
11111

but it only crashes....it works with recursion and it makes a array (which is Ptr) a set of 1 and 0 which 0 is the path and 1 is the walls...

Code:
#include <stdio.h>#include <stdlib.h>
#include <time.h>
int **Ptr;
int M, N, P, charge, i,c,j;
void Lab_creator(int vertical, int horizontal,int direction);

[Code] .....

View 2 Replies View Related

C++ :: QT Creator - Declare QByteArray Variable

Mar 19, 2014

I am using Qt Creator with VS2012 compiler.

I declared a QByteArray variable : T

I initialized it. Everything OK. I added the line :

Code:
T += "
";

What follows gives me an exception and I think that the issue comes from this added line. As I take a look at T in the debugger, I don't see any but a point .

View 8 Replies View Related

C++ :: Expression Creator That Prints The Work Out Too With Answer

Nov 24, 2014

I am trying to create an expression creator that prints the work out too, not just the answer.

Code:

#include <iostream>
#include <windows.h>
using namespace std;
void p1();
void p2();
void p3();
double P,P2,p,ans,ans2,ans1,restart;

[Code] .....

View 4 Replies View Related

C++ :: Simple Playing Card Deck Creator And Shuffler

Aug 10, 2014

This is a playing card deck creator and shuffler i made yesterday. It is very simple now, but i believe that it could easily be implemented into a card game program of some sort.

#include <iostream>
#include <cstdlib>
#include <cstring>
#include <ctime>

#define STANDARD_DECK 52

[Code] .....

View 1 Replies View Related

C++ :: Makefile Options To Compile For 64 Bit

Mar 17, 2014

I have called a C function inside C++ code. The .so which gets created is a 32 bit while I am looking for 64 bit . What all options should be mentioned in the Make file to eventually compile and get shared object of ELF64 CLASS ?

Excerpts from Makefile
-----------------------------

CC = gcc
CXX = g++
CPPFLAGS = -I. -I$(S) -DHAVE_CONFIG_H
CFLAGS = -O2 -pipe
CXXFLAGS = -g -O2
LDFLAGS =
LIBS = -lsocket -lnsl

[Code] .....

View 1 Replies View Related

C++ :: Multiple Sort Options?

Jan 9, 2013

I have the following private part of a class defined as follows:

private:
struct stats {
double ISIsum;
int authorCount;
bool operator<(const stats &a) const { return ISIsum > a.ISIsum;}
} *stats_;
bool compareSortByISI(const stats &lhs, const stats &rhs);
};

This enables me to sort this struct by calling:

std::sort(stats_, stats_ + authors_->getMaximumAuthors());

My question is, what if I want to have the option to sort by authorCount or ISIsum at run time. Is there any way to do this?

I can't see how I can override operator< twice and decide which one to call at use time.

View 2 Replies View Related

C++ :: Additional Library Installation Options

Aug 5, 2013

I have been reading up, and it seems that all I need to do to finish up the installation of a library is to add in the search path for the library upon compile time.

Of course, I also read that directly copying the lib files can work too, but that may result in the over-writing of necessary files...

I read a more thorough document on mingw's linking processes and discovered that I could create a folder, install the library in that folder, and add the folder as a search path for mingw (so, basically, all i have to do is install all my libraries under that folder).

View 10 Replies View Related

C++ :: Accessing WiFi Router Options?

Feb 3, 2014

Is there a way to access the router settings via c++? My friend wanted me to write something that would turn off wifi broadcasting on his router when pressing the button in the program. The only way I can think about is to connect to the router via .net framework and then use reverse engineering (on the router settings site) to find a way how to simulate change of option via POST or GET method.

View 5 Replies View Related

C++ :: Adding New Options To String Class

Oct 8, 2014

I'm giving the replace option to my string:

void replace(string oldstring, string newstring) {
int stroldstringpos=b.find(oldstring);
b.replace(stroldstringpos,newstring.length(),newstring);
}

i have 1 error in these function that i'm confused. imagine the newstring size is more big than the oldstring, how can change the string, but only change the oldstring and add what left?
see these:

String test="hi hello world";
test.replace("hi","hello");

the result must be:

hello hello world

how can i change the replace function for it?

View 3 Replies View Related

C# :: Utilize One Panel But Modify It For Various Options?

Feb 5, 2014

Using WPF and .NET 4.0 what would be the best way to utilize one panel but modify it for various options? For instance when having a basic or advanced view how would I go about changign the area to add buttons or other items most efficiently?

View 4 Replies View Related

C++ :: Command Line Options For Preprocessor Directives

Oct 17, 2014

I want to run the following code from the command line:

Code:
#include <iostream>
using namespace std;

#ifdef ABC
const int num = 105;

[Code] ....

But I can not activate the ABC macro from the command line.

I'm trying to use the -d ABC option following the .exe file name, but I could not run the ABC macro.

How can I activate the ABC macro when I run the .exe file from the Windows 7 command line?

View 13 Replies View Related

C++ :: Simple Program To Display Menu With Options

Mar 23, 2014

I decided to create a simple program to display a menu with options, while that is easy enough I had some difficulty when selecting an option that has options inside which also has an option again. While I had many issues in the past I'm finally finished with it and it works fine, but being new to programming and not knowing various other methods available.

Code:
//:::::::::::::::::::::Simple Menu Program::::::::::::::::
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#include <iostream>
#include <string>

//function prototypes

[Code] .....

View 1 Replies View Related

C++ :: Login System And Simple Menu With 3 Options

Oct 16, 2013

I need a program that has a login system and then a menu that has 3 options: Add, delete and exit. If I choose Add it wil ask for certain data of 5 students.

Then after registering the 5 students, another menu with the options: Search, Delete and exit. In search it will ask for an ID and then prints all the data of a single student. Delete gives me the option to delete the data of any user I choose.

View 1 Replies View Related

C/C++ :: How To Get Total Number Of Items Selected From Options Menu

Jul 28, 2014

My project is to make a options menu for the user to select a shape and than draw out the shape. That whole process is already done and ready to go. What i am having trouble on is totaling the number of selected shapes. For example, at the end of the program i need to prompt a message saying ("You have selected "shape" this many times "number").

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved