|
Why are you doing it like this ? Why do you need to open the shell ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I guess you are asking that because of the "xcopy". Well that is only the first command and exit is the last one.
I'm using gcc under cygwin so I must login before I can execute something like "gcc [param]".
|
|
|
|
|
*grin* Fair enough. I just thought you may be doing stuff that could be done in code.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello,
The Enter key triggers my ON_WM_KEYUP message handle, but it does not trigger my ON_WM_KEYDOWN message handler.
I'm not handling the message anywhere else.
What's the deal?
Thanks!
-Ian
|
|
|
|
|
|
Hmmm.. this doesn't seem to work either. According to MSDN:
If the CWnd object has the input focus, the OnSysKeyDown member function is called by the framework when the user holds down the ALT key and then presses another key.
There has to be a way to trap the enter key being pressed down. Why is ON_WM_KEYUP sent, but not ON_WM_KEYDOWN? Does it have something to do with default-dialog buttons?
-Ian
|
|
|
|
|
For anyone who might be interested, I found the solution to my problem from the CodeGuru article at:
http://www.codeguru.com/Cpp/W-D/dislog/tutorials/article.php/c4965/
It turns out that you have to override the WM_GETDLGCODE handler to get notification that the Enter key is down. It has to do with how MFC handles dialog default buttons.
-Ian
|
|
|
|
|
Hello thug developers,
I have a very anoying irritating problem here with my app.
I've worked hard to understand VC++, searched all over the internet to find out how things work. So I managed to code an app like a very very simple chat application. A simple peer to peer connection for just sending each other a line of text, that's all.
After solving all the errors and warnings, I finally completed my app. I started to test my app and found out that it can connect with the other pc and it can receive data from other pc, but I can't print the recieved text on the screen. I've checked msdn and everything, but I just don't understand what I did wrong.
So I hope someone here is able to receive my sourcecode en check what I've done wrong. If there is someone to check it for me I'll be very very very very happy if he can solve my problem. If someone wants to help me via email, than this is my adres: ammeniar@hotmail.com
Than you very very very much.
If I was a gay I would tongkiss ya thnx boyz and girlz!!
If my application works, I forget all my problems.
|
|
|
|
|
Why don't you post here the source code that handles the drawing of the message?
Also you can search in the articles for CSocket - it's a chat program and you can look trough it to see how he does it.
Actually where do you want to draw the message? In a listbox, or directly on the CDC?
|
|
|
|
|
Hi,
I am new to programming.pls bare this is very basic question.I am having a small problem with structures.
In my program I use a global stu to store some values. I place the values in one function and access those values in other functions.
ie..
typedef struct _mystruct
{
int no;
char str[10];
}pstruct;
func1()
{ pstruct ps[10];
for(i=0;i<5;i++)
{ ps[i].no = i;
strcpy(ps[i].str,tmpstr);
}
}
but if in other functions if I access ps[1],ps[2]..I couldnt see those values I placed in func1.
Where am i going wrong here.pls help.
|
|
|
|
|
err85 wrote:
typedef struct _mystruct
{
int no;
char str[10];
} pstruct;
func1()
{
pstruct ps[10];
for(i=0;i<5;i++)
{
ps[i].no = i;
strcpy(ps[i].str,tmpstr);
}
}
ps is local to func1, it goes out of scope and is destroyed when func1 ends.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
A global is almost always a bad idea. You should at least put it in the scope of a class. Your struct as it stands has scope of the global method you've written outside the struct, which is why you can't see it at all. If you create a class which has a static array of these things, then it will be visible where-ever this class is visible. Then put the include for the header of the class in your stdafx.h, so it's available everywhere.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Try:
typedef struct _mystruct
{
int no;
char str[10];
}pstruct[10];
for(i = 0; i < 5; i++)
{
pstruct[i].no = i;
strcpy(pstruct[i].str, tmpstr);
}
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
pstruct ps[10];
not global scope
|
|
|
|
|
Where can i find documentation on _bstr_t.
I read a blob of data into a _bstr_t and i need to parse this. Have no access to CString as this is in a win32 dll. I need to be able to do a find on this data to get to a certain point and then extract certain key pieces of data from it.
Can anyone help me find decent documentation and even examples on this ?
|
|
|
|
|
MSDN[^] is usually pretty good.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
I tried MSDN ...
I did not get enough examples there....nor was the parsing methods very clear to me....
Any other suggetsions... Or does anyone know how to find a substring in a BSTR?
|
|
|
|
|
Have you looked here[^]? Lots of articles on parsing strings.
This[^] article may be a special help to you.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
The _bstr_t source code is on your PC, but in essence, you should use std::string, or failing that, C stype string mashing with the char * that _bstr_t provides.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello,
I have a CComboBox with three items in a dialog-based application. When I click on the combobox, the drop-down list only shows one item at a time and gives me a scrollbar. I want the drop-down list to show all three items.
I must be missing something. This must be a simple thing but I can't figure it out.
Thanks!
-Ian
|
|
|
|
|
in the resource editor, click on the "down arrow", an expended view of the combo box will be displayed, you can drag the bottom edge to make the dropped part bigger.
I normally give it a big size to at least 15 items are visible.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Ah ha! Yes! thank you. That was driving me nuts!
-Ian
|
|
|
|
|
In your resorce view you have to hold the left mouse click down on the combo box and extend it. This should show all your items in the list.
Hope this helps...
|
|
|
|
|
Thanks! (you do have to click the down-arrow on the combobox first. I would never have figured that out on my own.)
-Ian
|
|
|
|
|
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|