|
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
|
|
|
|
|
How do i create a hyoerlink? Let's say in the "About..." form i want to add my email adress or a website's page.
Thanks!
|
|
|
|
|
|
Purpose: I am trying to have an app that will detect when a new app launches so I can open my app(password protection) instead before proceeding with the original application the user tried to open.
Current Solution: using a windows hook to look for new processes and hiding the app window(with ShowWindow()) unitl my password protection has been completed.
PROBLEM: ShowWindow() works great for hiding apps such as IE and Word, but it is not working for games like starcraft, warcraft. While in a game Alt-Tab will not even take you out of the game and quite often Ctrl-Alt-Del will NOT bring you to the desktop to see the taskmanager. Should I be using a different function call than ShowWindow()? Or is there a better way to accomplish this task?
Thanks,
--bacon
|
|
|
|
|
Check my article about the little firewall I've designed.
http://www.codeproject.com/useritems/A_not_so_simple_firewall.asp
Here you can modify it the way you want to show a dialog box instead of a messagebox which asks you if you want to open the app or not.
Hope you find it helpful
gabby
|
|
|
|
|
Nitron wrote:
If there is no need to change the buffer, then it should be explicitly const [...]
Remember that you may be dealing with a bad implemention of existing code, where a function might take a non-const pointer even though it does not modify it or its contents. Developers that get too comfortable with string objects can often find themselves in situations like that.
The explicit cast to LPCTSTR is unnecessary; CString::operator LPCTSTR() takes care of that for you.
Peace!
-=- James
Tip for SUV winter driving survival: "Professional Driver on Closed Course" does not mean "your Dumb Ass on a Public Road"! Articles -- Products: Delete FXP Files & Check Favorites
|
|
|
|
|
How do I change the icon in the title bar of a dialog box? Currently, it is displaying Window's default icon.
Thanks!
|
|
|
|
|
Use the resource editor in VC++.NET to create an icon, having it as a named resource in your project. Then in your dialog's OnInitDialog() function, type (replace IDI_DIALOG with the name of your icon's resource name.):
[...]
HICON hicon = AfxGetApp()->LoadIcon(IDI_DIALOG);
ASSERT(hicon != NULL);
SetIcon(hicon, TRUE);
[...].
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
Using VS 2003, MFC 7.1, when creating a property sheet the internal CPropertySheet::OnInitDialog() will create an exception, an access violation writing a location. This is observed in the VS debug output window, and surrounding the OnInitDialog call with some TRACE statements will prove where it's coming from.
I have experimented by creating the simplest apps with CPropertySheets I can imagine, and the exception always occurs. True for both static and dynamic MFC linking, various runtimes, etc.
Any suggestions? Has anyone else seen this also?
Richard
|
|
|
|
|
Hi i assume you fixed the problem . can you give me suggestion
|
|
|
|
|
Off and on for some time I've tried to find the best way to bring a window (whose parent is the desktop) to the top of all the other application windows on some particular event. They could very well be using another application window at the time so I can't allow it to take the focus away as this could result in lost keystrokes. My current implementation of this is basically the following:
HWND hwnd = ::GetForegroundWindow();
::SetWindowPos(myhwnd, hwnd, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE);
::SetWindowPos(myhwnd, hwnd, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE);
I've investigated numerous other ways over time. This works well but doesn't always work perfectly. Some times focus is stolen and sometimes the z-order isn't correct. These are rare cases and usually involve some specific other application that was in use at the time.
I'm wondering if anyone could offer solutions they've tested and used in the past for performing something similar?
Craig
|
|
|
|