|
Thanks, this is exactly what I'm looking for!
|
|
|
|
|
What class did you derive from? What event are you wanting to handle?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
See my response to Jamie please, that should be enough to completely reproduce the problem.
Thanks
Hua-Ying
|
|
|
|
|
IIRC, I think you will need to use "reflection" to make this work. There is usualy a weird message handle for classes like button that allows them to trap their own click messages.
In VS 7, and I think VS 6 did it this way too, the message you want to trap in the wizards looks something like:
=BN_CLICKED
And the message map entry will be something like:
ON_CONTROL_REFLECT(BN_CLICKED, OnBnClicked)
Hope this helps.
An expert is somebody who learns more and more about less and less, until he knows absolutely everything about nothing.
|
|
|
|
|
Thanks for everyone's help!!
For anyone else who's having the same problem, one last thing you must do before this solution will work is to add a variable in you main dialog class so that when it loads your control it will use the subclass for the control instead of the original.
Details: using the class wizard generate a new variable with your subclass type, click the control check box (VS 2003 .Net) so that DDX_Control will update the value.
You can also follow Chris Maunder's great tutorial on subclassing controls:
tutorial
Hua-Ying
|
|
|
|
|
Hello Dear
I want to convert an character string into UNICODE(Wide Character), I found function for it in MSDN it's called MultiByteToWideChar()...But don't know how to use it ..? Pls any one can do it for me...?
Suppose I have a string say : char *sString ="XYZ"; and want to convert it using this function then ..?
Thank You...
MacGlen
|
|
|
|
|
Straight from MSDN:
WCHAR wszUserName[256];
char *sString = "XYZ";
MultiByteToWideChar(CP_ACP,
0,
sString,
strlen(sString) + 1,
wszUserName,
sizeof(wszUserName) / sizeof(wszUserName[0]));
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Dear David Crow
Thank You very much for my answer.
It's really wroking very find...
I againg like to thank you.
Bye
Amarelia Maehsh
|
|
|
|
|
Hi,
I have several SplitterWnd with dialogbox-based FormView in my application. For a good layout i need the size in pixel of the dialogboxes (generated with the ressourceeditor) as early as possible to arrange the splitter windows.
Please help me!![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Rolf Faßler wrote:
I have several SplitterWnd with dialogbox-based FormView in my application.
How many CSplitterWnd controls are there? Is the view in each pane derived from CFormView ?
What are you wanting the size of the panes to be based upon?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have up to 11 SplitterWnd in my application, the panes in four of them are derived from CFormView.
|
|
|
|
|
Rolf Faßler wrote:
I have up to 11 SplitterWnd in my application...
So does this mean that you have 22 panes (I'm assuming that there are two panes per splitter window)?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Greets,
i need a idea, how i can convert a sepcific (graphic) file to a bitmap witch is based in memory.
Reason is: i can't write out a bitmap-file, and load it after writting, cause the file information have to be secure. After the bitmap staying in memory i can load, show, and destroy it. I think so?
I know the bitmap file format, and i have the informations from the specific file to fill bitmap-structure-components. So what i don't know is: witch interface can i use to open and get the specific file informations, how i can load the packed bitmap, after i fill the structure, into the memory, and how i can display this packet bitmap.
thanks for every answer
codefire
|
|
|
|
|
a BMP file is simply a BITMAPFILEHEADER followed by a DIB. so, just skip the BITMAPFILEHEADER and call StretchDIBits to display the DIB.
Software | Cleek
|
|
|
|
|
thx it run's. ![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
I get this error:
'__thiscall CFile::CFile(const char *,unsigned int)' : cannot convert parameter 1 from 'const char *(void) const' to 'const char *'
when I try to do :
CFile filePort(m_outputFileName[0].c_str, CFile::modeRead);
m_outputFileName[0] is a std::string.
Will I have to strcpy m_outputFileName[0] into a char temp[256] and put that into CFile?
I'm not sure how to make the std::string behave for the CFile. Is there a simpler way?
Thanks,
sb
Added:
I get the same error if I do:
char file1[256];
strncpy ( file1, m_outputFileName[0].c_str, 256);
|
|
|
|
|
c_str()
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Aaargh! Havent dealt with std::strings much....thats my poor excuse.
Thanks so very much,
sb
|
|
|
|
|
Hi Guys,
How Can I convert a CString to a T_String.
My T_String is a typedef defined as follows.
typedef std::wstring T_String;//wstring,co's my project is unicode defined.
Thanks......
|
|
|
|
|
Just curious....
Why are you doing that? CString has already unicode support.
Jaime
|
|
|
|
|
co's I have a function which takes a T_String as parameter...
|
|
|
|
|
since CString (when UNICODE is defined) and std::wstring both are defined as an array of wchar, you could safely do:
CString sOther = _T("This is a string");
T_String s = (LPCTSTR)sOther;
Jaime
|
|
|
|
|
|
I am searchinf for information about NFS protocol. Do you know any useful link or samle ? Thanks. Satucha
|
|
|
|
|
Start here.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|