|
This is a user option. Even if there is a way to do this programmatically, it would be a Bad Thing.
|
|
|
|
|
Not that i know of but that doesn't mean it can't be done.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Neil Urquhart wrote: Is there an option I can add to OnInitDialog() to make them appear straight away ?
You can modify the registry to turn on the "Hide underlined letters for keyboard navigation until I press the Alt key" checkbox. Let me check my notes. As Hans has said, making a change to something that the user may have turned off/on might not be looked upon highly.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
A user can control this (on XP) by going to Display Properties | Appearance | Effects and clicking the checkbox "Hide underlined letters for keyboard navigation until I press the Alt key".
|
|
|
|
|
Hello,
i've created several dialogs for my Tab-Control.
Now i'd like to update a ListBox on the main Dialog by clicking a Button inside one of the Tab-Dialogs.
How may i address the control variables from my main-Dialog?
When i try "GetParentOwner" i cant see the functions or variables, i have declared in my Dlg-Class.
Any guess?
Ty
|
|
|
|
|
Don't have to guess, this is a standard situation that comes up with all dialogs. Look at CFontDialog , for example. You will see a bunch of GetXXXXX() APIs, that the parent can use to access dialog info, after the user hits OK.
In this case, you can set a UserClickedButton variable in your dialog class, that the parent can access. Or even better, implement a GetUserClickedButton() API. If you need to update the listbox immediately, the tab dialog can send a user message to the parent.
|
|
|
|
|
But it aint possible to access membervariables or even instanced classes?
|
|
|
|
|
You can access any member variable declared public. However, it is better form to use accessor APIs.
|
|
|
|
|
Due to my low knowledge on API's and due to the fact that adressing public variables is my lifetime goal i need to know how i may adress them.
i tried to pass the this pointer from the main dialog to the tab dialog. this worked well, but the pointer didn't hold any of the functions or variables declared public.
how is it possible then?
|
|
|
|
|
Are you using C++? Is this an MFC app?
|
|
|
|
|
|
In that case it's pretty simple. Just declare a variable in the child dialog. You can declare it public, or create GetXXXX() API. When the child dialog exits (when user clicks ok), the parent can get data from variable.
If you want to send parent immediate notification, send a user defined message when button is clicked. To do this, when child dialog is invoked, be sure to pass pointer to parent (usually pParent - this is usually defined as CWnd *pParent). Then child dialog can send message by pParent->SendMessage(...).
|
|
|
|
|
Ty,
i just learned how to handle messages
works really well.
|
|
|
|
|
|
Hello all,
I have a function like below
int fn_RecognizeWord(TCHAR** strUnicode)
{
string unicodeStr;
.....
//Problem in this line
strcpy(strUnicode[0],unicodeStr.c_str());
}
How can i initialize into 'strUnicode' variable using 'unicodeStr' variable. For example 'unicodeStr' variable contains just a single line of string, like '80653478'.
Thanks to all
|
|
|
|
|
What is the problem ? Did you initialize your strUnicode array properly ? What I mean is, did you create an array of TCHAR* of the correct size, then for each of these pointers allocate the correct number of characters ?
The second step is probably easier to do once you know the size of your string:
strUnicode[0] = new TCHAR[unicodeStr.size()];
strcpy(strUnicode[0],unicodeStr.c_str());
|
|
|
|
|
It is not working. I testing it with MessageBox(), but this statement not working
|
|
|
|
|
What do you mean it's not working ? Could you explain what you are expecting, what do you get and show some code ?
|
|
|
|
|
Actually it gives "Please tell Microsoft about this problem." window when it executes that line
|
|
|
|
|
Shaheen.India wrote: strcpy(strUnicode[0],unicodeStr.c_str());
If the vairable name in your code make sense, I must say that you cannot simply copy the content of a string to a UNICODE pointer. you have to use MultiByteToWideChar() function or mbrtowc() function
|
|
|
|
|
No its just a string like '973465', store into 'unicodeStr'
|
|
|
|
|
|
Hi all,
I've got a strange problem while debugging inside CString code. Everytime I step through my code and the debugger steps into CString stuff, e.g. atlsimpstr.h, it lasts for about 30 seconds to move on to the next line. This is very annoying.
Anyone out there having the same problems or a solution for this?
Regards,
jung-kreidler
|
|
|
|
|
jung-kreidler wrote: Everytime I step through my code and the debugger steps into CString stuff, e.g. atlsimpstr.h,
Does this happends automatically or you do purposefully steps into that function?
jung-kreidler wrote: Anyone out there having the same problems or a solution for this
Try deleting the .ncb file of the project/solution and try again.
|
|
|
|
|
Naveen wrote: jung-kreidler wrote:
Everytime I step through my code and the debugger steps into CString stuff, e.g. atlsimpstr.h,
Does this happends automatically or you do purposefully steps into that function?
jung-kreidler wrote:
Anyone out there having the same problems or a solution for this
Try deleting the .ncb file of the project/solution and try again.
This happens during stepping through the code by pressing F10 and F11.
Deleting the ncb is always the first step, yes, but it did not help.
Thanks
|
|
|
|