|
Hi.
I have a problem with the winInet library. The problem is that I send a data to server and waiting for the reply. However, if the server is up but the script is missing, I can't tell it is an error. Is there any wininet call to check whether the reply from server is actually "Page not available"?
Thanks
|
|
|
|
|
Does anyone know what i need to burn a CD from a C program.
What API do i need to use?
Do i have to use ASPI or i can also use window API or INT13h?
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
|
I think under win9x you have to use ASPI but under NT/2000 you can use SPTI interface too.( CreateFile, DeviceIoControl ) More info about it, can be find in the NT DDK or in the MSDN Library CD.
bye
|
|
|
|
|
Can anyone help,
I am writing an application that will eventually output data to an Excel spreadsheet and to a pdf file, i have coded the excel side of this by importing the MS dlls and writing directly to the spreadsheet from code. Does anyone know how i can do the same sort of thing using pdf. I have a copy of Adobe Acrobat v4, so i really need to know which dlls i need to import to write directly into a pdf file.
Many Thanks
Neil
|
|
|
|
|
I don't know if Adobe writes an SDK for directly creating/modifying PDF files. As long as you have the full Acrobat installed on your computer, just have your application print to the Adobe PDF printer (that is installed when Acrobat is installed) like it would print to any other printer.
--
Russell Morris
Georgia Institute of Technology
"Lisa, just because I don't care doesn't mean I'm not listening..." - Homer
|
|
|
|
|
first:Thanks Tomasz Sowinski a lot!
Questions remain:if i check the dialog's property of clientedge on(in Exentened Style propertypage),i want the toolbar outside the client area,how can i?
sincerely thanks!
|
|
|
|
|
You're creating a toolbar on a dialog based project ? It can't be done with a Windows toolbar, you'll need to write your own.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
> You're creating a toolbar on a dialog based project ? It can't be
> done with a Windows toolbar, you'll need to write your own
This isn't true. The toolbar icon is missing from the Controls palette in Dialog editor, but you can create a "Windows toolbar" programatically and attach it to the dialog box. DLGCBR32 MFC sample demonstrates exactly this.
Tomasz Sowinski
http://www.shooltz.com.pl
|
|
|
|
|
I guess I should be more specific - yes, you can embed a toolbar as a child window, as you can anything derived from CWnd. But you cannot create a toolbar in the general sense, one which can be moved, docked, placed outside the client area, etc.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
> i want the toolbar outside the client area,how can i?
Basically, you can't place your toolbar or any other child window outside the client area. Your window will exist, but will be partially clipped or completely invisible. Child windows are confined to the client area of their parent.
You can try to handle WM_NCPAINT to change the look of the client edge frame in the upper part of the dialog (where toolbar is displayed), but it's probably difficult.
You can also create your application as SDI with CFormView. You'll be able to use a dialog template for main window contents, and toolbar comes for free.
Tomasz Sowinski
http://www.shooltz.com.pl
|
|
|
|
|
Hi
I tried to develop a dialog with a nenu and toolbar,i have added the menu and toolbar onto the dialog,the dialog property of clientedge was checked,
and i want the toolbar outside of the client like menu,but it doesn't work,
thanks
julia
|
|
|
|
|
Look for DLGCBR32 sample in the MSDN. It shows how to add a toolbar and a status bar to a dialog-based application.
Tomasz Sowinski
http://www.shooltz.com.pl
|
|
|
|
|
I am trying to organise the approach our organisation will take to using multiple resource scripts/headers in a new product. MSDN outlines the unpleasant way that this is to be accomplished in VC++, but I was hoping someone could tell me of an app/plugin/method that could relieve some of the burden (the 'manual' bits, particularly having to put the _APS_NEXT_ bits in the headers)...
|
|
|
|
|
Sadly, Visual C++ only likes on .RC file. If you are willing to manually manage other RC files, you can do it, but you won't get the nice VS IDE interface. This is one of the largest drawbacks to VC. I wish they used a seperate RC for each dialog, and a seperate RC for strings, etc..
There are no easy solutions here, sadly.
|
|
|
|
|
Thanks, Erik
TN035 in MSDN outlines how you actually can uses multiple .rc files in one application (one for strings, each dialog ...), and still use the IDE to insert resources into them, edit them etc. (without the joys of classwizard, though). The problem is that you must manually assign a range of values (the _APS_NEXT_XXX statements) to each file.
I wonder if VS.NET will fix these problems! (makes you wonder how VS can call itself an 'enterprise' solution in this case ... makes life tedious for 3 of us, can't imagine trying with a dev team of 100!!!)
|
|
|
|
|
been messing around with the methods in TN035 - the IDE choked, and even kept deleting from the hard disk one of my header files !!! -- can I ask if anyone has gotten this to work?
|
|
|
|
|
As you have found out, those tech notes were written YEARS ago. Literally almost 10 years ago. While they still theoretically apply, in practice it's not quite as simple as they claim.
Further, there are many problems with multiple .RC files, for instance if you drag a resource from one RC to another in the IDE, it copies the ID it had when it was created, you'll have to manually set its ID and adjust the high water marks (the _APS_NEXT stuff) to compensate.
What i've found to work (though not something i'd call optimum) is to issue a rule that nobody can hold the .RC and resource.h files checked out for more than a set amount of time, and they should always check it back in as soon as possible. Going home at night with it checked out is a beer/doghnut/coffee for the team/lunch buying offense.
Of course, that's not enough, you still have to go through every so often and renumber things because someone, somewhere will manage to mangle something.
|
|
|
|
|
Firstly is there a non MFC equivalent of CTime and CTimeSpan that I can use in ATL?
Secondly is it possible to convert a CTime object to a string then later convert that string back into a CTime object?
Thanks
|
|
|
|
|
CTime::Format() will convert a CTime object into a CString, going to the other way is more difficult. You must parse the date/time string yourself and pass the values to a CTime constructor.
|
|
|
|
|
hello,
i have to find the largest number out of a list contained in "testfile", all i could get to show was the largest of the last two numbers read, if someone could give me hint what is wrong i would be thankful
Shawn
int main ()
{
int num, nextnum, largest;
ifstream infile;
infile.open ("testfile");
infile >> num >> nextnum;
largest = 0;
while (!infile.fail())
{
if (num > nextnum)
{
largest = num;
}
else
largest = nextnum;
infile >> num >> nextnum;
}
cout << "Largest: " << largest << endl;
infile.close ();
return 0;
}
|
|
|
|
|
I did. (HINT: take a close look at how you are extracting the data)
|
|
|
|
|
You are only ever going to be working with the last two numbers read, as you are not testing to see if num or nextnum are larger than largest before over writing the value. If the file contains only one column of numbers you only need to read into num (infile >> num) and also have the one if statement testing against largest in the while loop.
Try the following.
int main ()
{
int num, nextnum, largest;
ifstream infile;
infile.open ("testfile");
infile >> num >> nextnum;
largest = 0;
while (!infile.fail())
{
if (num > largest)
{
largest = num;
}
if (nextnum > largest)
{
largest = nextnum;
}
infile >> num >> nextnum;
}
cout << "Largest: " << largest << endl;
infile.close ();
return 0;
}
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
Hi I am trying to call a DLL (for testing I use the SetWindowTextA function from User32.dll)
Everything seems correct to me...and the program compiles and links fine, except that on executing it, it given an illegal operation. I have checked that SetWindowTextA is in User32.dll, so I guess it should work?
Here is the code:
#include<windows.h>
#define TAILLE_MAX 40
void main()
{
char *szFuncName = "SetWindowTextA";
char *szDllName = "User32.dll";
HINSTANCE hLibrary;
HWND hwnd;
char szOldWndTitle[TAILLE_MAX];
char *szNewWndTitle = "Changed Title";
BOOL RetVal;
GetConsoleTitle(szOldWndTitle, TAILLE_MAX);
hwnd = FindWindow(NULL, szOldWndTitle);
__asm
{
push szDllName
call LoadLibrary
mov hLibrary, eax
push szFuncName
push hLibrary
call GetProcAddress ;eax recieves function pointer
push szNewWndTitle
push hwnd
call eax
mov RetVal, eax
push hLibrary
call FreeLibrary
}
}
Any ideas what is wrong?
Thanks in advance
|
|
|
|
|
Hi,
how can I load, view, modify and save
domain users's ACL registrered into HKCR\AppID\object's GUID\AccessPermission subkey of registry?
I've already used RegQueryValueEx Api in my C++ program but i don't know to interpret ACL in it.
Help me, thanks!
|
|
|
|
|
Can I use CTime in a Win32 application?
SomW
|
|
|
|