|
Is there a mac/OS X forum here? I couldn't find one and since this is in C i posted it here.
|
|
|
|
|
Member 9993401 wrote: Is there a mac/OS X forum here? No, this site is predominantly Windows focused.
Use the best guess
|
|
|
|
|
I have hWnd of main window of other process and I need to increase priority of this thread or process. How to do it?
|
|
|
|
|
|
I need a counter in C++ to my windows form.
Code:
int counter60
counter60 ++;
Counter->Text = System::Convert::ToString(counter60);
I only counts to 1, first time i klik the button. I have it under my Button click.
What is wrong here ?
|
|
|
|
|
At a guess, since you did not provide the relevant code, you are initializing counter60 to 0 every time on your button click and incrementing it to 1.
And this is C++/CLI and should have been posted in the appropriate forum.
|
|
|
|
|
You need to put your counter variable in the class; or make it a static variable.
Now, I assume you re-create the variable each time you click on the button.
(in c++, pseudo-ish code....)
class YourClass
{
YourClass();
int m_Counter;
void OnButtonClick();
}
YourClass::YourClass () : m_Counter(0)
{
}
void YourClass::OnButtonClick()
{
m_Counter++;
Counter->Text = System::Convert::ToString(counter60);
}
Nihil obstat
|
|
|
|
|
How do you mean "Re-create" ?
I am kind of a rookie.
I use Visual c++ 2010.
|
|
|
|
|
Do you have to call an updatedata() type func like in MFC to refresh the GUI?
If not debug it, it shoud be 61 not 1. Step into the converttostring and make sure you get the right string back, then step into the ->Text func and make sure its being set.
==============================
Nothing to say.
|
|
|
|
|
> This < should help.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
Hi,
I have created a property sheet. On that 3 Tab controls and three pages have been added.
When I use new larger Images for Tab controls, then it didn't display full Image, it accepts the older size of the Image and display new Image in that area only.
How to resize tab controls in mfc.
Any help will be appreciated.
Regards,
Mbatra
modified 16-Apr-13 7:48am.
|
|
|
|
|
|
I am not sure what you really want but u can use
MoveWindow()
Function .
Moves,resize window as per co-ordinate.
|
|
|
|
|
do you know how to assign strings in c program?please answer me.
|
|
|
|
|
Yes I do know. Now, what is your question?
Use the best guess
|
|
|
|
|
"assign strings in C"
A Question for you. Does C language support Object Oriented Concepts?
|
|
|
|
|
Objective-C does.
Standard C, no.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
|
No sign of ++ in the OP heading. That's why I didn't mention it.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
const char* string = "string";
If you want a string that is not constant, that would be assigned differently, and the answer would depend on whether you mean "assign memory space" or "assign the characters forming the string" when you say "assign", as these are two separate activities in C.
What do you want to know? What have you tried? What books and/or articles have you read, and what is it you do not understand? Who was that masked stranger?
|
|
|
|
|
Here is wide character string version for international users.
const wchar_t* string = "string";
Unicode/MBCS gets very messy developing on Windows, dependent on whether UNICODE is defined at compile time.
see this article for a comprehensive explanation.
What-are-TCHAR-WCHAR-LPSTR-LPWSTR-LPCTSTR-etc?
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
I thnk you forgot the L prefix.
Use the best guess
|
|
|
|
|
That isnt going to work.
As Richrd says it needs to be const wchar_t* string = L"string"; or at the vey least use the T() macro and use tchars.
==============================
Nothing to say.
|
|
|
|
|
Yes, I realise that now.
I've been avoiding wide-char & unicode for as long as possible because it does my frickin' head in. Only now am I coming to regret not dealing with it sooner.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
Avoiding unicode? Why, its great! Really, all the languages, all the localisation taken care of, propper strings. No messing around! Go for it!
==============================
Nothing to say.
|
|
|
|