|
Do you know how could i disable a WebBrowser control's scrollbar?
rechi
|
|
|
|
|
hi,
I have a managed function that wrapper an unmanaged one where a parameter is a double [10], and this function returns values in this parameter, now in my wrapper function y want to be able to use it from c#, so i want to pass an ArrayList, or a double[10], or something where can take the back parameters, but i don't know how to do it, and if its possible any suggestion? thanks in advance
Salamanca 2002 Capital Cultural Europea, Visitala
|
|
|
|
|
I doubt this would work. The compiler may compile right, but runtime environment won't probably accept this, since it would be a security risk, and it would defeat the managed code purpose.
Michel
If I am wrong or said something stupid, I apologize in advance
|
|
|
|
|
Hi,
I am using VC++ 6.0 . I need to print some text from a simple C program.
How do I do it?
I tried to use fprintf(); but couldn't get a suitable FILE * object to put
as the first parameter.
Please help. Is there any other way to do it?
With best regards,
Sayan
Email:sayanmukherjee@indiatimes.com
|
|
|
|
|
printf (without the leading f .)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
By the word 'printing', I meant printing to a printer.
With best regards,
Sayan
Email:sayanmukherjee@indiatimes.com
|
|
|
|
|
Oh I see... Well, if you can get by with a simple hack, redirect your standard output to the printer at the command line with myprogram >LPT1: or whatever your printer port is named (go to Control Panel->Printers->Properties->Details.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
You could try this:
FILE* pPrinter = fopen ("LPT1:", "w");
if (pPrinter != NULL) {
printf (pPrinter, "A line of text\n");
fclose (pPrinter);
}
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Sayan Mukherjee wrote:
I need to print some text from a simple C program.
How do I do it?
If when you say "print" you mean console, you can use puts(...) or the "stdout" file handle with fprintf(...), fputs(...), etc.
If you mean "printer", you may be able to use the stdprn file handle.
Peace!
-=- James.
|
|
|
|
|
I need my program to list the IP's associated ith the computer, e.g. dial-up IP and network IP, I have tried to use PJ's enumeration class but cant get it to work.
Can someone help me.
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
|
Thanks, it was just what i needed.
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
how draw Region border with pen style?
|
|
|
|
|
I do not think that you will be able to do the border of a region with a pen. The reason is that windows does not actually calculate the border of your region for the FrameRgn function, it simply creates another region and fills that area. This gives the effect of a border.
Of you wanted to you could calculate the border yourself from all of the rectnagles that create the region, but this may be time consuming depending on how complicated your region is. You would have to calculate the convex hull of all of the rectangles, even then, if you have holes in your region, they would be difficult to detect as well.
How are you getting your region?
What are you trying to accomplish with the pen.
Because there are other tools you can use like paths, they are pretty powerful.
If you post a few more details of what you would like, I will try to help you find a solution.
|
|
|
|
|
I get region by:
CombineRgn
or
CreateRectRgn ...
or
Create a standard region, then rotate it
Thanks
|
|
|
|
|
sorry for replying so late
and thanks for ur suggestion
the problem here is not with rgns i could actually get the desired output on the screen with FrameRgn( , ,1,1);
but when i take a print out i get an image with more width to what i see on the screen
i am not able to under stand the problem
as u suggested paths r powerful but they do not support arcs and ellipses in win 98 platform so i could not use paths for creating aregion o fill the path
thanks for ur help
|
|
|
|
|
hello, i have created a CListBox object at runtime on my CEditView. Now i want an event to happen when i click on one of its items. The problem is that at runtime there is no event/command handlers by default (i think). Can someone help me to make an event handler out of my runtime created object?
Thanks in advancee
Bernard Racoute
Bracoute
56Kbps of sighs
|
|
|
|
|
With the help of the MFC wizard, create a class derived from CListbox doing all the message handling you need. Let's call that CMyListBox . Now, when creating the objetc at run-time, make it a CMyListBox instead and call CMyListBox::Create just as you called CListBox::Create before. If I understood your problem right, this should do.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
You need to handle WM_COMMAND and check manually for commands coming from your listbox.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
Hello programmers,
i'm blocked on a issue, i've called a CFontDialog dialog and i got the font by assigning dlg.GetFaceName() to a CString variable and now the dlg.GetSize(), used to get font size, returns an integer which i stored in variable size. But now i have to display the font size in a CEditView.... that's where the problem arise.... i cannot convert the int size variable to a CString variable that can be displayed on the CEditView. Can somebody help me convert the int to CString...
i used GetEditCtrl.ReplaceSel() to input the font size on the CEditView but the GetEditCtrl.ReplaceSel() only accepts strings... The code is used is listed below
[ccode]
if(dlg.DoModal() == IDOK)
{
CString text;
text=dlg.GetFaceName();
GetEditCtrl().ReplaceSel(text);
int size;
size = dlg.GetSize();
GetEditCtrl().ReplaceSel(size);
// This is where i get the error message saying cannot convert
// int to CString.
}
[/ccode]
56Kbps of sighs
|
|
|
|
|
It is simple.
CString s;
int i = 10;
s.Format("%d", i);
// s now == "10"
CString::Format takes the same flags as sprintf, because internally it uses a variant of it. I prefer to use ostringstreams, but as you have a CString, CString::Format is the easiest and most obvious way to do it.
So it's:
CString szSize;
szSize.Format("%d", dlg.GetSize());
GetEditCtrl().ReplaceSel(szSize);
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
Hi,All
I want to run commands on command line programatically.
e.g. command like del filename from inside the programm.What are the various ways of doing that? I am currently using CreateProcess API with second parameter as command line,what are the other ways(if any)?
Thanx and Regards
Tushar
|
|
|
|
|
system (in header <stdlib.h> ) does pretty much the same, slightly more comfortably.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I am just curious, how do you spell this "see plus plus" thingy? I know how to spell VB and ASP, but am stuck on see plus plus - it isn't in my Websters English Dictionary.
____________________
David Wulff
I know what you're thinking punk, you're thinking did he plagarise this signature? Well, to tell you the truth I did. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
David,
It's right next to the definition of "see sharp".
Sorry
Nick Parker
|
|
|
|