|
Hi All,
I want to create an Add-In for MS-Outlook in MFC. Please guide me how to do that?
|
|
|
|
|
|
Hi,
im overriding Create function of Modeless Dialog...to increase the font and Dialog size along with the controls inside it... as follows...
BOOL CTestDlgDlg::Create(UINT nID, CWnd* pParent)
{
CDialogTemplate dlt;
// int nResult;
// load dialog template
if (!dlt.Load(MAKEINTRESOURCE(CTestDlgDlg::IDD))) return FALSE;
// get pointer to the modified dialog template
LPSTR pdata = (LPSTR)GlobalLock(dlt.m_hTemplate);
LPDLGTEMPLATE pDlgTemplate = (LPDLGTEMPLATE)pdata;
//pDlgTemplate->style |= DS_SETFONT;
// set your own font, for example "Arial", 10 pts.
dlt.SetFont(L"Century Schoolbook", 18);
// let MFC know that you are using your own template
m_lpszTemplateName = NULL;
//InitModalIndirect(pdata);
// display dialog box
//nResult = CDialog::DoModal();
// unlock memory object
// CDialog::Create(nID,pParent);
BOOL bret CDialog::CreateDlgIndirect(pDlgTemplate, pParent, AfxGetInstanceHandle());
GlobalUnlock(dlt.m_hTemplate);
return bret;
}
The size of the DialogBox along with the controls inside it are getting increased except
the Title bar of the DialogBox.Even the Text is also not getting increased.Pls let me know how can i increase the size of the Title bar along with the font size..without using custom titlebar...
|
|
|
|
|
The font of the title bar of a Window is a system-wide setting and cannot be altered for one particular window. You can see the current font setting for title bars in the Advanced Appearance option of the display settings in the control panel. In fact there are separate settings for the active title bar and the inactive title bar.
If you want a particular window to have a different look for its title bar, you will need to create a dialog box without a title bar, draw the title bar yourself and then return HTCAPTION from the WM_NCHITTEST message handler when the user clicks on the drawn title bar.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I'm recording audio and I don't want to record silence. How can I do that? I'm recording using wimmm.
Is there a command or something like that?
Thank you
|
|
|
|
|
I dont know wimmm, but essentially silence are sample-values in a wave-file that aprox. 0 (there could be some noise). With that knowlegde you could create a program that modifies the wavefile... The Wavefile format is VERY easy, it's just a header followed by samplespoints...
rozis
|
|
|
|
|
hi all,
i have to set proxy while sending the xmlhttprequest to server for that after searching on google i found that i should go through setproxy() but i didnt exactly get that how i should use this method.
i am having proxy addresses as IP address, so can anyone please tell me how to use this function.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
hi all,
i have a service application, which maintains a record of each and every USB being used in the windows system.
in brief, my problem is with the hashmap values getting corrupted in between two threads. one thread picks the database path where values are to be written and other thread writes into that database path.
Service crashes at the, when the below codes are executed.
WaitForSingleObject(*hThreadIterBegin->second,INFINITE);
rename(hThreadIterBegin->first->c_str(),newFileName.c_str());
ReleaseMutex(*hThreadIterBegin->second);
The first thread fetches the values and the values are sent to the second thread so that it can write the necessary things to the fetched value which is the path of the database. but the hashmap value crashes at some point due to which the service crahses at above code executions.
i am not able to identify the exact reason, as to why the value of ThreadMutexMapPrimary changes or crashes when it is called from the second thread???
i am attaching the code below, with declarations and values i received while debugging.
Thankyou.
**************************
Variable declarations
---------------------
cahr queryFile[256];
string queryFileString;
int currentMap;
hash_map <std::string*, HANDLE*> ThreadMutexMapPrimary;
hash_map <std::string*, HANDLE*>::iterator hThreadIterBegin;
hash_map <std::string*, HANDLE*>::iterator hThreadIterEnd;
**************************
**********************************************************************************************
FUNCTION CALL
-------------
In 1st Thread:-> For fetching
string queryFileString = queryFile;
HANDLE presentMutex = CreateMutex(NULL,FALSE,NULL);
if(presentMutex == NULL)
{
WriteLog("Error Creating Mutex");
}
else
if(currentMap == 1)
ThreadMutexMapPrimary.insert(hash_map <std::string*, HANDLE*>::value_type(&queryFileString,&presentMutex));
else
ThreadMutexMapSecondary.insert(hash_map <std::string*, HANDLE*>::value_type(&queryFileString,&presentMutex));
In 2nd Thread:-> For writing values
switch(currentMap)
{
case 1:
if(ThreadMutexMapPrimary.empty())
{
WriteLog("Hash Map Empty No record to Write");
break;
}
hThreadIterBegin = ThreadMutexMapPrimary.begin();
hThreadIterEnd = ThreadMutexMapPrimary.end();
currentMap = 2;
currentMappingSetReplaced = true;
break;
case 2:
if(ThreadMutexMapSecondary.empty())
{
WriteLog("Hash Map Empty No record to Write");
break;
}
hThreadIterBegin = ThreadMutexMapSecondary.begin();
hThreadIterEnd = ThreadMutexMapSecondary.end();
currentMap = 1;
currentMappingSetReplaced = true;
break;
}
DebugLog("after swtich(currentMap)");
if(currentMappingSetReplaced == true)
{
while((hThreadIterBegin != hThreadIterEnd))
{
WriteLog("Beginning Database Archival System...\n");
string parameter;
string DatabaseName;
remove(newFileName.c_str());
WaitForSingleObject(*hThreadIterBegin->second,INFINITE); ----> service crashes here
rename(hThreadIterBegin->first->c_str(),newFileName.c_str()); ---
ReleaseMutex(*hThreadIterBegin->second);
**************************************************************************************************
Debug Values:->
----------
value of queryFile -> "C:\windows\Logs\Tsql\Jul2009.sql"
value of queryFileString ->"C:\windows\Logs\Tsql\Jul2009.sql"
value of currentMap = 1
ThreadMutexMapPrimary -> [1](("C"\Windows\Logs\Tsql\Jul2009.sql",0x0201bae)) --> value in 1st thread
ThreadMutexMapPrimary -> [1]((0x0201ff74 {_Bx={...} _Mysize=??? _Myres=??? },0x0201bae)) -> value in second thread,changes and is crashed.
newFileName.c_str() -> "C:\windows\Logs\Tsql\Jul2009.sql";-----> to be deleted and new the value of thread mutex map to be inserted.
*******************************************
|
|
|
|
|
Your problem seems to possibly be related to an issue we saw in our own software. Switching to an alternate STL provider fixed our issues. See
http://support.microsoft.com/kb/813810[^]
You may well be being affected by this. BTW we switched to STLport a free STL implementation.
If you vote me down, my score will only get lower
|
|
|
|
|
[id(0x60060001), helpcontext(0x000061aa)]
HRESULT GetComponents([in, out] SAFEARRAY(VARIANT) oAxisComponentsArray);
I want to know how to realize the COM in C++ with InvokeHelper.
Thanks
|
|
|
|
|
In the IDL file it should be [in, out] SAFEARRAY(VARIANT)* oAxisComponentsArray
In the .h and .cpp files it should be SAFEARRAY** oAxisComponentsArray
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Superman,thanks a lot.
Could you please tell me how to realize the SAFEARRAY(VARIANT) oAxisComponentsArray with C++, and how to write InvokeHelper?
|
|
|
|
|
I record audio with several microphones and I need to know the microphone that I used with each recording.
Can anyone help me? How can I identify the microphone in the recording?
Is there a command or something like that?
Thank you
|
|
|
|
|
waveInGetDevCaps may help u..
Regards,
Swapnil
|
|
|
|
|
Hi,
I am facing a problem with IWshRuntimeLibrary::IFileSystem. It is working fine on Win2003,Vista 32 bit. But fails in Win2008 std sp2.
I am using following function from IWshRuntimeLibrary::IFileSystem
1.CopyFile
2.GetFolder
3.FileExists
4.DeleteFolder
5.CreateFolder
I am currently using VC++.
Why IWshRuntimeLibray::IFileSystem is failing. Can I have any alternate solution.
|
|
|
|
|
Please debug and check the reason for failure
but i have the alternate solution as to suggest you to use SDK APIs
CopyFile :: Copies an existing file to a new file.
CopyFileEx :: Copies an existing file to a new file.
CreateDirectory :: Creates a new directory.
CreateDirectoryEx :: Creates a new directory with the attributes of a specified template directory.
CreateFile :: Creates or opens a file object.
DeleteFile :: Deletes an existing file.
|
|
|
|
|
Hi all,
I m creating a Property Sheet with help of CPropertySheet class,in Property Pages i m using Groupbox i want make bold the text of groupbox please help me how can i do this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
This may not be an answer to your question, but the easiest way to do this is to place a picture control with a bitmap of the text with the required font size over the group box.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
You mean some text inside the groupbox or the caption of the groupbox? If the caption of the group box, you could rename the ID of the group box such that it is NOT IDC_STATIC and then add a control variable to it (say m_GroupBox ) and then call m_GroupBox.SetFont();
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I m already try this but its not done.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
OK, try this code:
CFont f1;
LOGFONT lf1;
::ZeroMemory(&lf1, sizeof(lf1));
lf1.lfHeight = 16;
lf1.lfCharSet = ANSI_CHARSET;
lf1.lfWeight = FW_BOLD;
::lstrcpy(lf1.lfFaceName, "Arial");
f1.CreateFontIndirect(&lf1);
GetDlgItem(IDC_GROUPBOX)->SetFont(&f1);
f1.Detach();
Obviously you'll have to change some things to make it work with your code but you'll get the idea.
Edit:
Actually, you might want to clarify first what Rajesh asked:
You mean some text inside the groupbox or the caption of the groupbox?
modified on Friday, July 24, 2009 5:25 AM
|
|
|
|
|
I mean the caption of groupbox.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
OK, then try the code above.
|
|
|
|
|
"_$h@nky_" wrote: I m already try this but its not done.
Like... What did you try? Show the code.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: Show the code
Yes, sir.
|
|
|
|