|
Hi,
I have written a application which sends mail using MAPI calls.It works
fine.Now i want the user to enter the recepient mail id.
If i set lpszName="";
then
m_lpfnMAPISendMail(MAPISession, 0, &msg, MAPI_DIALOG , 0);
function returns 25.Is there anyway to specify the
recepient mail id at run time?
Thanks
Neha
|
|
|
|
|
|
How to hide my application name from Task bar.Please tell me the answer
other than property called WS_EX_TOOLWINDOW.
|
|
|
|
|
You could use the ITaskbarList interface to add/remove your app from the taskbar. I tried it and it works fine.
See MSDN for the documentation, it's quite easy to use
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Gregor S. wrote:
ITaskbarList
Can use this to add text box to the task bar?
Like the standard Run text box that I can add to the task bar?
Or does the AddTab function just add a task bar icon!?
Do you understand?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
AddTab simply creates a new taskbar button with icon for any window you like. I does not create an edit box or something like that
modified 12-Sep-18 21:01pm.
|
|
|
|
|
KB article Q205158 'HOWTO: Prevent a Window from Appearing on the Taskbar' presents two methods. One is using WS_EX_TOOLWINDOW, and other isn't.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Hi all,
Below is the code snippet and at the end is the questions.
class{
CStringArray *m_pstringarray;
...
...
};
fun1(CWnd hwnd)
{
CString temp;
hwnd.Getwindowtext(temp)
m_pstringarray->Add(temp);
}
fun2()
{
CString str = m_pstringarray->GetAt(1);
if(strcmp(str,"dialog editor")
{
}
}
Now the question is whether
a.what actually does stringarray "Add" do??
b.Do i need to make "cstring temp" in fun1 heap allocate or static allocate will do?(that is should the string exist even after adding to the string array?)
c.if i do RemoveAll for the string array, will deallocation of the memory of the strings takes place?
Thanks for your patient reading.
waiting for your reply.
Regards
Pradeep
|
|
|
|
|
Is there any reason for using a pointer to CStringArray? Can't you just use CStringArray member in your class?
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Ok lets think its the data member of the class.How does it matter?
|
|
|
|
|
BK Pradeep wrote:
How does it matter?
Not very much. But you have to call new in order to create your array --and-- you need to delete it.
a.what actually does stringarray "Add" do??
It adds the string at the end of the array.
b.Do i need to make "cstring temp" in fun1 heap allocate or static allocate will do?(that is should the string exist even after adding to the string array?)
No. CStringArray copies your string.
c.if i do RemoveAll for the string array, will deallocation of the memory of the strings takes place?
Yes.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Thanks a lot Pal.You have been helping me a lot!
|
|
|
|
|
Answers:
a) Add function adds (copies) a string to array, allocating necessary space for it.
b) No, you don't have to keep the insterted string. E.g. code like:
arr.Add("hehe");
will work fine
c) Yes, RemoveAll deallocates any memory used by this array. It is not frees any memory allocated by you. e.g. pcsTemp in this code won't be freed:
CString* pcsTemp = new CString("hehe");
arr.Add(*pcsTemp);
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
Thanks Thanks a lot patrick.I think you understood my problem and your solution clears all my doubt.
Thanks again.
|
|
|
|
|
Hi,
i'd like to ask if someone have tried to do this:
sending keypress to another window.
not by sending window messages to the hwnd
{ i mean ::SendMessage(HWND,WM_CHAR,LP,HP) tecnique }
but by emulating keypress itself!
Someone knows how to do this ?
Any help would be apprecied!
See ya,
D3sty
|
|
|
|
|
Use keybd_event or SendInput.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
thanks for your reply.
it was really useful!
D3z
|
|
|
|
|
Hi,
I have developed a set of classes that allow developers to incorporate screen designer functionality into an application so that end users can customise screens in a controlled fashion, i.e. still accept updates.
The classes allow existing fields to be added, hidden, moved and new fields to be added.
Even if all of your application has been developed using a resource editor (as most app's are) it will still allow those controls to be modified at run-time.
It works on CView, CDialog, CPropertyPage derived classes.
I need some help in testing the code - before it is released, I think I can manage about 5 "BETA" testers - anyone willing to help?
Regards
Novo Star
|
|
|
|
|
Hi,
I have two sound blaster in my computer.
I'm working with win 2000 pro.
I would like to knew how (which command)can I approach each of them ?
thanks.
|
|
|
|
|
Hi,
Not sure what you mean by approach? But you should look at waveIn* APIs. Just look for waveInOpen, waveInClose etc. on MSDN.
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Does anybody have any B+ tree implementation in C++?
Thanks!
Wanderley
|
|
|
|
|
Hi all,
Iwould like to load a bmp picture in to my dialog during runtime and if the actual size of the bitmap is less than my dialogs view area the bitmap should be displayed as such exactly in the centre and if its size is greater the dialogs view area the bitmap should confine to the view area with scrolling capability.How can i achieve this?.Can anyone help me?.
With regards
Shibu
|
|
|
|
|
The scrolling is an issue, the rest is easy. Assuming you have a HBITMAP ( which a CBitmap can return ) you can do this:
BITMAP bm;
GetObject( bm, sizeof(BITMAP), myhBitmap);
This structure tells you the width and height of your bitmap, the rest is simple maths. Draw the bitmap using BitBlt in your WM_PAINT handler, and if you want scrolling, you'll also need to draw two scrollbars, and use GetClientRect to find out the size of your dialog, then make the scroll range of each equal to the size of the bitmap - the size of the screen. i.e. if your bitmap is 200 wide and your dialog is 150 wide, you need the scrollbar to have a range of 50, so you can scroll across to see all of it. Then handle the scroll messages, and in them invalidate your dialog. Your draw routine should now draw the bitmap taking into account the scroll pos of the two scrollbars.
To centre, it's just some basic math. And you're done.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
Hi, recently I came across the following code and was wondering if you could help me understand some syntax.
#if 0
for (int i = 0; i < _Points; i++)
_aTape[i] = 1600 * sin (2 * PI * 1000. * i / _sampleRate);
#else
for (int i = 0; i < _Points; i++)
_aTape[i] = 0;
#endif
What are these #if and #else directives. Are they like the normal if/else. Also, what does the #if 0 evaluate to???
Thanks for any reply.
Cheers,
Pankaj
Without struggle, there is no progress
|
|
|
|
|
#if, #else and #endif are preprocessor directives. #if 0 is used to quickly comment out part of the code. In your case, only the second version of the loop will be compiled.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|