|
Thank you, DavidCrow.
Let me make it clear the requirement.
1. is a MDI: the 'panel' will locate in the left-hand side of the main window, while ClientWindow of MDI will locate in the right-hand side. Therefore, all child frame will be working in the left-hand side of the main window. So using splitter may not fit.
2-3 not float-able: because I try to use controlbar to build up the panel. but failed to make it un-float-able. Then I addd this item as a reference.
|
|
|
|
|
Hai,
I'm new to vc++ win32...i am trying to read and write to serial port COM1.
I know we can do this by createfile and read and writefile fns..but i am not sure about the flags and how to set buffer values..and what other funcs i need to do..suppose i want to write say "hello" to com1 and get the acknowledge "hi" from it...can any one help me with the code exactly how to do it..
thanks a lot.
|
|
|
|
|
I use external library to make my application in multilanguage.
So I need to change all texts in the interface.
But I have a problem with tooltip on toolbars.
Another way : Maybe there is a solution to change the value of the "string table" in my programm (I cannot create many "string table" because I use external library)
Hope someone can help me.
Regards,
Jérémy.
-------------------------------
Le sage cherche la Vérité,
L'imbécile l'a déjà trouvé.
|
|
|
|
|
Success trying to override CFrameWnd::OnTooltipText
with these messages in my CMainFrame :
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnTooltipText<br />
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnTooltipText
But I'm still interest if someone as any idea to change text of one "string table" in the program
Regards,
Jérémy.
-------------------------------
Le sage cherche la Vérité,
L'imbécile l'a déjà trouvé.
|
|
|
|
|
Hello everybody
see this:
CString myID;
myID="IDC_BUTTON1";
GetDlgItem(myID)->SetWindowText("");
any idea?
Best wishes.
Thanks
|
|
|
|
|
CString myID;
myID = _T("Any Text");
GetDlgItem(IDC_BUTTON1)->SetWindowText(myID);
P.
|
|
|
|
|
The problem you have is that GetDlgItem does not take a string as a parameter.
When you write
GetDlgItem(IDC_BUTTON1)->SetWindowtext("");
The compiler replaces the define IDC_BUTTON1 with its numeric value (see resource.h)
What would work is
int myID;
myID = IDC_BUTTON1;
GetDlgItem(myID)->SetWindowText("");
Unless I have misunderstood your problem.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
i am using installshield for microsoft vc++ 6.0 for my installation wizard.
I am unable to create a package, so that there will be a single setup.exe which can be used to install it.
Please let me know how to do this?
vidya
|
|
|
|
|
Hi
I dont have answer to your question you could use Install Shield forum for more help
http://community.installshield.com/[^]
Regards
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
I have submitted the query in the install shield forum...
but no replies.....
creating a package in install express is easy.......
but i could do it in installshield for microsoft VC++6.0
Is there any script i need to write for that?
vidya
|
|
|
|
|
Just starting out,
Problem is that when I read a button name from a text file and
assign it using a control variable and the setwindowtext function, i seem to
get an extra character printed on the button.
I am using fgets to read a string from a text file.
Any help will be gratefully accepted.
Phil
|
|
|
|
|
It sounds like the string also contains the newline character.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
So whats the easy way to get rid of this?
|
|
|
|
|
Replace it with a '\0' character.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Fetch the content in a CString type variable and then use the TrimRight() function with no parameters. When used with no parameters, TrimRight removes trailing newline, space, and tab characters from the string.
Vikram Kashyap
"You will never fail until you stop trying"
|
|
|
|
|
Fetch the content in a CString type variable and then use the TrimRight() function with no parameters. When used with no parameters, TrimRight removes trailing newline, space, and tab characters from the string.
Vikram Kashyap
"You will never fail, until you stop trying"
|
|
|
|
|
winzip setup is a single program with exe extenstion, such as winzip80.exe.
But it is a zipped file also - we can use winzip to unzip the exe file.
the exe file is also self-executable - we can run it by double click it.
OK, I want to create a file similar to the exe file programmatically:
1) with exe as extension
2) contains multiple file inside (a zipped file) and can be unzipped by winzip.
3) self-executable by double click it.
do you have idea to implement the file?
thx
includeh10
|
|
|
|
|
|
Hi,
thanks, it looks very good, but...
I have simply tested the program as following:
1) put several files in source folder, one of them is an exe file: try.exe
2) name an output file: my.exe (the file doesn't exist)
3) select try.exe as auto-execute program
then click Action menu: "build self-execute program"
an error message appears:
"Fail to update the resource table of the self-extract executable file!"
do you know what problem it is?
(I didn't read code)
thanks
includeh10
|
|
|
|
|
I know why: I use win98 (My users even use win95).
UpdateResource function is for NT/2K only.
problem!
includeh10
|
|
|
|
|
Hi,
I am currently having a discussion at work.
If I have the following code:
int m_nNumber = 0;<br />
void Increase()<br />
{<br />
m_nNumber++;<br />
}
Is this code threadsafe or should it be:
CCriticalSection m_cProtect;<br />
int m_nNumber = 0;<br />
void Increase()<br />
{<br />
m_cProtect.Lock();<br />
m_nNumber++;<br />
m_cProtect.Unlock();<br />
}
In other words, will the ++ operator be called atomic (in one clockcycle).
Hope someone can help me.
Regards,
Peter.
|
|
|
|
|
++ is not an atomic operator. See InterlockedIncrement in MSDN.
"though nothing
will keep us together
we can beat them
for ever and ever"
rechi
|
|
|
|
|
Agreed, Good point.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Simply no the code is not thread safe. Using critical section will work just fine. Although I would write it a little differently.
CCriticalSection m_cProtect;<br />
int m_nNumber = 0;<br />
void Increase()<br />
{<br />
CSingleLock lock(&m_cProtect, true);<br />
m_nNumber++;<br />
}
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hi!
I just try to implement class with members which return const values:
class MyClass{
* * *
protected:
float GetVal() const {return val;}
private:
float val;
}
It compiled well without "const" but with it I got multiple errors. I can not avoid of use "const" becuse I must follow
some coding style.
So your help is very essential for me.
I code in VS 6.
|
|
|
|