|
Does anyone have a free line drawing control that can be used in VC6 like the one in VB6? I want to visually
draw lines on a dialog box or CFormView-derived view. The hard way is to implement the OnDraw() event handler,
but doing it visually at design time would be terrific.
|
|
|
|
|
If I've ever needed to draw a line, I've always done a really thin control.
|
|
|
|
|
I'm trying to write a program that will allow reliable transfer of files between computers on a network. It would be very useful if I could list all the uses user names on a network as network Neighborhood does.
Is there a way to do this?
Thank you for any help
|
|
|
|
|
How do I print the GIF file from a VC++ application
|
|
|
|
|
Do you know what the GIF is ? I assume not, in which case you'll need to either
a/ forget it or
b/ pay UNISYS a swag of money.
GIF uses LZW compression, and even if your program doesn't make money, you need to pay them if you support GIF. That's why a lot of graphics software ( mine included ) does not support GIF. Assuming you chose GIF at random, the answer for any other format is you need first to read it in, which entails using a library like paintlib ( www.paintlib.de ), then it's merely a case of stretching it onto a print DC. I say stretch because printers measure size in TWIPs and a screen shot in pixels equates to enough TWIPs to make a small postage stamp.
If you're using Doc/View most of the work is done for you, if not, there are classes on this page that will give you everything you need.
|
|
|
|
|
don't!
if your app reads GIF files, you have to get a license from the Unisys corporation. this applies even if you use an external appliation (like IE) to read and render the image.
use a different format, if possible.
-c http://www.smalleranimals.com
|
|
|
|
|
I would like to create a dialog window from a win32 console program, but i dont know how to go about doing
this. Anyone know how? I created the CALLBACK procedure, and the resource template, but when i go to call
CreateDialog(), i do know what to pass in for the current instance, and the parent window, and NULL does
not work (it will compile, but it won't create the window).
--Dave
|
|
|
|
|
I would like to create a dialog window from a win32 console program, but i dont know how to go about doing
this. Anyone know how? I created the CALLBACK procedure, and the resource template, but when i go to call
CreateDialog(), i do know what to pass in for the current instance, and the parent window, and NULL does
not work (it will compile, but it won't create the window).
--Dave
|
|
|
|
|
Hi Dave
I think what is missing is
ShowWindow(SW_SHOW);
NULL as a parent works fine, I tested it
CTestDlg::CTestDlg(CWnd* pParent)
: CDialog(CTestDlg::IDD, pParent)
{
Create(CTestDlg::IDD, pParent);
ShowWindow(SW_SHOW);
}
|
|
|
|
|
I have a memory address stored in a variable (gotten from a stackwalk), like so
int address = 0x00FE3D; // an arbitary address
How can I check whether my process has access to that address??.
PS. I was looking at IsBadReadPtr() but it requires a pointer to memory block. How can I get a pointer that points to the value specified in a variable?
|
|
|
|
|
Just pass a block size of 1:
void* pv = (void*) 0xfe3d; <br />
bool bCanRead = !IsBadReadPtr ( pv, 1 );
|
|
|
|
|
Is there any function, etc, available to search through all the items in a tree ctrl by name?
E.g. I populate a tree ctrl, then need to go back and add a new item 'D' as a child of item 'C':
ROOT
|-A
| |-B
| |-C
| |-E
|-F
|-G
Becomes:
ROOT
|-A
| |-B
| |-C
| | |-D
| |-E
|-F
|-G
How can I find and return the HTREEITEM pointer to 'C'?
Thanks for any help,
David Wulff
|
|
|
|
|
http://codeguru.earthweb.com/treeview/find_item.shtml
|
|
|
|
|
Hi,
I want to display a bmp file into my active x control. What is the way to do this thing.
Regards
Muhammad Ali
|
|
|
|
|
I am having problems building a 2 dimensional dynamic array. I built a one dimensional dynamic array, but I don't know were to start with a 2 dimensional.
I cannot find any helpful documentation on it so far on it. Any comments?
|
|
|
|
|
int nRows = 6;
int nCols = 3;
int ** cp;
// Allocate rows
cp = new int *[ nRows ];
// Now allocate using a loop
for ( int index = 0; index < nRows; index++ )
{
cp[index] = new int [ nCols ];
}
cp[5][0] = 1;
cp[5][1] = 2;
|
|
|
|
|
Hi!
I am writing a debugger. In my Watch-View (which is basically a ListView) I have to check the user input of new variable values for validity (eg. a variable of type int must not be assigned the string "qwerty"). I do this now
by checking the validity when the editing has already ended (using a LVN_ENDLABELEDIT handler). If it is not valid, I do not set the value.
What I WANT to do, is to prevent the user from ENDING editing, unless he has entered a valid value or he cancels editing.
Any hint would be appriciated,
Hamader Peter
|
|
|
|
|
From MSDN:
"If the pszText member of the LVITEM structure is non-NULL, return TRUE to set the item's label to the edited text. Return FALSE
to reject the edited text and revert to the original label. "
(See MSDN Online)
Cheers,
Paolo.
|
|
|
|
|
|
Is there a way I can use popen() in my windows app to open a dos app and use its output?
|
|
|
|
|
Using CDateTimeCtrl or inheritance, how can I init the non checkbox to FALSE (not set)?
|
|
|
|
|
Hi
would
ctrlDate.EnableWindow(FALSE) do?
Kurt
|
|
|
|
|
Thanks for your interest.
I already have done this and the window is disabled preventing dropdown and changes. However, it still is checked for a return and does return the default system date. I am looking for a way to force GDT_NONE result on return when the dialog closes.
I am also looking to have the checkbox not checked for the default state when the control is enabled which would be more appplicable for certain uses of the application. Eventually the default state would be part of a prferences setup.
|
|
|
|
|
Hi there,
I had two questions...
When creating a context menu for a treeview let's say, how can you tell whether the user has actually right clicked on the treeview or somewhere out in the empty spaces? From what I can see, I only have two points, an x and a y, but I have no information on the treefolder item that was right clicked on....
Also, once the user picks, let's say the copy option and you handle the pick, what MFC class do you use to actually copy the whole folder into another one?
|
|
|
|
|
even if the right-click is out in space, there will always be an item selected in the tree.
so,
void CObjTreeCltr::OnRclick(NMHDR* pNMHDR, LRESULT* pResult)
{
HTREEITEM hti = GetSelectedItem();
if (hti!=NULL)
{
and so on....
-c
|
|
|
|