Originally posted by: Hanhlona
assume i create a project in SDI, when i run my program, how can i save the data that the user input in it and how can i open the file i saved?
Please help me
Thank you
Originally posted by: Frog
Is there a fix for the problems with vertikal docked menues? If the menu is vertikal docked the menue items get lost, because they were placed like horizontal docked. And there is a second problem. The menue bar has a close SysIcon in the caption bar. If you close the menue you will never get it!
ReplyOriginally posted by: taobell
Add follows to Afxcmn.inl(vc98\mfc\include)
It is not a very clever method.but it works..;)
When you build release version for the toolbar.
you may get four errors.
undefined TB_SETINSERTMARKCOLOR
undefined TB_GETINSERTMARKCOLOR
undefined TVM_SETINSERTMARKCOLOR
undefined TVM_GETINSERTMARKCOLOR
//======================
#define TB_SETINSERTMARKCOLOR (WM_USER + 88)
#define TB_GETINSERTMARKCOLOR (WM_USER + 89)
#if (_WIN32_IE >= 0x0400)
#define TVM_SETINSERTMARKCOLOR (TV_FIRST + 37)
#define TreeView_SetInsertMarkColor(hwnd, clr) \
(COLORREF)SNDMSG((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
#define TVM_GETINSERTMARKCOLOR (TV_FIRST + 38)
#define TreeView_GetInsertMarkColor(hwnd) \
(COLORREF)SNDMSG((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
#endif // (_WIN32_IE >= 0x0400)
//======================
Originally posted by: Israel Rosas Hernandez
Thanks
I downloaded the Project but I can not open it. I have Visual C++ 6.0. Can you sende me a copy. I think that maybe the file is corrupted.
Originally posted by: SnowFei
This menu in Lib doesn't supply keyboard.
1.when u push the ALT key down and up,the menu doesn't emboss.
2.when u push the ALT_F key down and up,u can't cancel the drop menu with ESC key,ALT key and mouse event.
3.this time u cann't select the other submenu and the NUM,CAP,SCR in statubar don't work,too.
Sorry, i am not good at English.
i hope you can know my means!
thanks!
Originally posted by: hugh
I have a number of 'top level' menus, ie menus that directly lauch a command, rather than a sub menu.
It appears that these classes don't recognise this case. I cannot figure out how, or where to intercept it. Can anyone help please?
Originally posted by: Frank
The same problem appears when i want to rebuild the client project in release version
Please, help me
Frank
I try to rebuild the dll in release version but i have some errors like this.
E:\Visual Studio\VC98\MFC\INCLUDE\afxcmn.inl(326) : error C2065: 'TVM_GETINSERTMARKCOLOR' : undeclared identifier
Originally posted by: rinix
Very nice work !
and I'll use the auto-subclassing feature for my future custom controls
Just one question :
How to load the icons from a resource (from the toolbar resource or a resource-only dll with icons or a bitmap) ?
Thanks.
ReplyOriginally posted by: Viktor
I've got similar problems trying to work with Your sample projects in VC 6.0. It's really good idea to make samples easier (more understandable I mean).
Thank You.
Originally posted by: Andreas Roth
HKEY OpenRegKeyPath(HKEY hBegin,LPCTSTR lpszRegPath)
void CNGenericPopup::PlayPopupSound()
hKey = OpenRegKeyPath(HKEY_CURRENT_USER,
void CNGenericPopup::PlayMenuCmdSound()
hKey = OpenRegKeyPath(HKEY_CURRENT_USER,
Step 2: Add PlayPopupSound() at the end of ShowMenu(), add PalyMenuCmdSound() after PostMessage()
Step 3: Insert the mmsystem.h header at the begining of ngenericpopup.cpp and add the winmm.lib to the
library settings
Here's the sound support for the emnu system.
Step 1: Add this three function to the ngenericpopup.cpp
{
LPTSTR lpszName = new TCHAR [64];
int begin = 0;
HKEY hTemp;
HKEY hKey;
DWORD dw;
hTemp = hBegin;
for( int i = 0; i <= lstrlen(lpszRegPath); i++ )
{
if( lpszRegPath[i] == '\\' || i == lstrlen(lpszRegPath))
{
lstrcpyn(lpszName,&lpszRegPath[begin],i-begin+1);
if( RegCreateKeyEx(hTemp,
lpszName,
0,
REG_NONE,
REG_OPTION_NON_VOLATILE,
KEY_WRITE|KEY_READ,
NULL,
&hKey,
&dw) == ERROR_SUCCESS )
{
RegCloseKey(hTemp);
hTemp = hKey;
}
else
{
hKey = NULL;
break;
}
begin = i + 1;
}
}
delete lpszName;
return hKey;
}
{
LPTSTR lpszSound = new TCHAR [MAX_PATH+1];
DWORD cbSound = MAX_PATH+1;
HKEY hKey;
_T("AppEvents\\Schemes\\Apps\\.Default\\MenuPopup\\.Current"));
if( hKey != NULL &&
RegQueryValueEx(hKey,NULL,NULL,NULL,(LPBYTE)lpszSound,&cbSound) == ERROR_SUCCESS)
{
PlaySound(lpszSound,NULL,SND_FILENAME);
}
delete lpszSound;
}
{
LPTSTR lpszSound = new TCHAR [MAX_PATH+1];
DWORD cbSound = MAX_PATH+1;
HKEY hKey;
_T("AppEvents\\Schemes\\Apps\\.Default\\MenuCommand\\.Current"));
if( hKey != NULL &&
RegQueryValueEx(hKey,NULL,NULL,NULL,(LPBYTE)lpszSound,&cbSound) == ERROR_SUCCESS)
{
PlaySound(lpszSound,NULL,SND_FILENAME);
}
delete lpszSound;
}