|
No, not after the CFileDialog, to be more clear I'm developing a dialog that enables the user to find images based on keywords that the user enters into the dialog.
So what I needed was a combo box or a tree control that would let the user pick the directory on which they want to browse.
Regards.
|
|
|
|
|
Hello!
I have a question about RegQueryValueEx API, after the second execution of this API, it does not return an ERROR_SUCCESS value provided there is a correct registry entry and path. Why is this?
Ex:
if( ERROR_SUCCESS == ::RegOpenKeyEx(HKEY hKey, LPCTSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult))
{
if (ERROR_SUCCESS == ::RegQueryValueEx(HKEY hKey,LPCTSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData))
{
if lpData.Find("Sample"); //lpData as _TCHAR, Sample = Data from registry
{
if( ERROR_SUCCESS == ::RegOpenKeyEx(HKEY hKey2, LPCTSTR lpSubKey,DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)) // another path is opened
{
If (ERROR_SUCCESS == ::RegQueryValueEx(HKEY hKey2,LPCTSTR lpValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData)) //this condition failed to return an ERROR_SUCCESS provided there is a correct path from the registry.
{
...
}
}
}
}
}
"smile donkey, smile!"
|
|
|
|
|
if lpData.Find("Sample"); should be if (lpData.Find("Sample") != -1)
sorry...
|
|
|
|
|
Hi all,
I am very keen to change the caption of a button (Ok,Cancel,Apply and Help)on a property page and also change the caption of Title bar on a Properysheet.How can I know the ID of buttons on a property page.
Please help me.
rajesh
|
|
|
|
|
OK is IDOK
Cancel is IDCANCEL
Apply is ID_APPLY_NOW
Help is IDHELP
Use GetDlgItem() to get the window (CWnd) associated with the control then use SetWindowText() to set the control text. The title of the property sheet is set when you create the property sheet. Or using SetWindowText() within the property sheet class.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
In the appication that i m developing,i wish to create an alert messages whenever certain condition is met. i have already created such an alert message using MessageBox but instead of that i know wish to show that alert as a popup from the tray which stays for few seconds and disappers atomatically. need suggestions on how to do....
ask_you
|
|
|
|
|
|
the article seems quite useful...
thanx a lot....
|
|
|
|
|
Glad to help!
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
i tried the the link that u had sent...
i.e. http://www.codeproject.com/dialog/statusbarmsgwnd.asp
well, i went through the code and tried to include it in my application. first i just included the stuff in the initdialog function to check whether it works.. well,to my pleasure, it worked. but then when i tried porting it to the actual location, it failed. i have created a thread in the application and want to call the code within the application. but when i do so, the application fails...it exits forcibly...
a portion of the code is shown below:
DWORD WINAPI CDlg::TestThread1(LPVOID lpParam)
{
CDlg* pThis = (CDlg*)lpParam;
while(1)
{
if(pThis->m_hCommEvent1)
{
WaitForSingleObject(pThis->m_hCommEvent1, INFINITE);
CStatusBarMsgWnd* t_MsgWnd =
StatusBarMsgWnd::CreateObject(
_T("Some idiot has signed in !!"),180, 150, 4000,10,CRect(30, 30, 130, 110),pThis);
t_MsgWnd->PopMsg();
}
}
}
Can u suggest wat modifications should i do...
|
|
|
|
|
I would suggest to post (or send) a message back to the application from the thread, and to handle that message there doing the work
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
How do i send the message back from the thread..
there are 4 threads. in each thread on some event, a menu has to pop up from the tray icon... please explain how to pass message back from the thread....
ask_you
|
|
|
|
|
Hi every one, i ve got a problem :
after built an simple MFC App , i copy the exe file to other computer (in which Visual C++ is not installed) and try to run it, but some error occured, it's not run, How do i ????? help me please?
thanks
|
|
|
|
|
Does it bring up a message about a MFC__.DLL file? If so, try copying them from your development computer to the destination computers (in the same location that you found them in the development computer). Use the Windows search feature to find the files on your development computer.
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
Try to use MS VS tools - Depends to check you application dependancies.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
very trivial question...
can anyone let me know the function to set the combobox visible and also the function that sets the combobox invisible?
|
|
|
|
|
ShowWindow(FALSE);
ShowWindow(TRUE);
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
thanx...
can u let me know the function to make static text visible..
|
|
|
|
|
ask_you wrote:
thanx...
You're welcome.
ask_you wrote:
can u let me know the function to make static text visible..
You can use the same function ShowWindow() for all MFC controls derived from CWnd. That includes static text controls.
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
There are several bitmaps on my dialog. And I need to convert them to gray ones, that is, convert them to black-and-white style (like on Windows XP, we cliking 'start' -> 'shut down' and wait for a moment the whole screen becomes gray). Would anybody give me some advice?
<font=sans-serif>|-|3llo Wo|2ld
|
|
|
|
|
Hi every one, my problem is:
I must create an App to detect other computer has pasted a file on my Shared Folder, and alert some infor :
- the file
- the computer has pasted the file.
is there any way to solve the problem ??
Help me ??
thanks
|
|
|
|
|
sorry for asking this question for the hundredth time but I've never got an answer how to get the MX server.
I want to make a program that can send an email from you computer and for each mail address I have to write the SMTP server. I want a function that get's it automatically.
Thankx
gabby
|
|
|
|
|
If you are using MAPI try this. You should have a profile name supplied.
<br />
HRESULT GetServerName(LPSTR rszProfileName)<br />
{<br />
HRESULT hRes = S_OK; <br />
LPPROFADMIN pAdminProfiles = NULL; <br />
LPSERVICEADMIN pSvcAdmin = NULL; <br />
LPPROFSECT pGlobalProfSect = NULL;<br />
LPSPropValue pProps = NULL; <br />
<br />
if ( FAILED ( hRes = MAPIAdminProfiles ( 0L, &pAdminProfiles ) ) )<br />
return hRes ;<br />
<br />
if ( FAILED ( hRes = pAdminProfiles -> AdminServices (<br />
rszProfileName,<br />
NULL,<br />
0L,
0L,<br />
&pSvcAdmin ) ) )<br />
return hRes ;<br />
<br />
if ( FAILED ( hRes = pSvcAdmin -> OpenProfileSection (<br />
(LPMAPIUID)pbGlobalProfileSectionGuid,<br />
NULL,<br />
0L,<br />
&pGlobalProfSect ) ) )<br />
return hRes ;<br />
<br />
<br />
if ( FAILED ( hRes = HrGetOneProp ( pGlobalProfSect,<br />
PR_PROFILE_HOME_SERVER,<br />
&pProps ) ) )<br />
return hRes ;<br />
<br />
CString m_strServerName = pProps -> Value.lpszA ;<br />
<br />
if ( NULL != pAdminProfiles )<br />
pAdminProfiles -> Release ();<br />
<br />
if ( NULL != pSvcAdmin )<br />
pSvcAdmin -> Release ( );<br />
<br />
if ( NULL != pGlobalProfSect )<br />
pGlobalProfSect -> Release ( );<br />
<br />
if ( NULL != pProps )<br />
MAPIFreeBuffer ( &pProps );<br />
<br />
pSvcAdmin = NULL;<br />
pGlobalProfSect = NULL;<br />
pProps = NULL;<br />
pAdminProfiles = NULL;<br />
<br />
return hRes;<br />
}<br />
The above code might have some variables not declared. Pls check it out before using.
Muthukumar.V
Home: WWW.CoderSource.Net
|
|
|
|
|
If you're wanting to write your own SMTP server application I recommend reading RFC 2821. In regards to your question about how to obtain an MX record for a particular domain (example: yahoo.com, hotmail.com, etc...), you will need to need to query DNS. A good place to start to would be to use google.com, or better yet, if you're just looking for a quick solution, try this link.
http://www.codeguru.com/Cpp/I-N/internet/dns/article.php/c6163/
Regards,
John
|
|
|
|
|
Your best bet is to relay through an existing mail server, just like Outlook Express does.
But if you really need to do it directly, and expect to run on Windows 2000 onwards, then checkout the DNS API, DnsQuery specifically.
Otherwise you'll have to look up the DNS spec, find out how to locate your local DNS server and do the query manually.
Paul
|
|
|
|