|
Paps2 wrote: Where can I get an installable copy of these runtime, or the component dll files, for XP?
why not try building software package with InstallShield or InnoSetup... they themselves give you the list of dll to choose from
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi Geniuses,
I saving the toolbar status of my MDI application using SaveBarState (_T("TBStatus")). It works fine. It stores the status in the registry here:
HKEY_CURRENT_USER\Software\Local AppWizard-Generated Applications\MyApp\TBStatus
I the status to be stored in some other place, specifically here:
HKEY_LOCAL_MACHINE\SOFTWARE\MyApplication\TBStatus
Where "HKEY_LOCAL_MACHINE\SOFTWARE\MyApplication" is the installation entry.
My aim is to remove the toolbar status entry from the registry while uninstalling the application.
If anybody could suggest me a solution, I would be grateful.
Thanks in advance,
Sarvan AL
|
|
|
|
|
Sarvan AL wrote: My aim is to remove the toolbar status entry from the registry while uninstalling the application.
Ok, so just use RegDeleteValue() and RegDeleteKey() .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
I have been trying to make a simple keyboard that can send keys pressed to another application. I want it like what multi language OS does in that I enter it in one application(keyboard) and it will "inject" the key message to another application's message buffer. Can any one direct me in the right direction or the right API to use etc?
Thanks in advance.
|
|
|
|
|
Stan the man wrote: I want it like what multi language OS does in that I enter it in one application(keyboard) and it will "inject" the key message to another application's message buffer.
I don't really understand the part in which you are speaking about "multi language OS", can you be more explicit please ?
Otherwise, if you are working on windows, you can take a look at the PostMessage[^] function. But first you'll have to retrieve the HANDLE of the window (other guys here will be more helpfull than me on this point).
|
|
|
|
|
See if this article is of any help.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Hey All,
Can anyone help me to make toggle button from CButton...
Poornima
|
|
|
|
|
In the handler function of your button, set the state to true if it must be pressed and to false if it must be released:
static bool bPressed = false;
if (bPressed)
{
bPressed = false;
m_MyButton->SetState(bPressed);
}
else
{
bPressed = true;
m_MyButton->SetState(bPressed);
}
|
|
|
|
|
<br />
static bool bPressed = false;<br />
bPressed = !bPressed;<br />
m_MyButton->SetState(bPressed);
The tigress is here
|
|
|
|
|
This one is even easier.
m_MyButton->SetState(!m_MyButton->GetState());
Maxwell Chen
|
|
|
|
|
Yes sure but then you still need to make an if/else statement if you want to do two differents things when the button is pressed or released
|
|
|
|
|
|
Take a static variable and keep on incrementing it by 1 on each click of the button. Check with the modulus operator. If the value returned is 0 do something, else do something else.
ex:
static int i;
void CMyClass::OnButton1()
{
i++;
if(i%2==0)
//Do something
else
//Do something else
}
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
-- modified at 9:56 Friday 5th May, 2006
|
|
|
|
|
You won't have a toggle button in this way. This will just make two different things but the button will always be released (graphically I mean).
|
|
|
|
|
see radio buttons or checkboxes. they are actually CButtons, and they do have in their properties a flags called something like "push button" (see in the resource editor)...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
It's probably the easiest solution
I used mine because I had to do the same but the buttons were on a toolbar (so you cannot control the properties with resource editor).
|
|
|
|
|
But i am creating a button with image.(customised one)... Say that i already have a CButton now i want to change that to toggle.
|
|
|
|
|
|
hmmm... Ok.... Can I make a radio button with Image and will it look like a normal button?
|
|
|
|
|
|
okay... How should i write Message Maps for two states(On/OFF)... I am creating everything at runtime
|
|
|
|
|
Message Maps ? I thought you were using the MFC's (CButton is part of the MFC), so you don't have to write message maps yourself. What are you trying to achieve exactly ?
|
|
|
|
|
Hey,
As i am creating everything at runtime i am writing the message maps.
And I got the solution also... I can just keep count of button pressed and writing my code accordingly ...
Thanks for the help
|
|
|
|
|
Ok, sorry, I misunderstood you (almost the week-end ).
Use it the same way as a normal button. But if you create them at runtime, you won't be able to configure them through the resource editor. So, the solution is to use the code I posted in my first thread.
So, you make the message map like for a standard button press and inside the function, you paste the code.
|
|
|
|
|
Is there anyother functions available... instead of static variable??
bcoz I may face problem for situation like,
just describing in steps.
1.I am pressing the button... It state will be set to true.
2. without releasing it say i am closing that window
3. Again i am opening the window and pressing it...
I will face unwanted behaviour. Is there anyother function call is there to get the state??
Hope I made it clear
|
|
|
|