|
thanx for your reply
actually i've never used property sheets before (never used tab control either ) how do i add a property sheet in the resource view? or do i have to do everything in code?
thanx
/Eric
|
|
|
|
|
you have to do everything by code...
but it is very easy:
----------------------------------------------------
here's how to embed a property sheet inside a dialog box: (THE HARD ONE)
this->m_pPSEstacio = new CPSEstacio("", this, 0);
this->m_pPSEstacio->Create(this, WS_CHILD | WS_TABSTOP | WS_VISIBLE);
this->m_pPSEstacio->ModifyStyleEx(0,WS_EX_CONTROLPARENT);
take a look at the documentation... (it's easier than it seems...)
----------------------------------------------------
Creating a modal property sheet
you've only to call DoModal()...
Hope this helps...
|
|
|
|
|
yes i already got it to work before i read your post but thank you so much for your help, this is much easier than tab control
/Eric
|
|
|
|
|
I am constructing one add-in and I need to make a compilation similar to which is made with the Visual C++ 6 (with f7 or button in the menu).
I have two problems:
1) I found an example of Microsoft in:
http://msdn.microsoft.com/code/defa...mmands_cpp.asp.
The peculiar thing is that this page no longer exists (you can watch it in the cache of google).
The problem is that the code is not correct (I thing), in line:
int nNumWorkspaces = AfxGetApp()->GetProfileInt(_T("Configure"), _T("NumWorkspaces"), 0);
The value by defect that is taken is always zero , although you have one or several workspaces open; therefore never it compiles.
SOME SOLUTION?
2) The methods that make the single compilation only can be in the CComands class, and I need the compilation is made when pressing certain button that is in a CDialog that is created in the Ccomands class. (CComands only creates a CDialog, which has certain controls, and one of them is the button with the compilation function).
SOME SOLUTION?
Thanks to all.
PS1: This is the code:
<br />
...........................<br />
...........................<br />
<br />
STDMETHODIMP CCommands::Herram_testCommandMethod() <br />
{<br />
AFX_MANAGE_STATE(AfxGetStaticModuleState());<br />
<br />
<br />
VERIFY_OK(m_pApplication->EnableModeless(VARIANT_FALSE));<br />
<br />
......................<br />
......................<br />
<br />
CDialogMenu dlg_Menu(NULL, strFullPath, strName, strProjectPath, strProjectName); <br />
int r;<br />
r=dlg_Menu.DoModal();<br />
<br />
<br />
....................<br />
....................<br />
<br />
VERIFY_OK(m_pApplication->EnableModeless(VARIANT_TRUE));<br />
<br />
return S_OK;<br />
}<br />
<br />
STDMETHODIMP CCommands::AutoBuildTest() <br />
{ <br />
if (m_bBuildInProgres) <br />
return S_OK; <br />
<br />
AFX_MANAGE_STATE(AfxGetStaticModuleState()); <br />
<br />
m_pApplication->EnableModeless(VARIANT_FALSE); <br />
m_nTotalErrors = 0; <br />
m_nTotalWarnings = 0; <br />
<br />
m_bAutoBuilding = TRUE;
m_bBuildInProgres = TRUE;
<br />
long lCount; <br />
int nNumWorkspaces = AfxGetApp()->GetProfileInt(_T("Configure"), <br />
_T("NumWorkspaces"), 0); <br />
<br />
for (int nWorkspaceNumber = 1 ; nWorkspaceNumber <= nNumWorkspaces ; <br />
nWorkspaceNumber++) <br />
{ <br />
char RegKey[50]; <br />
wsprintf(RegKey, "Workspace%d", nWorkspaceNumber-1); <br />
CComBSTR bszWorkspacePathName = AfxGetApp()->GetProfileString( <br />
_T("Configure"), RegKey, ""); <br />
<br />
CComPtr<IDispatch> pDispDocuments; <br />
VERIFY_OK(m_pApplication->get_Documents(&pDispDocuments)); <br />
<br />
CComVariant OleVariant;
<br />
CComQIPtr<IDocuments, &IID_IDocuments> pDocuments(pDispDocuments); <br />
<br />
CComPtr<IDispatch> pWorkspace;
VERIFY_OK(pDocuments->Open(bszWorkspacePathName, OleVariant, <br />
OleVariant, &pWorkspace)); <br />
<br />
CComPtr<IDispatch> pDispProjects; <br />
<br />
VERIFY_OK(m_pApplication->get_Projects(&pDispProjects)); <br />
CComQIPtr<IProjects, &IID_IProjects> pProjects(pDispProjects); <br />
VERIFY_OK(pProjects->get_Count(&lCount)); <br />
for (long i = 1 ; i < lCount+1 ; i++) <br />
{ <br />
long lNumConfigs; <br />
CComVariant Vari = i; <br />
<br />
CComPtr<IGenericProject> pGenProject; <br />
VERIFY_OK(pProjects->Item(Vari, &pGenProject)); <br />
CComQIPtr<IBuildProject, &IID_IBuildProject> pProject(pGenProject); <br />
CComPtr<IConfigurations> pConfigs; <br />
VERIFY_OK(pProject->get_Configurations(&pConfigs)); <br />
VERIFY_OK(pConfigs->get_Count(&lNumConfigs)); <br />
for (long j = 1 ; j < lNumConfigs+1 ; j++) <br />
{ <br />
CComVariant Varj = j; <br />
CComPtr<IConfiguration> pConfig; <br />
VERIFY_OK(pConfigs->Item(Varj, &pConfig)); <br />
<br />
CComVariant VarDisp = pConfig; <br />
CComBSTR bszStr; <br />
VERIFY_OK(pConfig->get_Name(&bszStr)); <br />
if (m_bMailOnEach == TRUE) <br />
m_strBuildingConfigurationName = bszStr; <br />
else <br />
m_strBuildingConfigurationName += CString(", ") + <br />
CString(bszStr); <br />
VERIFY_OK(m_pApplication->Build(VarDisp)); <br />
} <br />
} <br />
} <br />
<br />
m_bAutoBuilding = FALSE;
<br />
m_pApplication->EnableModeless(VARIANT_TRUE); <br />
<br />
if (m_bTesting == FALSE) <br />
{ <br />
if (m_bCloseWhenDone == TRUE) <br />
VERIFY_OK(m_pApplication->Quit()); <br />
} <br />
else <br />
{ <br />
if (m_bCloseWhenDone == TRUE) <br />
AfxMessageBox("IDS_WARNEXIT"); <br />
} <br />
return S_OK; <br />
} <br />
<br />
STDMETHODIMP CCommands::AutoBuild() <br />
{ <br />
AFX_MANAGE_STATE(AfxGetStaticModuleState());<br />
m_bTesting = FALSE;<br />
AutoBuildTest();<br />
m_bTesting = TRUE; <br />
<br />
return S_OK; <br />
}
PS2: Sorry for my bad English
|
|
|
|
|
does anybody already solved problem how to work with file history last open files automatic saving
i found my sw configuration saves file dialog's history into
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU
but i'm not sure if it is and will be always and the same way
is any function to get this?
(something line SHGetSpecialFolderPath(CSIDL_HISTORY) but for this case)
thanks
t!
|
|
|
|
|
Do you mean, last files for a specific app, or the last file as shown in the Windows menu Start/Documents ?
~RaGE();
|
|
|
|
|
last files for file dialog (for specific extension)
(look into mentioned registry entry)
t!
|
|
|
|
|
Debug into CRecentFileList::ReadList() and you'll see where your app's MRU list comes from.
|
|
|
|
|
sorry
i have no CRecentFileList (and it uses pApp->...ProfileString and needs to call CRecentFileList::Add)
i want to work with values what uses file dialog and i found them into mentioned registry
t!
|
|
|
|
|
When using a Windows Common Control, recently used files are saved to the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSaveMRU key. To my knowledge, changing this is out of your control, so it should be safe to use.
|
|
|
|
|
thanks, it seems i will be not the first who will use it (directly)
t!
|
|
|
|
|
i wrote an application that do something with the incoming messages via the Windows Messenger Service (net send).
in that i just find the Messenger diaog and then read the mesage frm it and add to my application list control.
for that i uses EnumWindows() and FindWindow()APIS. this will work in all time but when i lock my workstation (using NT/2000) that will not work. i want to add those messages even i lock the workstation...
the problem is we can only use those two API'S based on the desktop window...is any alternate method/ideas?
Thanks in advance,
Regards
Renji
CodeTheDreams();
|
|
|
|
|
service??
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
no..notservice...
i just take the message from the netsend dialog by using the EnumWindows() or FindWindow() API. they will work only when the desktop is active. i can't get that when the user lock his workstation.
i want a method which will works even the workstation is in locked state..
thats my requirement..hope that now u got the idea..eh naa..???
CodeTheDreams();
|
|
|
|
|
why dont u make ur application a service, so it works even if the desktop is locked or no one had logged in yet
That's what i meant
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
u man..!!!!!
even now u can't gasp what i am really says..!!!!
U know the netsend.exe ???
eg: netsend papa "hello"
if you sned a message like this will popup a Messenger Service window in papa(machinename /login name).
but this sort of messages while the time of working is so iriitating, so i just write an application to gather the content of the message and add in to a list. tat appplication is wrote as a tray.
the method i used to findout the messenge rpopup window is EnumWinodws() API. this can only enumerate the window(including the messenger window)when the time user works on the machine (that is in the unlocked mode). when the user lock the workstation(ctrl+alt+delete) that api doesnot works....i want an alternative method/idea...
hope that now you got what i am really want..!!!!
thats all aboy that...
regards
renji
CodeTheDreams();
|
|
|
|
|
Dear Friends,
I am using OPENFILENAME to open a file particular .ext file like this....
OpenFileName.lpstrFilter = "XVD files\0*.xvd;0*.vg2";
But along with this I would like to display the list of available files by their name and size too.
But I couldn`t able to do this.
Please write to me immediately.
Thanking You in advance.
So kindly help me to display
|
|
|
|
|
OpenFileName.lpstrFilter = "XVD files\0*.xvd;*.vg2\0All files (*.*)\0*.*\0\0";
|
|
|
|
|
Hi
I want to disable the pasting in a editbox. So Ctrl+V shouldn't work. And in the pop-up menu, paste should be disabled.
Greetings
Jens
|
|
|
|
|
Derive a control from CEdit, handle WM_PASTE, and do not call the base class in the override.
Do you want to generally disable the paste in the menu, or only if the editbox gets the focus ?
~RaGE();
|
|
|
|
|
thank you for the first solution
and i want only to disable pasting when the editbox got the focus.
just modified:
LRESULT CMyEdit::WindowProc(UINT message ...)
{
if ( message != WM_PASTE)
{
return ...
}
}
this works already great, i can not paste by using ctrl+v but the menuitem isn't disabled (but it alsoo doesn't work pasting (that was the intention))
so my problem is solved i guess
Thanksalot
greetings
Jens
|
|
|
|
|
|
dear all,
i want to create checkbox control at runtime and the number of controls can vary everytime the app runs.
i have to do this in either MFC or using win32 api.
is there any sample or links which shows the same.
my main concern is the positioning of the controls and the size of the main window.
any clues!!!!!!!!!
thanx and regards
|
|
|
|
|
|
Greetings. I have an VC++ 6.0 App, and i'm moving to .NET. But i've chosen VC#. My question is. Is it possible to call a VC# dll from the VC++ 6.0 App? If it is, how can i do it? Thank u.
|
|
|
|