|
Hi all,
I am deriving a class from CWnd , I just want to display images from a CListImage . What I really need is to display images like Emoticon Window in messenger like applications.
I saw an article in C# which creates an emoticon window, I tried myself but were unable to do in VC++/MFC
Please anybody help me to create a window like the one I need.
Thanks.
The Phantom
|
|
|
|
|
PLEASE DISREGARD THIS POST - I WAS ONLY JOKING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
Hmm
Whois Server Version 1.3
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http:
for detailed information.
No match for "PROGRAMMINGHOMEWORK.COM".
It might just work. A mate of mine from university set up www.cheathouse.com[^]. Makes a packet out of it too.
Ryan
"Everybody has a right to be stupid, but
some people abuse the privilege."
Uncle Joe Stalin
|
|
|
|
|
I was just kidding. Maybe someone would be willing to put something together to make some $$$.
|
|
|
|
|
Ok, I'll take you up on it. I've *very* new at this and assume the question is trivial, but can't seem to figure out how to get the documentation to tell me what I want to know.
I need to read a string and, if it's a number, convert it to double. How do I tell whether the string (input via the Console::ReadLine() method) contains only numeric characters (and can therefor be correctly converted to double via the Convert::ToDouble() method) or not?
If this turns out not to be trivial, just let me know and I'll think of something else. Maybe get a stream of chars or something (yuck!)
|
|
|
|
|
Your question sounds like a sincere request for advice - and I would gladly answer it if I could - but I am only familiar with MFC and C++ - I think your question is either .NET, JAVA or C# (I have no idea).
|
|
|
|
|
Terry O`Nolley wrote:
but I am only familiar with MFC and C++ - I think your question is either .NET, JAVA or C# (I have no idea).
No...it's C++ with managed extensions
When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?"
-Hockey on being a geek
|
|
|
|
|
Even though this isn't C/C++ like Terry said, you can still use this same method that I'd use.
Write a function that checks each character to see if it is a number or not. Return true if its a number and false if not. If it reaches the end of the string without returning false, then it converts it double, else it fails.
Two ways I can think of to do this. One is just check the char is equal to any number 0-9 (this probably isn't the most effective way) or convert to ascii and check if it is within the ascii range for a number.
Mike
|
|
|
|
|
You could look at the System::Text::RegularExpressions namespace and create a regular expression that would match the characters 0-9...then check to see if the thing is a match. You could also use the Microsoft::VisualBasic namespace and the IsNumeric() function.
Also, I think the Convert::ToDouble() throws an exception if the input string is not in a proper format. (Actually I know so, I just did this the other day in C#). You could wrap the call to ToDouble() in a try catch block and handle the error whichever way you want.
Hope that helps...
When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?"
-Hockey on being a geek
|
|
|
|
|
If you wish to buy some advertising then please contact marketing@codeproject.com. Advertising in this way is, unfortunately, unacceptable.
cheers,
Chris Maunder
|
|
|
|
|
Code-Project would accept sponsors whose product was selling homework completion for students?!?!?!?!?
I guess so, or you wouldn't have referred my joke to your ad dept - or was that in itself a joke??!??!
I am so confused!
Anyways, I was just joking.
Have a cheerful day!
|
|
|
|
|
What fun!!!
|
|
|
|
|
Is there a way to detect if a UNC path is actually a folder on the local machine that is being shared?
|
|
|
|
|
The function WNetGetUniversalName may be of help.
--
Joel Lucsy
|
|
|
|
|
Hello,
I have this code
COleVariant vtOpenMethod((short)1);
LPDISPATCH pDisp;
pDisp = CRApplication.OpenReport((_bstr_t)"Grafic de ocupare pe zile.rpt", vtOpenMethod);
CRReport.AttachDispatch(pDisp);
ICRParameterFieldDefinitions apParam= CRReport.GetParameterFields();
long lCount = apParam.GetCount();
for(int i = 1; i <= lCount; i++)
{
COleVariant vtIndex ((long)i, VT_I4);
COleVariant vtReport("");
_variant_t vCurVal;
vCurVal = COleVariant(_T(m_data));
ICRParameterFieldDefinition yy = apParam.GetItem(vtIndex,vtReport);
....
}
What I want to do is to pass to my report 2-3 parameters.
If i use
yy.SetCurrentValue(vCurVal);
I get this error :
Unable to write read-only property.
Please can somebody tell me how to pass these parameters?
Thanks!
|
|
|
|
|
I was working on an Dialog app and have done a lot of work on it including UI , etc.
Now the requirement is that I need multiple pages like in a tabbed control .
I read documentation on MSDN that requires me to have a CPropertySheet object in my dialog class and then add CPropertyPage objects to it .
I have done alot of work and need a effiecient way to
Change the existing Dialog to be one of the PropertyPages
I have some basic questions :
1. Do i have to create a new app to do this and import the Dialog Resource , Create a new class from ClassWizard deriving from CpropertyPage and then manually copy / paste chunks of code for handlers and other functions from the old Dialog app ?
2. Is there a better and efficient way of doing this ?
CodeProject Gurus please help !
Engineering is the effort !
|
|
|
|
|
Just checked out some code used for property sheets. Doesn't really look that complicated to just change your dialog classes to be derived from CPropertyPage. I could be wrong though. It'd be nice if was that easy to change.
Can't think of any other way to do it.
Mike
p.s. I am def not a guru, so anyone who knows anything better, let us know
|
|
|
|
|
Hello,
How can I load a file .RC in a VC project with a different name ?? I need to load another RC file (in execution time) to load all the strings of another language.
Any idea ??
Thanks,
Cris.
|
|
|
|
|
Unless you have a reason not to, you can put all of the resources in the same .RC file. Just use the LANGUAGE statment in the .RC file.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Ok, in this case I will have 2 String Tables (2 languages), right ??
And how can choose one String Table to load ??
[]'s
|
|
|
|
|
You don't load RC files at runtime, the RC file is just the source (just as you don't run C++ code, you run compiled code). The resource-related APIs all take module handles, which indicates which module to load from. Check out LoadModule() and the resource API docs for more.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Actual sign at the laundromat I go to: "No tinting or dying."
|
|
|
|
|
Hey,
i have the following problem: I made an application with 2 static splitter window...
VERIFY(m_wndSplitter.CreateStatic(this, 1, 2));<br />
VERIFY(m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CDiaSelectTree),CSize(200,500),pContext));<br />
VERIFY(m_wndSplitter.CreateView(0,1,RUNTIME_CLASS(CTestView),CSize(200,500),pContext));<br />
Now I have a problem with messages. When I select an menu-item the message is only send to my first window. How can I route the message to my second window. I created the same event function in my second-window-class but nothing happend... I'd like to recieve all messages in my 2nd window-class (CTestView).
|
|
|
|
|
You could catch your message in the MainFrame and then redispatch it to the views, by getting the curent document and parsing all its views (CDocument::GetFirstViewPosition / CDocument::GetNextView)
HTH,
K.
Silence Means Death
Stand On Your Feet
Inner Fear
Your Worst Enemy
|
|
|
|
|
I am creating a SDI application that has a TreeView, ListView and a FormView to add data to a database. I am trying to make it as dynamic as possible because it is going to be used in several projects. I have data in XML files that gets read in to fill the Tree View and List View's and then the user enters the data in via the Form View. I have a DLL which has all of the screen resources laid out for the first project and I need to make the Form View display those screen images. The class derived from CFormView has the enum in it with the IDD. I have been looking though the articles here and at codeguru and have come to a choice. I can create a picture box or custom control on the default screen and then have the generic class for the screen shots pick the screen and load it into that rectangle. Does anyone have any other input or suggestions as to how I should go about doing this?
|
|
|
|
|
When I use resizeTo(...) function in Javascript, it resizes the target window. I would like to know what is the event which is generated here which is handled by the Browser to resize the window.
We have a browser in which I have to implement this functionality and I am not able to do it. Our browser window is not getting resized. If anyone of you know how to do this, PLEASE let me know.
Thank you in advance.
|
|
|
|