|
We all know how hard it is to figure out our own programs after it has been a while since we programed it. Now, the question is, how do you approach figuring out someone else's Windows program written in C++?
I already know that it's a win32 application (Well, honestly it's a WinCE platform) written with MFC (Functions tailored to fit CE).
Where should I begin to start learning how this software does what it does? At theApp? Just start reveiwing classes and put the pieces together later? Procedurally?
Thanks for your responses.
|
|
|
|
|
If the program uses doc/view, then document and view classes will contain most interesting stuff. Does your project generate browse info? If not, make a copy and turn browse info generation on. You'll be able to easily look at class hierarchies.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Hey! That's really cool.
Is there any documentation on how to effectively use this browser?
{{Opens MSDN....}}
Thanks!
imus de buss
umis de buss
weall mis de buss
|
|
|
|
|
Dear,
I meet a problem to speed up the function from DDB to DIB.
The program I write is to read the wave data from the
data files, then output the wave drawing by BMP files.
And the BMP files may output 8bit, 16bits, 24bits,
32bits.
so, we design it as following,
1. From data file to draw wave
(not need display in screen, draw
draw in Memory DC is OK.
We need create a CBitmap, then use Memory DC
to draw in the CBitmap)
2. Then write them to bitmap files.
So, as you know, we should use GetDibits() function to transfer
from DDB to DIB. But I find that GetDibits() function use much
time, and it cause the reason of the bottleneck of my program.
Because I must speed up my program, I look for your help.
Can you tell me how to speed up the function from DDB to DIB?
Is any other function can substitute the GetDibits() function to
transfer from DDB to DIB?
Or our project design is too complicated, can use other
easy and fast method to complete?
Welcome any suggestion!
Best Regards,
|
|
|
|
|
I think you should use CreateDIBSection and work on DIB exclusively. This gives you additional advantage of direct access to bitmap bits in device independent format - may be helpful if you need to push performance.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
If an object throws an exception from a constructor, is it considered constructed?
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
|
Is there a programmitic way to set a systray item to
be "Always show"n as opposed to "Hide when inactive".
The notification behavior can be changed by right
clicking on the start bar/menu, clicking properties, then
clicking the Customize button in the Notification area
group box on the Taskbar tab. I would like to be able to
change a setting through code. Is there an SDK call to
do this? Thnx!
|
|
|
|
|
You might want to add a timer and update your icon every minute or so. I imagine that's how the system tray detects inactive icons by tracking their updates.
Todd Smith
|
|
|
|
|
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.
|
|
|
|