|
Yes, it works. Radio buttons have to be in one group. First of them must have WS_GROUP bit set. One group ends where another begins, so first control *after* radio buttons must also have WS_GROUP set.
If you add new radio button and set its tab order, everything will work OK.
Christian Graus wrote:
Does changing the tab order change the rc file ?
Absolutely - 'tab order' is actually the order of control statements in .rc.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi there. How i can do this ? My app call another app by ShellExecute. I'm need inform user by msg window if external app end work
|
|
|
|
|
1) Use ShellExecuteEx to get the process handle
2) start the worker thread in your process. The thread will immediately call WaitForSingleObject passing the process handle received from ShellExecuteEx
3) when thread exits from WaitForSingleObject, the external app finished work. PostMessage to the main thread and exit from worker.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hey it's a great idea to start WaitForSingleObject() in a different thread.
But how do I send a PostMessage() to the main thread and which parameters do I need to send?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
#define WM_EXTERNAL_PROCESS_FINISHED (WM_USER + 1)
pMainWnd->PostMessage(WM_EXTERNAL_PROCESS_FINISHED);
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks, you helped me once more
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Read this article. It gives a sample code snippet on what you want to do.
http://www.codeproject.com/useritems/newbiespawn.asp
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
Use ShellExecuteEx() instead.
SHELLEXECUTEINFO sei = {0};
sei.cbSize = sizeof(sei);
sei.lpVerb = "open";
sei.lpFile = "yourapp.exe";
sei.nShow = SW_SHOWNORMAL;
sei.fMask = SEE_MASK_NOCLOSEPROCESS;
ShellExecuteEx(&sei);
WaitForSingleObject(sei.hProcess,INFINITE);
WaitForSingleObject will return when the other app has quit
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I would like to know whether there is an ATL equivalent for the MFC CArray class. Assuming I do not want to use STL. Basically one reason for using ATL is to avoid bloated libraries (even if only slightly bloated) like MFC and STL.
Regards,
Buster
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
I don't believe your code will bloat significantly if you use only std::vector.
There's a CSimpleArray in ATL, but AFAIR it's designed to be an internal class.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks Tomasz. Lemme add here that I am not very comfortable with STL. I am not smart enough to use it.
That's why I need to depend on simpler solutions.
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
Nish [BusterBoy] wrote:
I am not smart enough to use it.
You don't need to be smart
To use std::vector you don't even need to know about iterators and other fancy stuff. Just do the following:
1) include <vector>
2) instantiate a variable:
std::vector<int> v;
3) set the size
v.resize(100);
4) load elements
for (int i = 0; i < v.size(); i ++) v[i] = i;
5) load even more
v.push_back(999);
v.push_back(888);
6) access the elements
int x = v[33];
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Tomasz Sowinski wrote:
v.resize(100);
Thanks Tomasz. I'd like to avoid this step. I dont want to set a start size. I want to create an array and keep inserting stuff into it. Then after I am finished I simply return the array
Is that possible?
I am too tired now to look up MSDN to find out whether push_back does this for me. It probably does.
Regards
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
It probably does.
It certainly does.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
It probably does.
It certainly does.
Thanks Joaq. For a moment I was wondering whether this was grammar class when I saw those two sentences just like that
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
push_back will do. You may consider using v.reserve(n) to avoid buffer reallocations when your vector grows - but this is just an optimization, you don't have do that. BTW: vectors grow expotentially, not linearly like CArray does, so reallocs happen much less frequently.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks Tomasz.
I seriously am having this feeling that I should start lookin up some STL.
CG tried to push me into it once. He tries to do that to everybody, including the doorman and the cook.
Hmmmm. Things do seem so simple when people like you explain it that way. Thanks Tomasz.
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
Nish [BusterBoy] wrote:
CG tried to push me into it once. He tries to do that to everybody, including the doorman and the cook.
No, I don't. The cook is a moron. You, on the other hand, are a smart guy who is well able to understand something as simple as std::vector.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Christian Graus wrote:
The cook is a moron. You, on the other hand, are a smart guy
Hey, thanks. At least I now know I am smarter than the cook. Though that blasted doorman beat me to first spot
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
Nish [BusterBoy] wrote:
Is that possible?
You should read my article on std::vector. It does what you wnat it to, and as Thomaz has pointed out, you can use the [] operators to treat it like a dumb array if you desire.
The STL is calling you Nish, don't hold back....
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
Christian Graus wrote:
You should read my article on std::vector
I better go read it properly...
Christian Graus wrote:
The STL is calling you Nish, don't hold back
LOL
I was just commenting on this very facet.
http://www.codeproject.com/script/comments/forums.asp?forumid=1647&select=130099&tid=130068#xx130099xx
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
Hi Nish! Taking bout code bloat, take for instance the following sample code:
#ifdef USE_VECTOR
#include <vector>
#endif
int main(void)
{
#ifdef USE_VECTOR
std::vector<int> v;
#else
int * v=new int[1000];
#endif
for(int i=0;i<1000;++i){
#ifdef USE_VECTOR
v.push_back(i);
#else
v[i]=i;
#endif
}
#ifdef USE_VECTOR
#else
delete [] v;
#endif
return 0;
} Using std::vector instead of built-in arrays causes the release executable to grow from 20 to 26K. I find this acceptable (you might not).
What really introduces a huge amount of fat into the executables is the iostream library. But this is not part of STL.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks Joaquín. That sure does make sense.
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
Hello, I have a weird request from client:
- an application which when running, ad a custom
bitmap in all windows title bar, with a menu for some commands.
I could make a similarity with behavior of WinAmp for this request.
My application is not using MFC.
Can anybody point me on direction??
Regards
|
|
|
|
|
For painting the caption, use WM_NCPAINT. You'll probably have to code the menu yourself if you really want it to appear on the title bar.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|