|
there are 2 menus in MDI mfc app, one is for main-frame, another one for child-window.
if no child window opened, the menu used is main-fram menu, otherwise is child-window menu.
GetMenu() only gets current menu. I want to get these 2 menus in one function - or at same time (child-window may be opened or not while the function is called), how to do that?
thx.
includeh10
|
|
|
|
|
I don't understand what you want to do ? you want to always see the menu visible when a "child window" is openned ?
|
|
|
|
|
I am trying to set the cleint window background color from a menu selection. I am looking for the member fuctions needed to set the color from my menu
|
|
|
|
|
You will have to do the drawing yourself. The easiest way is probably to store the color in a COLORREF variable in the window which you want to change the background of. Update this variable with the new color and tell the window to redraw itself. Then intercept the WM_ERASEBKGND message and fill the background using this color value. There is a handy function in CDC that does exactly that -> FillSolidRect( ).
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
I think this is simple enough though the solution seems to be eluding me for almost a day now
i have a standard listctrl with checkbox ,say
m_list.SetExtendedStyle(LVS_EX_CHECKBOXES|LVS_EX_FULLROWSELECT);
what i want is to lock some of the list rows,say row 2
so that the check box value cannot be modified by the user
so i wrote the following in NM_CLICK
{
// TODO: Add your control notification handler code here
NMITEMACTIVATE* pLVCD = reinterpret_cast<NMITEMACTIVATE*>(pNMHDR);
LVITEM rItem;
int nItem = pLVCD->iItem;
ZeroMemory ( &rItem, sizeof(LVITEM) );
LVITEM rItem;
rItem.mask = LVIF_STATE;
rItem.iItem = nItem;
rItem.stateMask = LVIS_SELECTED|ODS_DISABLED;
m_list.GetItem ( &rItem );
if ( nItem ==2)
{
BOOL bSel=m_list.GetCheck(nItem);
m_list.SetItem(nItem,bSel);
m_list.Update(nItem);
}
*pResult = 0;
}
here if a checkbox is unselected and i click it
the control comes to the above code and bSel is FALSE and eventhough i say to update the list row 2 with that itself ...it doesnt work.
the rows check box gets selected invariable
i tried the same in LV_ITEMCHANGED and a couple of others as well...
but to no avail...
please put me out of my misery
what am i doing wrong??
|
|
|
|
|
1) an item does NOT have to be selected for the check to be checked/unchecked.
2) if you want to prevent the check from being checked... or unchecked... or prevent an item from being modified in any other way, just handle LVN_ITEMCHANGING and watch the status of the modified item (which, need i remind you, is not necessarily selected). If the state image changes (item state & LVIS_STATEIMAGEMASK ), then the check has been modified. If you don't agree with the modification, then just return FALSE , and the change will not occur. Otherwise, return TRUE.
Shog9
------
Rather hammer futiley at the locked door than just sit and ignore it. Obviously finding a way to get through the locked door would be even better though. - Paul Watson, My Ignorance
|
|
|
|
|
Its second time
I hope you all've used MSN messenger. The window/GUI of MSN messenger is customizable and there are many custom add-ons present. I mean that we can customize the window of MSN messenger without having the access to the original source code.
I also want to make my window based application that i can customize later without accessing the original source code, just like MSN messenger. Can any one tell me how such applications are created ???
|
|
|
|
|
By exposing an interface, so that the code to *generate* these changes is present, and so is code to parse the add-ons. At least that is what WinAmp does.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
|
Subj (I need properties window like in Explorer).
|
|
|
|
|
I'm not on my Dev machine right now, so you might have to change some of the names of the members of the SHELLEXECUTEINFO struct.
SHELLEXECUTEINFO a_stInfo;
memset( &a_stInfo, 0, sizeof( a_stInfo ) );
a_stInfo.cbSize = sizeof( a_stInfo );
a_stInfo.lpVerb = _T("properties");
a_stInfo.lpFile = _T("C:\\YourFile.ext");
a_stInfo.fMask = SEE_MASK_INVOKEIDLIST;
ShellExecuteEx( &a_stInfo );
Chris Richardson
Programmers find all sorts of ingenious ways to screw ourselves over. - Tim Smith
|
|
|
|
|
I'm supporting multiple platforms and want to make sure that the person who creates our CE installation package doesn't put a DLL for a MIPS device on an ARM device.....yeah I know I shouldn't have to do this, but I found that none of the correct files were on the device after a couple hours of trouble shooting.
Ideally I could read part of the DLL from the device and determine which platform it is supposed to run on.
Ideas??
Thanks,
Paul
|
|
|
|
|
Hi,
I want to change the font of code in my VC++6.0 IDE, but the font I wanted not listed in VC++6.0 IDE, how to realize my dream??????
Thanks a lot
Extreme programming. Do the No.1
|
|
|
|
|
stevenson wrote:
how to realize my dream??????
You need to dream a bit harder....
Is the font installed on the PC ? I can't imagine why it's not in the list, if it is.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
There is no Font such as Courier New in the list! and no Verdana. But they shows in Word2000. how to crack this????
Extreme programming. Do the No.1
|
|
|
|
|
I suspected something like what PJ has said but was not sure. I'm missing why it's so important though....
Either way, it sounds like it cannot be done.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
One can only use fixed width fonts in the VC6 IDE. Which font do you want to use? It is probably a variable width font.
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
Hi,
There are only two Font, one is Fixedsys and the other is Terminal, no more thing. It's rather boring to use only two fonts.
Extreme programming. Do the No.1
|
|
|
|
|
I like the left dragdown style in XP "My Computer",Who could tell me how to do it? Thanks
|
|
|
|
|
Please tell me as long as you know!
I along to found the answer of the question!
I can connection the database for DataGrid,i want to get current point
record!
thanks!^_^
|
|
|
|
|
Which datagrid? Ms Datagrid that is used with VC6 ?
C_Recordset::GetCursorLoacation
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Hi
I wrote a dialog based program using mfc. When I run it from another computer, the program indicates "can not find mfc42.dll, mfc042.dll....." Does anyone know how to compile the program so that these dll files will be included?
thanks
|
|
|
|
|
Project / Settings / General
change Microsoft Foundation Classes to the "Use MFC in a static library" option.
-c
A conclusion is simply the place where someone got tired of thinking.
|
|
|
|
|
I think you can create a setup package.
I am I,Who is who,I am who,Who am I
|
|
|
|
|
It depends on the version of VC you have - Standard will not allow you to bind statically, although I believe there are articles about on how to do that anyhow. In any case, the alternative is to ship the dll's.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|