|
hi im looking to figure out how to make list boxes similar to the control in the windows xp task manager in the process tab anyone know how to create a list box like that if someone could just point me to an article or something that would be very helpfull thanks
|
|
|
|
|
What you're wanting is a ListView control, using the Report View style.
Microsoft has some examples of how to create/use the ListView control here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/listview/listview.asp
If you're wanting to use MFC, or .NET, a Google search will probably turn up some equally useful documentation.
|
|
|
|
|
Hey,
I am developing a program for this one guy, and I was wondering what you need to do to get it to run on another computer that doesn't have Microsoft Visual c++ on it.
Thanks
|
|
|
|
|
How about compiling in Release mode?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
or make it staticly linked library and not a shared mfc dll
|
|
|
|
|
|
what are we expected to help you for ?
be careful when you write your post with <> beacause they are treated as HTML tags, and so, not displayed. Use you modify button to rewrite a post...
TOXCCT >>> GEII power
|
|
|
|
|
I want to include my in 'Visual C++' - written Dll in a VB-Project and use its functionality.
But some of the methods of my Dll have 'char*' pointers in their paramter list, which is why, the functions are not displayed or not working from VB.
I also tried using a CString with the same effect.
Can anybody please tell me, how to handle this simple problem??!?
dalecooper241
|
|
|
|
|
do you use COM or make a DLL and expose it's functions like APIs ?
if COM then use BSTR(basic string) for strings.
Ig API try using constant length strings.
|
|
|
|
|
Actually, I am using a DLL and I want to acces its functions from VB.Net.
Can you please give me an example, how to modify the codelines, so that the functions will be supported/accesible from VB?
C++:
public class ChatService{
...
int sendMessage(int iAddress, char* pcMessage);
}
|
|
|
|
|
Hi all;
I have followed the instructions in MSDN for creating a bitmap button on a dialog box:
that is, I have drawn my bitmaps and named them accordingly with suffixes "U", "D", "F" and "X".
Then I have drawn my button on the dialog box, checking "Owner draw" in properties and with caption the name of the bitmaps without the above suffixes.
I have named a variable of type CBitmapButton in the dialog class and called the AutoLoad in 'OnInitDialog()' function as follows:
VERIFY(okBtn.AutoLoad(IDOK, this));
And I get an "ASSERT" error at this line:
ASSERT(FromHandlePermanent(hWndNew) == NULL);
What's the problem and what can I do?
_Lostris.
|
|
|
|
|
Hi there,
I have a requirement within a C++ MFC project to simulate the clicking of a button control from within a function in my app.
For this control, I have an OnButton1 message handler for the BN_CLICKED message. Obviously, when this button is clicked, the associated code within this handler is executed. However, I also want to be able to call this handler from within another function, thus simulating the user clicking this control. I understand that I need to send a BN_CLICKED message using the SendMessage function. For example:
void CMessagesDlg::OnButton1()
{
CString text = "The BN_CLICKED message was sent to the IDC_BUTTON1 control";
MessageBox(text);
}
void CMessages::OnButton2()
{
CWnd *pCalc = NULL;
pCalc = GetDlgItem(IDC_BUTTON1);
pCalc->SendMessage(BN_CLICKED);
}
The idea here is the user can click button1 to have the text string displayed. But also, the user can click button2 to display the same text string, by sending the BN_CLICKED message to the button1 control
Whilst the above code compiles, links and is free of run-time errors, nothing actually happens when the user clicks button2!!
What could I be doing wrong - any advice is greatly appreciated
Adrian Langford
|
|
|
|
|
Here is one solution.
::SendMessage(hWnd, WM_COMMAND, MAKELONG(ButtonID, BN_CLICKED), reinterpret_cast<lparam>(ButtonHandle));
kuphryn
|
|
|
|
|
|
Hello
Is it possible to use an itoa function in an win32 application??? because I'm trying to use it and i get an error: can not locate xtoa.c and it asks me for the path and if I cancel that I will get an unhandle exception. how can I do a conversion from int in char if I can not use itoa???(in win32 application I can not use sprintf and other functions like this...)
Tx
Mirelutza
|
|
|
|
|
You are calling the routine wrong.
Why can't you use sprintf?
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
If I use sprintf is the same problem. I get the message that it can not find sprintf.c . What I am trying to do is to print in an listbox some messages that I do not have them all at once, so I am using a string array in order to do this by sending a message to the specific listbox. I'm concatenating the message and I have to use an integer value in the string message. That's what i'm trying to do!
Mirelutza
Tx
Mirelutza
|
|
|
|
|
sorry but sprintf(), itoa()... are ANSI (so standard) C functions. they are not dependant on wether they are used on Win32, MFC, Console...
did you include the right header file in your project ?
if so, do you use the right library ?
TOXCCT >>> GEII power
|
|
|
|
|
Hi!
I included the libraries stdio.h and stdlib.h and I think is good. But still I'm doing something wrong... and I do not know what...
tx anyway
Mirelutza
|
|
|
|
|
The only reason you would be seeing that message is if you are trying to step into the routines in the debugger. I would guess that you are doing this because the routines are crashing. They are crashing because you are calling them wrong.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
This is the way I'm using it:
int crttime=0;
char buff[30];
itoa(crttime,buff,10);
is it wrong???
10x,
Mirelutza
Mirelutza
|
|
|
|
|
itoa(crtime,buff,10);
should read
itoa(crtime,&buff,10);
Ant.
|
|
|
|
|
You can use the function _itoa()
here is the prototype:
char *_itoa( int value, char *string, int radix);
make sure you include these header files:
<br />
#include <stdlib.h><br />
#include <stdio.h><br />
Steve
|
|
|
|
|
Yes I've included the libraries and is still not working. Do I have to have a char* variable for example:
char* ch;
ch=itoa(value,string,10);
I think I tried like this too but it's still not working...
Am I doing something wrong???
Mirelutza
Mirelutza
|
|
|
|