|
The device context is a GDI-managed structure containing information about the device. GDI contains a number of structures which you cna use to use generate graphical output for display, printers or other devices.
http://msdn.microsoft.com/en-us/library/aa925824.aspx[^]
|
|
|
|
|
hi,
does anyone know about .ptf extension file..(ptf stands for portable transcript file)... i wanna use files of that type in my application... can someone enlighten me the ptf concepts...i tried googling but dint work very well for me..i wanna know the technical details behind this file format...
can anyone teach me??
i will be grateful to u..
pls forgive me if the post is irrelevant in this forum...
Thanks,
Rakesh.
|
|
|
|
|
What application creates a PTF file?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi All
i am useing _ConnectionPtr and _RecordsetPtr for connection and get information from mysql databases.i have a problem to get values when i am useing "Select * from table".How can i get table information.
_ConnectionPtr pConn = NULL;
_bstr_t strCon("Driver={MySQL ODBC 5.1 Driver};Database="";User=root; Password=root;Option=3;");
HRESULT hr = S_OK;
CoInitialize(NULL);
hr = pConn.CreateInstance((__uuidof(Connection)));
if(FAILED(hr))
{
AfxMessageBox("Error instantiating Connection object\n");
}
hr = pConn->Open(strCon,"root","root",0);
if(FAILED(hr))
{
AfxMessageBox("Error Opening Database object using ADO _ConnectionPtr \n");
}
::_RecordsetPtr rs;
rs = pConn->Execute(_bstr_t("use Databases"), 0, adCmdText);
rs = pConn->Execute(_bstr_t("Select * from tatblename"), 0, adCmdText);
Plz help me
|
|
|
|
|
I don't know who in the living frock is marking your questions as "Good" (apparently none of your questions are that awesome to be marked as a good questions). I've noticed this a few times and I wonder if you have a split personality (another login) to "help yourself"?
Remember - the ones likely to provide you an useful answer do not care about if or not the query is marked as good.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Plz don't blame
(another login) to "help yourself"
Thanks for comment.
|
|
|
|
|
It was only a doubt that I had, so I expressed it instead of keeping it on my mind. Not that I'm blaming you for anything, and I'm glad you've clarified it.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
Davitor wrote: i have a problem to get values when i am useing "Select * from table".
Are we supposed to guess at this problem?
Davitor wrote: ::_RecordsetPtr rs;
Do you need to call CreateInstance() on the rs object before using it?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi all,
In an Standard combobox you can select the items from dropdown and as well edit it..
But in an owner drawn combobox after adding the items, u can only select from drop down.
What has to be done in order to allow owner drawn combo box to allow editing as standard control??
|
|
|
|
|
Since combo box is customized,
now u need to make a customized edit box(CEditEx),
and when you double click the combo box a EN_UPDATE message is send to CEditEx, OnUpdateEdit.
|
|
|
|
|
You can only edit the combo box selection if the Type property of the combo box is set to Dropdown .
If the Type property is set to Droplist you can only do selection.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
hey the problem got fixed,
We need to create it as a dropdown,
Thanks 4 "«_Superman_»" i saw this one...
|
|
|
|
|
Hi every one
There is one application on my system that it’s opened my Clipboard and Empty it. but didn’t close Clipboard until closing the application .
I want attach to application by my application and send closeclipboard api to it.
Its my code but don’t work . I am cant open clipboard from my application
Plz help me.
CWnd *pWnd=new CWnd();
BOOL bo,be,bc;
pWnd= GetOpenClipboardWindow();
pWnd=FindWindow("Application class name","Application title");
if(pWnd)
{
bo=pWnd->OpenClipboard();
be=EmptyClipboard();
bc=CloseClipboard();
}
|
|
|
|
|
The current CWnd object will not become the owner of the Clipboard until the EmptyClipboard Windows function is called.
|
|
|
|
|
i know it .
but how can i empty clipboard when its opened by another program?
with special thanks
|
|
|
|
|
Hi,
I was wondering if DetourCreateProcessWithDll is just equivalent to CreateProcess suspended, injecting the DLL, then resuming? Or is it doing something special in the background, and if so, does anybody have any code not dependent on the Detours library?
Thanks
.Dae programming
|
|
|
|
|
I found this reference to Detours: Notes on Detours[^]. If you use the search phrase:
"so, the deal with detours is that there are a couple different"
it will take you right to the section that explains what DetourCreateProcessWithDll is doing.
What exactly are you trying to do?
|
|
|
|
|
|
I'm currently working on a program that outputs the information given under ipconfig/all in DOS to a text file. Now even though this seems very simple do check normally, its for people who don't know dos commands and that sort of thing. However to make this program more effective I would like to have it output the Public IP address of a network, this can be done normally by visiting http://whatismyip.com
The code is currently:
#include <windows.h>
#include <winable.h>
#include <iostream>
int main()
{
system("ipconfig/all >> \"C:\\Documents and Settings\\gamefreak\\desktop\\test.txt\"");
}
which is working, now I'm trying to output the information provided by http://www.whatismyip.com/automation/n09230945.asp
I suppose an answer on how to copy and paste all the information from a webpage in C++ would work the easiest.
|
|
|
|
|
Have you tried InternetReadFile() ? I just tried and it seemed to work fine.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
No I have not tried InternetReadFile(), I looked into to it and I can't seem to get it to work..
I'm not very good when it comes to Win API functions
|
|
|
|
|
i have this problem, i am an amateur in programming c++ so i made this simple program: i have d0, d1, d2, and d3, i give them some values, then i have a, b, c, d, e, f, and g, and i want to calculate them with a math operation for each one, but that operation uses the d0, d1, d2, d3 values that you gave them before with the cin's, so, after you give the values to d0, d1, d2, and d3, the program closes itself because it finishes doing everything but i cant see the results for the a, b, c, d, e, f, and g operations. Can someone help me please.
This is my code:
#include <cstdlib>
#include <iostream>
#include <stdio.h>
using namespace std;
main()
{
int d0, d1, d2, d3;
int a, b, c, d, e, f, g;
//Meto los valores 0 y 1 de las variables d0, d1, d2, d3
cout<< "Inserte los valores de las siguientes variables:\n"<<endl;
cout<< "Variables: d0, d1, d2, d3\n";
cout<< "TIENEN QUE SER 0 o 1\n";
cout<< "Inserte d0\n";
cin>> d0;
cout<< "Inserte d1\n";
cin>> d1;
cout<< "Inserte d2\n";
cin>> d2;
cout<< "Inserte d3\n";
cin>> d3;
cout<< "Ahora se muestran los valores de cada segmento\n";
//Calculo los valores de las variables a, b, c, d, e, f, g, utilizando los valores de d0, d1, d2, d3
a= ((d0&&d2)||(!d0&&!d2)||(d1)||(d3));
b= ((d0&&d1)||(!d0&&!d1)||(!d2)||(d3));
c= ((d0)||(!d1)||(d2)||(d3));
d= ((!d0&&!d2)||(!d0&&d1)||(!d0&&d3)||(d1&&!d2)||(d1&&d3)||(d0&&!d1&&d2));
e= ((!d0&&d1)||(!d0&&d2));
f= ((d0&&d2)||(d0&d1)||(d2&&d2)||(d3));
g= ((!d0&&d1)||(!d1&&d2)||(!d1&&d2)||(d3));
//Muestro los valores en pantalla
cout<< a <<"\n";
cout<< b <<"\n";
cout<< c <<"\n";
cout<< d <<"\n";
cout<< e <<"\n";
cout<< f <<"\n";
cout<< g <<"\n";
}
|
|
|
|
|
just before the last bracket in the program, add system("PAUSE") . This will only work if you're using Windows or DOS.
|
|
|
|
|
I don't understand but only a few words of the Spanish and I was too lazy to check the math because I don't understand it either..(think I need to know the comment right before it)
Anyhow if you add getch(); or system("pause"); right before your final bracket that will fix the problem for you.
*notes: system("pause") should be platform dependent, but works in windows.. you have to press the enter key before the program does anything else
getch = get character, all it does it waits for any key at all to be pressed and then continues.. should work on any platform but you may accidently hit a key and close the program
its common practice to include return 0; or return 1; but as you can see, not necessary .
|
|
|
|