|
hai,
i am using Shellexecute() function to invoke my e-mail client....i.e
ShellExecute(NULL, "open", "mailto:aa@xyx.com&cc=&bcc=&subject=hello", NULL, NULL, SW_SHOW);
will this work for all e-mail clients...suppose,now i am having outlook express 2003....some may have other than microsoft product....even though will it invoke appropriate e-mail client or not
plz let me know
regards
plex
|
|
|
|
|
|
hi,
I have a question about threads. In the following code you can see a class which creates a thread, taking a callback fn that gets called repeatedly (it's using boost, but the concepts I'm trying to understand aren't boost specific, maybe?). A second file instanciates that class, using a local fn for the callback;
mythreadstuff.h
-----------------------------------
typedef boost::function1<void, int> CallbackFn;
void MyThread(CallbackFn fn)
{
int a = 0;
do {
(*fn)(a++);
Sleep(1);
} while (1);
}
class Caller {
public:
Caller(CallbackFn fn) : m_callback(fn) {}
void Start() {
m_thread = new boost::thread(
boost::bind(&MyThread, m_callback)); }
CallbackFn m_callback;
boost::thread* m_thread;
};
-----------------------------------
mymainstuff.cpp
-----------------------------------
#include "mythreadstuff.h"
void showVal(int a)
{
// do something with a
}
void main()
{
CallbackFn fn = &showVal;
Caller mycaller(fn);
mycaller.Start();
Sleep(1000);
}
-----------------------------------
when showVal is called and does its thing on 'a', is it in the parent process from the main() process, or is it in the child thread process? Do I need to protect what's going on in there with mutexes, or is that only if the function shares some global variable in mymainstuff.cpp?
Is there a way of printing a process id (or some other identifier) which shows what process showVal is acting in?
thanks,
nik
|
|
|
|
|
Yes, it runs within the thread.
If you're in Visual Studio, you can break within your thread on the (*fn)(a++); . Use F11 to step into the function. Then select Debug->Threads from the main menu, and you'll see a list of running threads, with the current thread highlighted.
I'm not sure how many threads you'll see there (depends on your application), but if you double-click any of them, it'll open an appropriate window to display the code currently being executed in that thread. With Call Stack in place, you'll see that one of those threads has your main() happily sleeping while your thread is executing the callback.
Bob Ciora
|
|
|
|
|
hai,
i am using MFC application with MAPI support.
frame work has provided MAPI functionality with in OnFileSendMail().
with this i able to send mails, but i want to send mail's along with attachments...so where to mention the attachment exactly in my code...
plz let me know with code chunks...
regards,
plex
|
|
|
|
|
What to do to add an image along with a text and insert an image as a subitem in list control? The application is based on CFormView,and using CListCtrl with Report style.
|
|
|
|
|
|
Hi all,
I write a API App, I use playsound() in event Init form.
I also call Help file (.chm) in my app. But when I call HelpFile, the sound play as the form inited again. In the Help file,the sound play when I change the topic.
I don't know why...
Anybody help me find the explanation ?
Thank !
To love in vain more than love no one.
|
|
|
|
|
Hi
I am not experinced in MFC . I'm doing simulation and measurment project in direct3d . From my project i am getting some data that i have to show in report . Basically for reporting i'am using crystal report 8.5 (for easy) .
So my problem is When i printing report after report print done it is all ejecting page that is i dont want to do beacuse report is only 10 line and next report can print in current page . But it is ejecting page so i have to set page again.
So in Short how can i prevent to page eject after print ? Any ascii char ? or Any API ?
|
|
|
|
|
Hi,Everyone:
when i build the program in server machine, it runs well; but if i build it in local machine and upload, then i got a Runtime Error.
<br />
-Microsoft Visual C++ Runtime Library-<br />
<br />
d:\vcydcj.exe<br />
<br />
abnormal program termination.<br />
is it normal, cos the difference of Op-System?
Server Machine: Windows 2000 Professional
Local Machine: Windows Xp
& it seemed problem happened when it runs to these code:
<br />
CADOParameter pParamIn_Readnum(CADORecordset::typeInteger, sizeof(int));<br />
pParamIn_Readnum.SetValue(pMydoc->rwbossdlg.m_nReadNum);<br />
CADOCommand pCmd(pAdoDb_RB, "ydcj_getdata_574");<br />
pCmd.AddParameter(&pParamIn_Readnum);<br />
pRs_RB = new CADORecordset(pAdoDb_RB);<br />
pRs_RB->Execute(&pCmd));<br />
Thx!
________________________________________
Many nights we've prayed with no proof anyone could hear, we were moving moutains long before we knew we could!
Yet now i'm standing here, although we know there's much to fear, hope seemed like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill!
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|
|
I want to write a utility to turn off the Direct3D and DirectDraw function.
I can turn off the function by the following procedure :
a. Open "Run" in "Start" menu and type "Dxdiag".
b. Select "Display" tab, and click the "Disable" button with "Direct3D Acceleration"
But I can't find solution that uses Windows API or other way.
Could someone help me to find out how to implement this function?
Thanks!
Jesa
|
|
|
|
|
HOw can I turn off the Excel toolbars when launching it from within VC as a COM app?
|
|
|
|
|
|
Hi all,
I have to share some data among processes. how to create shared memory among processes. How can we implement inter process communication techniques using win32/mfc.
thanks and regards,
rahul.
|
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/creating_named_shared_memory.asp[^]
________________________________________
Many nights we've prayed with no proof anyone could hear, we were moving moutains long before we knew we could!
Yet now i'm standing here, although we know there's much to fear, hope seemed like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill!
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|
|
|
i use CreateWindowsEx to create a listbox and make its single item selected by code, i don't want the user to change the selected item index. i tried EnableWindow to disable the listbox window but it disabled the scrollbar of the listbox as well. What API should i use to make the listbox viewable only? which message should i process to prevent users from selecting another item in the listbox? (API solution only!)
|
|
|
|
|
|
hello guys,
i want to load image(any format,but i think jpg/bmp format)from file to picture control(picture box).i will make it when the program runs/execute. So, i want to put the code in function ON INIT DIALOG.But i don't know how. Can anyone help me???
|
|
|
|
|
Put your load image code in InitDialog (LoadBitmap, LoadImage etc) but process drawing in OnPaint (BitBlt, ..strecht...etc).
|
|
|
|
|
aaaah.....check in CP itself....ther r numerous articles based on thiz....
try this link for eg:
http://www.codeproject.com/bitmap/bmpscroll.asp[^]
Hope that helpz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
Hi, i need make a link between Visual C++ and Prolog, i need make a game
so i hope that some can i help me.
thanks..
|
|
|
|
|
Well I'm doing some mysql connections for a database project I'm working on. The documentation says it requires VC++ 7.1 The version I'm running appears to be a 7.0.2. Now I've only been back in the Visual C++ world for about... 2 weeks. Is the Studio 2005 supose to be 7.1?
Thanks for any info.
--
David Coley
http://www.codecipher.com
|
|
|
|
|
Visual Studio .Net 2003 has VC++ 7.1
Steve
|
|
|
|