|
Call AfxEnableControlContainer in InitInstance
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
thanks sir
Your reply has give my thought a new direction thank you very much;
could you plz send me a sample program that will help me a lot.
regards
Azam
|
|
|
|
|
A class that forma part of a larger software component implements the bubble sort and sequential search on ana array of type double.The client wishes to replace the bubble sort by the Quicksort and the sequential search by the binary search.Both the quicksort and binary search are to be implemented recursively.Use inheritance to implement the two classes and demonstrate the use of polymorphism
|
|
|
|
|
Can we first have the name of your instructor to see if it is permissible for others to do your homework? I'm sure asking for help on specific aspects of the problem is ok (only after you've tried and failed, though), but to just outright ask others to do your homework is an absolute no-no. Good luck!
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I need your help!!!!
I need to do a Dinamic menu during execution. The question is that I have a Menu, in this menu is a Submenu. OK, I need insert option in this Submenu and when click in one option execute a diferent functions.
How can I do it?
|
|
|
|
|
Hi,
How can I change the icon that is displayed in the menu bar when a document is maximized in an MDI application while it has no doc/view suport.
Best regards.
Thanks.
There is no spoon.
|
|
|
|
|
To change the icon get a pointer to the maximized frame window. You can then call SetIcon() on this. You will also have to call DrawMenuBar() on the main frame to get the change to be updated on the screen as it will not be redrawn until you do.
If you vote me down, my score will only get lower
|
|
|
|
|
the following is part of code from Nero SDK (NeroCmd), which recursively generate a ISO tree for buring, the main concept is finding all subfolder & folders of passed in directory "psFilename", this code works fine under console mode, but when I tried to put it to my MFC project my program always auto close due to it, but sometimes my code could get through without any modification, anybody knows what is going on here? is that because there's a memory limitation for MFC dialog application, due to the recursion here.
CExitCode CBurnContext::CreateIsoTree (const PARAMETERS & params, LPCSTR psFilename, NERO_ISO_ITEM ** ppItem, int iLevel)
{
// CFindFiles is a helper class for file and subdirectory handling
CFindFiles ff (psFilename);
*ppItem = NULL;
if (!ff.IsValidEntry())
{
if (0 == iLevel)
{
// If we haven't found any entries and we are on the
// first level of recursion then this should be
// reported as an error.
m_ErrorLog.printf ("File specification '%s' resulted in no matches!\n", psFilename);
return EXITCODE_FILE_NOT_FOUND;
}
else
{
// If we are on a level other than first, it is ok
// not to find any entries. This simply means we
// stumbled upon an empty directory somewhere in a tree.
return EXITCODE_OK;
}
}
char sPath[MAX_PATH];
// Make sure that we have no relative path names, but only absolute paths
if (NULL == _fullpath (sPath, psFilename, sizeof (sPath)))
{
// Our path buffer is too small. Bail out!
return EXITCODE_INTERNAL_ERROR;
}
// Find the last blackslash and remove it if found.
// This will leave us with a root directory.
LPSTR psBackslash = strrchr (sPath, '\\');
if (NULL != psBackslash)
{
*psBackslash = '\0';
}
do
{
std::string sNewPath;
sNewPath = sPath;
sNewPath += "\\";
sNewPath += ff.GetName ();
if (ff.IsSubDir())
{
// Here we handle subdirectories
// strcmp returns 0 on equal strings.
// Proceed if name contains none of "." or ".."
if ((0 != strcmp (ff.GetName (), ".")) && (0 != strcmp (ff.GetName (), "..")))
{
// Append a wildcard to the path and do a recursive search.
sNewPath += "\\";
sNewPath += ff.GetWildcard ();
NERO_ISO_ITEM * pNewItem = NeroCreateIsoItem ();
if (NULL == pNewItem)
{
DeleteIsoItemTree (*ppItem);
return EXITCODE_OUT_OF_MEMORY;
}
// Attach this item to the beginning of the list.
if (*ppItem != NULL)
{
pNewItem->nextItem = *ppItem;
}
*ppItem = pNewItem;
pNewItem->isDirectory = TRUE;
time_t t = ff.GetCreateTime ();
pNewItem->entryTime = *localtime (&t);
StoreFileName (pNewItem->fileName, pNewItem->longFileName, ff.GetName ());
// If we the user wants recursive search, only then do we
// actually recurse at deeper levels otherwise ignore directories
// alltogether.
//
if (params.GetRecursive ())
{
// Create an ISO item tree at a deeper level
EXITCODE code = CreateIsoTree (params, sNewPath.c_str (), &pNewItem->subDirFirstItem, iLevel + 1);
if (EXITCODE_OK != code)
{
DeleteIsoItemTree (*ppItem);
return code;
}
// We don't allow empty directories. This should probably
// be regulated by a command line switch.
//
if (pNewItem->subDirFirstItem == NULL)
{
// If the newly added directory is empty, remove it!
// We first detach it from the list and then
// deallocate it.
//
*ppItem = pNewItem->nextItem;
pNewItem->nextItem = NULL;
DeleteIsoItemTree (pNewItem);
}
}
}
}
else
{
// Here we handle regular files
NERO_ISO_ITEM * pNewItem = NeroCreateIsoItem ();
if (NULL == pNewItem)
{
DeleteIsoItemTree (*ppItem);
return EXITCODE_OUT_OF_MEMORY;
}
StoreFileName (pNewItem->sourceFilePath, (char *) pNewItem->longSourceFilePath, sNewPath.c_str ());
pNewItem->isDirectory = FALSE;
time_t t = ff.GetCreateTime ();
pNewItem->entryTime = *localtime (&t);
StoreFileName (pNewItem->fileName, pNewItem->longFileName, ff.GetName ());
// Attach this item to the beginning of the list.
if (*ppItem != NULL)
{
pNewItem->nextItem = *ppItem;
}
*ppItem = pNewItem;
}
ff.FindNext ();
}
while (ff.IsValidEntry ());
return EXITCODE_OK;
}
|
|
|
|
|
Default stack size is the same for MFC apps vs console apps (1MB if I remember correctly). However with an MFC app, you'll find much more of your stack being used by MFC itself. The console app doesn't have this overhead which is why it was running OK. Also, if you're running a debug build, a lot of the stack is being used by all the debugging info.
Since you're pretty close, fails sometimes and not others, you could probably just bump up your stack size a bit and be OK. This is done via a link option, covered in MSDN here[^].
Another option would be to dump this code out into a worker thread, which will have it's own stack and won't have the MFC overhead using alot of it.
-----
In the land of the blind, the one eyed man is king.
|
|
|
|
|
hi,
I am doing a MFC Program & going to add a Rich Text Box to a Dialog. I can add Rich Text to a Dialog Box.But after compile & Run,the Application is not DISPLAYED. Why like this??
can any body please reply me.
Thanks...
|
|
|
|
|
This also happened to my program, but when I re-installed Visual Studio, it worked. Any one who knows why this happens?
Arsalan Malik
|
|
|
|
|
pubududilena wrote:
But after compile & Run,the Application is not DISPLAYED. Why like this??
You have not loaded the rich edit DLL. This can be done by calling AfxInitRichEdit() . This is laid out in detail here.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
hi..
Can u give me idea of Create Thumbnail of MS WORD file first Page.
I'm using vc++ & asking used to select file from my list box. then there is a preview box there which sud show image preview of Word file selected in listbox.
I hope u must have an idea..
Thanks
---Sumit Kapoor---sumit_kapoor1980@hotmail.com
|
|
|
|
|
Hi !
Our team just moved to VS.NET and we are facing some problems with the build-in debugger : very often, variables seem uninitialized in the debugger, where they actually are. This makes the debugging very difficult.
Any idea what's wrong ?
Other problem : very often, when the app crashed in a DLL it is using, the call stack is useless because it is almost empty and I cannot track back to the function which called the DLL function.
And, as aside question : would you recommend using another debugger on the Windows platform ?
Thanks for your advices,
Jerome
|
|
|
|
|
I've seen odd debugger issues in VC 2003 as well, and a rebuild-all of the solution has always cured them.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
"How does one know if one's aura is dirty? Does someone come along with their finger and write 'wash me' on it?"
-- Buffy
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
Dear Memebers,
Wishes to all !
Here i am looking for some tips to create my own utility to autofill the contents in a web page fields.
Please suggest do anybody have developed it yet. If somebody have any Idea about it. please let me know.
To know more about google toolbar please visit : http://www.google.com
Please spare your time to reply this post, its urgent
With Regards
|
|
|
|
|
Hey all,
I am trying to get the page size of the page and then printing certain words on the page.
This is what I have so far.
<br />
<br />
CPrintDialog dlg(FALSE); <br />
CDC dc; <br />
#if 0 //Show print dialog. <br />
if (dlg.DoModal() == IDCANCEL) <br />
return; <br />
dc.Attach(dlg.GetPrinterDC());<br />
#else //Don't show print dialog. <br />
PRINTDLG prtDlg; <br />
AfxGetApp()->GetPrinterDeviceDefaults(&prtDlg);
dlg.m_pd.hDevMode = prtDlg.hDevMode; <br />
dlg.m_pd.hDevNames = prtDlg.hDevNames; <br />
dc.Attach(dlg.CreatePrinterDC());<br />
#endif <br />
dc.m_bPrinting = TRUE;
<br />
dc.GetDeviceCaps(LOGPIXELSX/LOGPIXELSY); <br />
<br />
CRect printArea;<br />
printArea.SetRect(LOGPIXELSX/3, LOGPIXELSY/3, dc.GetDeviceCaps(HORZRES), dc.GetDeviceCaps(VERTRES));<br />
<br />
CString str("Delayed Entry");<br />
dc.DrawText(str, printArea, DT_NOPREFIX | DT_WORDBREAK);<br />
<br />
<br />
It is printing, but not where I need it to print. Am I doing it wrong or is there something I am missing?
Thanks
|
|
|
|
|
Hello,
I wanted to know how one can handle an installation of the application only once.
I mean to say that, if a software has to be installed on a system, then it can be installed only once on that system and if a person tries to install it on another system then that person should not be able to do it.
I hope the problem which I have mentioned is clear and hope to hear for a solution at the earliest. I would like to have a solution either in VC++ or VB and would also appreciate if there is a sample program to guide me.
Regards,
Mythri
|
|
|
|
|
I know of no easy way to do this. A remote possibility would be to extract some sort of unique identifier from the machine and hardcode that into your application. The installation would then be limited to that machine only, since no other machine would have that same number.
Since the program might be installed from a CD, you can't alter the state of the .exe file.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
HI,
I m new to ATL DLL
I want to make a Dll from which i want to get the functionality of CSocket class through ASP.NEt.
I run the ATL COM wizrad use ATL DLL , soporting MFC , proxt stub , MTS all ..
I added a MFC Class CSock Inherited from CSocket class.
When i compile it . it gives error .
CSocket undefined ???????????
How i can handle it.
and i want to use this DLL for ASP.NEt page to give the functionalty to a ASP.Net page connect to a client application through IP and Port.
m i doing a right solution. means ATL DLL , and use this DLL behind a ASP.NET page.
and tell me y CSocket is Undefined
thanx
Regards.
|
|
|
|
|
Hi All
I have some problem in dialog box application.
I insert two dialog box namely Dialog1 and Dialog 2. Dialog1 contains a command button (Click).Dialog2 contains static text(“Hello Word”) and add member variable m_Hello of CStatic type.
I know “How to call dialog box on pressing the Click command”.
I would like to know that When I press Click button on a dialog1 then second Dialog2 should be called and static text should be hide on dialog2.
What should I write a code on the Click button.
I wrote code on the click button something like that
void Cdialog1::OnClick()
{
// TODO: Add your control notification handler code here
Cdialog2 dlg2;
//m_.ShowWindow(SW_HIDE);
m_Hello.ShowWindow(SW_HIDE)
dlg2.DoModal();
}
Any help is appreciated.
rajesh
|
|
|
|
|
Hello,
you must do the hide action in the OnInitDialog function from dialog2 ( use class wizard to add this function)
|
|
|
|
|
If the static control on the second dialog is just going to be hidden once the dialog is instantiated, why bother showing it in the first place? Is there going to be some sort of mechanism on the second dialog that could potentially unhide the static control.
Rajesh_K_Sharma wrote:
m_Hello.ShowWindow(SW_HIDE)
This will not work because m_Hello does not belong to Cdialog1 . The compiler no doubt pointed this out.
If the second dialog is modal to the first, there is no way the first dialog can communicate with the second dialog once DoModal() has been called.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have included <vmr9.h>,but error shows:
VMR_Capture.obj : error LNK2001: unresolved external symbol _IID_IVMRWindowlessControl
this project needs which .lib file?
|
|
|
|