|
in using MDI, can i load an icon to my main frame or childframe upon an action? for example when i click a button, the mainframe's icon will change
|
|
|
|
|
See your initinstance ofyour application:(this line from it)
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
return FALSE;
You do the same as this function
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
i have tried using that. but it cant work. is there any other commands i can try?
|
|
|
|
|
what's your code that it does't work?
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
i tried with a new MDI project. with the original icon IDR_MAINFRAME. when i edit/color the icon, and compile it, the mainframe does not contain the icon i have. it still have the old original MFC icon. how do i go about changing it?
|
|
|
|
|
Sorry,I made mistake There is an example in MSDN that you can find your answer,MDIDOCVW,check it ,you'll find the answer
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
Why doesn't this code work, and can you complete it?
CFileFind finder;
BOOL bWorking = finder.FindFile("fcc32.exe");
while (bWorking)
{
bWorking = finder.FindNextFile();
CString str = finder.GetFilePath();
MessageBox(str, "", MB_OK);
}
It's simple, I want to searc over the C drive to look fpo the file fcc32.exe and then show a message box with the path to the file...
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
The problem is that when the file is on the root of your drive the bWorking
will be true so you don't messagebox.
Mazy
Don't Marry a Person You Can Live With...
Marry Someone You Can Not Live Without
|
|
|
|
|
CFileFind is not recursive, so it won't search subdirectories. You need to do something like this:
CString FindMyFile(LPCTSTR apszFromDir)
{
CFileFind finder;
CString search;
search.Format(_T("%s\\*"), apszFromDir);
BOOL bWorking = finder.FindFile(search);
while (bWorking)
{
bWorking = finder.FindNextFile();
if (!finder.IsDots())
{
if (finder.IsDirectory())
{
return FindMyFile(finder.GetFilePath());
}
else
{
if (finder.GetFileName().CompareNoCase(_T("fcc32.exe")) == 0)
{
return GetFilePath();
}
}
}
}
return _T("");
}
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
urgh sorry about the title i didn't know how to express myself. Here's my question:
When you have the following code, does the variable change inside the if-statement cause the else to be called or does it cause any unwanted effects???
m_bBool = false;
if(m_bBool==false)
{
// This gets called... or the other way around
m_bBool = true;
}
else
{
// Does this get called? afterall we changed the value to true...
m_bBool = false;
}
I hope you understand what i mean...
Thanks
Kuniva
--------------------------------------------
God gave man a penis and a brain but not enough blood to make both of 'em work at the same time.
|
|
|
|
|
A really short answer: No
The if expression is already evaluated. So your else will not run and no side effects will occur.
Magnus
|
|
|
|
|
Does anyone know what applications support the HTML clipboard format.
I think it's only supported by Word 2000, but no earlier versions. Can anyone confirm this?
Thanks,
Ed
|
|
|
|
|
I *think* outlook does too.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Hi,
I'm developping an ATL COM control to work with FTP servers. I use Ftpxxx(...) API functions, which almost all return the error status with the function 'GetLastError'; no problem. The problem is that it returns error numbers like 12003 or 12017, all involved to Ftp functions and NO ONE OF THEM IS LISTED IN 'GetLastError' ERRORCODES!!.
I've found some of them looking at Mircosoft's web (not all which appeared!) but it only returns this error nor the list of all the possibilities. It's a problem!..I don't know how recover from an unknown error!!
Anyone knows where to find these errors?
Thanks in advance.
Edgar Berengena Moreno
Software Engineer
La Salle University, URL.
Barcelona, Spain.
|
|
|
|
|
To be found in WININET.H delivered with MS VC++ 6.0
//
// Internet API error returns
//
#define INTERNET_ERROR_BASE 12000
#define ERROR_INTERNET_OUT_OF_HANDLES (INTERNET_ERROR_BASE + 1)
#define ERROR_INTERNET_TIMEOUT (INTERNET_ERROR_BASE + 2)
#define ERROR_INTERNET_EXTENDED_ERROR (INTERNET_ERROR_BASE + 3)
.
.
.
.
So far ... RockNix///
---------------------------------
www.klangwerker.de
Look out for free Win32
Serial Communication Module
for VC++ or Borland C++ Builder
---------------------------------
|
|
|
|
|
Thanks!
Sometimes is easier browse internet and create a thread than think a little...
Thank you again.
Edgar
Edgar Berengena Moreno
Software Engineer
La Salle University, URL.
Barcelona, Spain.
|
|
|
|
|
Hi,
I have an error when I executing my stored procedure.
If anyone can help me for that it is great ?
My sample code is :
I would like that the stored procedure return a int value. But I dont know how can I do this ?
_variant_t vtroyal ;
int intRoyalty =0;
//Assign Integer value
vtroyal.vt = VT_I4;
vtroyal.iVal = intRoyalty;
pParam4 = pCmd2->CreateParameter ( _bstr_t ("StartFileNumV2"), adInteger,
adParamReturnValue, sizeof(int), vtroyal);
pCmd2->Parameters->Append ( pParam4);
When I execute this a error message appear :
idispatch error 3092 : ADO
Best regards
youssef
|
|
|
|
|
How should I get a Device Context for painting non-client areas?
Thanks,
Jon
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Use GetDCEx - there is sample code in MSDN topic WM_NCPAINT.
|
|
|
|
|
Hi All,
In my dialog based application, I’m creating a toolbar in child dialog (in short not main dialog) in OnInitDialog()
wnd_AttribToolbar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP ,AFX_IDW_TOOLBAR);
wnd_AttribToolbar.LoadToolBar(IDR_TOOLBAR1);
wnd_AttribToolbar.ShowWindow(SW_SHOWNORMAL);
My problem is if I’m calling DoModal() for first time this Toolbar gets created, but in subsequent calls I cannot see bitmap of this Toolbar while all 6 toolbar-buttons are visible.
Thanks for your time.
-- Sumit
Sumit Pandya
-- modified 1-Aug-19 21:02pm.
|
|
|
|
|
|
in a COM object,the class implement some interface can have
a destruct function?
when the destruct fuction is executed?
|
|
|
|
|
Typically, COM objects implement the IUnknown interface, which controls the lifetime of an object via methods AddRef and Release . This is usually the preferred method for acquiring/passing around/destroying an object, instead of some ad hoc destruction function.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Has anyone ever used SetupDiEnumDeviceInterfaces? If so what the &%$#@ is the
"CONST LPGUID InterfaceClassGuid" parameter refering to? I have tried values from the "devguid.h" but I get nothing. SetupDiGetClassDevs works with GUID_DEVCLASS_PRINTER and others like it.
Has anyone ever found a generic way of enumerating devices and/or drivers on Win NT/2000. I'm just about to tear my hair out trying to find the device name for a USB printer.
Why does it have to be so hard???
|
|
|
|
|
Joe Moldovan wrote:
Why does it have to be so hard???
Because you are going too fast. I've had a copy of 'Programming the Windows Driver Model' for about a month now and have reached page 44. (Well, I skipped over some of the hard to remember names - ever read Dostoyevski?).
You have plunged right into stuff that doesn't surface till page 62. But the key seems to be the call to SetupDiGetClassDevs. Check the docs on that.
If you would like to rant together, I suggest we start by whining about the fact that once we figure this out, we'll have to find out how NT does it... sigh...
|
|
|
|