|
gloriousgopi wrote: after displaying the dialog, my application gives some
Assertion Error.
What assertion , its showing ? where its taking you in the code?
|
|
|
|
|
|
Debug Assertion Failed!
Program : file path.
File : wincore.cpp
Line : 884
Gopinath MV
|
|
|
|
|
Its not sufficient for answer
|
|
|
|
|
You might mention that this is not with VC++ v6.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi All,
I have created custom log file and its key is added to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\CustomLog. But if I give a path value greater than say 100 characters for File key under CustomLog windows is not taking this path. Is there any restrictions on path length for File key in registry?
C++beginer
|
|
|
|
|
ashokvishnu wrote: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\CustomLog. But if I give a path value greater than say 100 characters for File key under CustomLog windows is not taking this path. Is there any restrictions on path length for File key in registry?
could i know your actual coding syntax
"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
Support CRY- Child Re
|
|
|
|
|
Hello all..,
I have to create one socket server application. In which server's prog is written in C Language and is run by CMD prompt..Now i have to develop one client prog by VC++ such that it can call that socket server's prog...
So plz help me!!!!!! that how it can be possible ...and i'm also new to MFC...
Waiting for reply...
alpa shah
|
|
|
|
|
if what u want is to run the exe from the clicent, use ShellExecute.
ShellExecute( 0, _T("open"), _T("c:\\WINDOWS\\system32\\calc") ,0,0,SW_SHOW);
un the place of c:\\WINDOWS\\system32\\calc, put the full path of ur exe.
nave
|
|
|
|
|
Naveen R wrote: ShellExecute( 0, _T("open"), _T("c:\\WINDOWS\\system32\\calc") ,0,0,SW_SHOW);
i believe he want to create Socket Server 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
Support CRY- Child Relief and You
|
|
|
|
|
Thanks for ur suggestion...I'll surely apply it....
alpa shah
|
|
|
|
|
or you can use ShellExecuteEx
|
|
|
|
|
alpa shah wrote: have to develop one client prog by VC++ such that it can call that socket server's prog...
So plz help me!!!!!! that how it can be possible ...and i'm also new to MFC... '
Run your Socket Server Program on CMD line.. and (If you Know, or Idea about sockets) you have to to create a client program and connect to ip of your computer system and post at which socket server is listening.
if you don't know the ipaddress of your computer you can use loopback ipaddress i.e. (127.0.0.1)
"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
Support CRY- Child Relief and You
|
|
|
|
|
hey will you help me... what are the codes to convert numbers to words???
|
|
|
|
|
vansmiles wrote: convert numbers to words
Is it the strings you mean when you say words.
If affirmative, there is a function itoa() that can be used to do this.
If you mean a DWORD value:
A DWORD value is an 32 bit unsigned integer
If WORD:
A WORD is a 16 bit unsigned integer.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
This is a common task ( actually, it's a common homework task, is this homework ? )
Think about what you want to do. Think about how your brain processes it. Then think about how to reproduce that in code.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Nah, that'll never work. You're asking the OP to do something many recent posters here can't. You asked for it three times
I have some VBA code for generating page footers in Excel which includes a page number in Roman numerals, if that's any help ...
Steve S
Developer for hire
|
|
|
|
|
Do you need to convert string to number
|
|
|
|
|
Are you wanting
123 = 'one hundred twenty three'
or
123 = '123'
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Ladies and gents,
We have a small suite of programs that automate sending recorded voice audio files to a user provided e-mail address. In the next version, we would like to import the user's Outlook or Outlook address book details rather than having duplicate e-mail address books on the system. Can someone point me to an easy way to do this, preferably in C++?
Regards,
Steve
|
|
|
|
|
Hi Steverty,
This was a code that we created for some of our application. Use it if it seems useful to you...
_ApplicationPtr pApp;
_ItemsPtr pItems;
MAPIFolderPtr pFolder;
_ContactItemPtr pContact;
HRESULT hr;
try
{
hr=pApp.CreateInstance(__uuidof(Application));
if (FAILED(hr))
{
MessageBox("Unable to instantiate Outlook.",
"Outlook Error",MB_OK);
return 0;
}
if (true)
{
pFolder=pApp->GetNamespace(_bstr_t("MAPI"))->
GetDefaultFolder(olFolderContacts);
if (pFolder==NULL)
{
MessageBox("Could not find default contacts folder.",
"Outlook Error");
return 0;
}
}
else
{
pFolder=pApp->GetNamespace(_bstr_t("MAPI"))->PickFolder();
if (pFolder==NULL)
return 0;
if (pFolder->GetDefaultItemType()!=olContactItem)
{
MessageBox("Select folder is not a Contact folder.",
"Outlook Contacts");
return 0;
}
}
pItems=pFolder->GetItems();
if (pItems==NULL)
{
MessageBox("Unable to get Contact Items.","Outlook Error");
return 0;
}
pContact=pItems->GetFirst();
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I have an mfc app that is behaving badly - exhibiting random lockups. It might be the OS, but I don't think so The hang appears to happen when I am leaving a dialog.
I have two styles of leaving a dialog, and based on what I have read in the MS doc, both should be okay. Style 1:
class::OnClickExitBtn()
{
// release all dialog resources.
EndDialog(IDC_EXIT_BTN);
}
Now, in the MS doc, it states that EndDialog sets a flag in the message pump such
that the dialog will exit. Of note is that it will not process any further messages.
Style #2 is:
class::OnClickExitBtn()
{
// All allocated resources in this class released in destructor.
EndDialog(IDC_EXIT_BTN);
}
Style 2 simply moves everything to the destructor. I thought this had cleaned up the hangs, but one just happened again.
So, what is the correct exit procedure from a dialog with allocated resources, timers, etc? Any practical experience to shed some light on this? A past project was very suspicious of SetTimer and avoided it like the plague - using a thread to generate an application message....
Thanks for your thoughts...
chg
Charlie Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.
My son's PDA is an M249 SAW.
My other son commutes in an M1A2 Abrams
|
|
|
|
|
I've used SetTimer extensively, and not had it cause the problem you describe. The reason most people have problems with it is that they expect it to be accurate. Windows' handling of WM_TIMER messages is such that they don't occur at the interval you expect. BTW, you don't need to issue a KillTimer() when you exit your dialog.
Rather than deallocating things and releasing resources in the destructor for my CDialog objects, I usually override PostNcDestroy() for that sort of thing. This seems to match up better with initialization performed in an OnInitDialog() override. It also works better when you re-use a given CDialog -derived object.
Software Zen: delete this;
|
|
|
|
|
I agree that the SetTimer can be wildly inaccurate, but for me, I just need the periodic event. I also concur with what you say about timer cleanup. I'll do some more reading on the PostNcDestroy method... maybe something is there.
Thanks
Charlie Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.
My son's PDA is an M249 SAW.
My other son commutes in an M1A2 Abrams
|
|
|
|
|
Gary - one other question - reading about PostNcDestroy, MS says, "Derived classes can use this function for custom cleanup such as the deletion of the this pointer."
Now, I only use the dialog via .DoModal(). Based on what I've read, I would only need to worry about this if I had done a Create operation...
Sorry, grasping for any kind of memory or resource leak....
Charlie Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.
My son's PDA is an M249 SAW.
My other son commutes in an M1A2 Abrams
|
|
|
|