|
Hi,
I created a combobox with 50 state codes; it seems working okay.
So, when user type 'N', 'Y'; it will highlight "NY".
When user hits enter, it will put "NY" into the combobox.
However, user can enter invalid code; such as 'N', 'W'.
It ends up putting "NW" into the combobox.
I probably can us OnChar ( ) to validate all the
input.
But, does any know a better way to handl it?
Any help / suggestion would be appreciated!
Thanks,
Kevin
|
|
|
|
|
You can set the style of the combobox to 'dropdown'-list.
This will prevent the user to enter a word that doesn't exist already in the list
Regards
codito ergo sum
|
|
|
|
|
|
How do you get polygons to move across the screen in the window using coordinates?
|
|
|
|
|
I know in Borland their is a command to check for other events when in a loop on a form.
Are they something the same in Visual Studio.
I am in a loop when I click a button, but need to check if another button/checkbox event needs to be processed; e.g. flag set to exit the loop.
Or do I need to opt for a worker thread?
Graham.
grahamfff
|
|
|
|
|
Putting your loop in a worker thread is usually the best way. Otherwise you have to check the message queue at regular intervals in your loop so that the GUI can handle the messages. If you are using MFC then a call to AfxGetApp()->PumpMessage() will do the trick. If not using MFC then you have to place calls to PeekMessage, TranslateMessage, and DispatchMessage . See http://www.codeproject.com/threads/usingworkerthreads.asp[^].
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
I am creating a Windows Forms Application (.NET) and am trying to create and show my own About dialog but I can't figure this out. I have tried doing searches here and on the net but everything I am finding says to do one of two things:
AboutDialog::Show();
or
AboutDialog myDialog = new AboutDialog();
myDialog.Show();
Either way I do this it gives me an error of "error C2065: 'AboutDialog' : undeclared identifier"
Forgive me for asking so many questions but I am still learning and this is one of the ways I find the easiest! Only problem is I am having a heck of a time figuring out how to search for stuff for C++.
Thanks,
Tom Sapp
http://www.sappsworld.com
|
|
|
|
|
Tom Sapp wrote: AboutDialog::Show();
AboutDialog myDialog = new AboutDialog();
myDialog.Show();
is the name of the form you created AboutDialog? if not replace AboutDialog with the name of your form, the way that i do it is:
FormName^ myForm = gcnew FormName();<br />
myForm->ShowDialog();
the "myForm" part can be replace with anything that you want it to be just make sure that it is the same in both lines of the code. also make sure that you include the header file of the form (#include "fileName.h") at the top of the file.
i hope i worded this right, and that it helps you
- Kyle
|
|
|
|
|
Cool, apparently the #include "AboutDialog.h" part is what I was missing. I am used to using Delphi that automatically includes these types of things. I will try to remember that from now on!
Thanks,
Tom Sapp
http://www.sappsworld.com
|
|
|
|
|
Just wondering if anyone knows the ins and outs of an instant messanger? Is it peer to peer, or is there an intermediate server somewhere in between them? Or does it install a microsoft Server as part of the install?
|
|
|
|
|
JWood wrote: Just wondering if anyone knows the ins and outs of an instant messanger?
Just look at Documentation link of this site http://gaim.sourceforge.net/[^], open source IM program
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I haven't played with images since the 90's. So, I imagine a lot has changed.
I want to edit an image and make it circular, not rectangular. How can I do this in Image Editor?
My application is going to make this image rotate.
Thank you.
Bill Dennis
Orlando, FL
|
|
|
|
|
You can create a stencil in some editors, or if you want to actually transform it there are plugins that do that as well.
|
|
|
|
|
I am having difficulty picking out my original post.
The solution by Thomas suggesting OnClickTab worked perfectly.
Ger
|
|
|
|
|
Ger Hayden wrote: I am having difficulty picking out my original post.
When you are logged into Code Project your name will appear in the top left corner of ever page you visit. Clicking on your name will bring you to your profile page[^], and on that page you will find a link to Messages posted[^]. Your last 200 messages posted will be listed there.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Hi. I have a straneg prob. I wrote a program that has a CAsyncOScket derived socket class. I will try to reconnect to a server every 1-3 sec IF it did not succeed in connecting or was disconnected. I keep track of the socket if after three sec and it DOES Not succeed, it will call Close on the present socket and then will call on the Create and then call on the Connect call. It will do this repeatedly until connection.
Now, this should be pretty simple. But I am get a "Socket Notification Sink" dialog with error that says it can not write to some memory location.
I am not sure whether I am approaching how to deal with what I want to do or maybe I am missing to call something else.
Has anyone ever got this error?
Thanks in advance.
|
|
|
|
|
Hi
use a pointer to CAsyncSocket & use new to create a instant of socket then after close delete the old one and create new CAsyncSocket instant. it maybe work!
Iman Ghasrfakhri
|
|
|
|
|
Using CRichEditCtrl, I can display western languages such as German French etc.
But when I set the string of a CRichEditCtrl as list box entry it reverts to the equivalent English string.
What is the problem.
laiju
|
|
|
|
|
Dumn question, but what is the equivalent of C#'s null keywork in non Whidbey Managed C++? I want to check whether a gcroot reference I have refers to a valid object or not.
Joel Holdsworth
-- modified at 6:30 Saturday 5th November, 2005
|
|
|
|
|
are you talking about the NULL macro defined as #define NULL ((void*)0) ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
No, in C# you have reference types, which are nullable. In Managed C++ you have the gcroot template which is used for wrapping CLR reference types. I want to know how to check whether one of these references that I have refers to a valid object. I didn't think that in world of managed code is was as simple as comparing the value with zero because of the way managed memory management works.
Joel Holdsworth
Wanna give me a job this summer?
Check out my online CV and project history[^] - now available in MSWord format![^]
|
|
|
|
|
Simply comparing to NULL seems to work fine.
__gc class ManagedClass
{
};
class UnmanagedClass
{
gcroot<ManagedClass *> m;
public:
UnmanagedClass() : m(new ManagedClass())
{}
virtual bool unmanagedFunction() const
{
if (m == NULL)
cout << "Hai";
return true;
}
};
BTW, you'd get better answers in the C++/CLI forum.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hello everyone,
I have next problem : I have just installed Visual Studio 2005,without removing Visual Studion 2003.Net , then I opened a VS2003 C++ Project in VS2003 IDE , modified some code ad clicked Debug and got an error :
HugeIntDemo fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'Debug/HugeIntDemo.pch', line 1)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
And in Release Build , with the latter error I get additionalyy this error :
HugeIntDemo fatal error C1060: compiler is out of heap spaceHugeIntDemo fatal error C1060: compiler is out of heap space
This happens with all VS2003 Projects, Can anybody help?
thanks
I have fixed the problem if anyone has the same problem than enter the Debug directory of the current project and delete all files inside...
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
I have written dll pgm for ATM NIC card using socket pgm in c++
I am getting an error no 10055 (No buffer space available)when i have executed this pgm.
I tried all the solutions like editing the registry to increase the socket size which were mentioned in different sites, MSDN etc but still this error is existing.
So what should I do for this error.
One more thing i observed is that when i give the VPI value as 0 then it is showing as though some thing is getting transmitted but the VPI value other than zero then error 10055 is appearing.
|
|
|
|
|
This happens sometimes when the internet connection has (just) been dropped.
Did you check that?
SkyWalker
|
|
|
|