|
There is more than way to do that. The easyest one I think is SetWindowText(). Search the MSDN for this function, you'll find the details.
johnnyl
|
|
|
|
|
Thanks a lot. Got it working.
cheers
mughi
|
|
|
|
|
I build a dialog application using VC++, and I want to deal with the keyboard message. but the ON_KeyDown fuction can't work, it can't be called by framework at all. then I find that I can deal with keyboard message in the PreTranslateMessage function, but it just like odd. I think it must have a better method.
thanks
laia
|
|
|
|
|
KEYDOWN works with dialogs. You can try it with an epty dialog (no controls on it, not even OK and Cancel) and see the function gets called. But if you place any controls on the dialog the messege doesn't get sent to the dialog no more, it gets sent to a control on the dialog. That's why your function doesn't get called.
PreTranslateMessage works fine, I don't think it's odd. But if you find a better way please share .
johnnyl
|
|
|
|
|
HI.
I have captured an AVI file with Cam and TV tunner..
But AVI files take More Space on Harddisk.
Now Plz Tell me Which Format Take Low Space OnHardDisk
And Provide a Normal Result ( MAy be Not Much Fine
But Clearly I can See It hahaha).
HOw Can i Convert AVI file TO That Format PLz REply
thanx
|
|
|
|
|
Try to convert MPEG,
it provides highest compression ratio and best quality
|
|
|
|
|
hello everyboy!
I making an application in which i have to make image from some memory location of array. The image is not been loaded from any pyhsical file.
it is been placed in memory be some other application but i have the memory referance.
i do not know how can i make image of that memory and dispaly that on a form?
Please Help.
THANKS IN ADVANCE.
|
|
|
|
|
There is a useful class named CBitmap,
DWORD CBitmap::SetBitmapBits(DWORD dwCount, const void* lpBits);
This member function should be helpfull
|
|
|
|
|
Send your answers to mikeza123@comcast.net
1. When a decryption section is added to a PE what is changed and must be restored for the program to function properly after dumping?
2. What exactly does it mean to dump a program?
3. What is an OEP and what should you look for when finding one?
4. What does IAT stand for and what is its member index in the Optional Header?
5. What API imports should you look for when looking for email sending functionality?
6. What ring must you be in to access debug registers?
lets see how smart yall are
|
|
|
|
|
None do I know. I feel like an idiot...
Maxwell Chen
|
|
|
|
|
Wots the first prize
It's not a bug, it's an undocumented feature. suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
test my knowledge or yours ?
anyway, I don't have a clue ...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
1. Ha!, this is a trick question, you shouldn't actually dump a program, because it may contain sectors that won't get broken down over time, and that could cause a major environmental catastrophe.
2. That's when programmers of questionable quality hauls aged programs out in deep sea and throws them out to pollute the local environment.
3. An OEP is a little critter living in the forests south of Neverwinter, if you find one, you should look for its cave, because they are usually loaded with weapons and stuff...
4.I refuse to answer this question, because i despise everything IAT stands for...
5. The ones that are concerned about sending emails.
6. , now that's a dirty question, this should be in the soapbox.
So, how did I do?
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
ARG YA'LL FAILED....Lol nice try, took me a while to answer them to
|
|
|
|
|
Hope So i Failed Too!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hello,
This is probably very simple but I am having problems.. Here is what I am trying to do..
I have a SDI application explorer style, tree at the left and I want, in column 2, to have another horz split with 2 different list views one on top and one on the bottom, is this possible?
Here is how it is now..
| | | |
| TREE | CTopListView | CBottomListView |
| | | |
This is how i want it to look
| | CTopListView
| |
| TREE |--------------------
| |
| | CBottomListView
Here is how im currently splitting inside CMainFrame
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT ,
CCreateContext* pContext)
{
if (!m_wndSplitter.CreateStatic(this, 1, 3))
return FALSE;
if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CMachineView), CSize(100, 100), pContext) ||
!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CRemoteView), CSize(100, 100), pContext) ||
!m_wndSplitter.CreateView(0, 2, RUNTIME_CLASS(CLocalView), CSize(100, 100), pContext))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
return TRUE;
}
I have tried tons of combo's..
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
if i understand correctly, you need two columns and in the right hand column two rows.
try this
first of you need two splitterwnd member variables
m_wndSplitter,m_wndSplitter1;
m_wndSplitter.CreateStatic(this,1,2);
m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CLeftTreeView),CSize(150,100),pContext);
m_wndSplitter1.CreateStatic(&m_wndSplitter,2,1,WS_CHILD|WS_VISIBLE,m_wndSplitter.IdFromRowCol(0, 1));
m_wndSplitter1.CreateView(0,0,RUNTIME_CLASS(CMyListView),CSize(100,75),pContext);
m_wndSplitter1.CreateView(1,0,RUNTIME_CLASS(CMyListView),CSize(100,100),pContext);
Hope it Helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Worked like a charm!
Thank you!
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
I am at the starting blocks when it comes to VC++. To give you some background, I am a Computer Science student thats fed up with the fact that my department champions JAVA for undergrads, while using C and C++ for all their research projects. I have a copy of vis Studio .NET 2003 pro, and would like to get started in VC++.
I am familiar with JAVA, object oriented concepts, and some operating system/compiler basics.
If I want to build a bog standard windows app, with the usual GUI widgets, and possibly a panel area for custom graphics output, whats the best way to go about this. I'd like to stick to C++ as much as possible as it seems to be widespread. The whole MFC/ATL/managed extensions business confuses the hell out of me, can anyone let me know where I should begin?
|
|
|
|
|
MFC is a class library that wraps the old C way of doing things in Windows. It is infinitely easier to use than Win32 stuff, is OO, and is widely used. WTL is cool, but more complex ( you'll need to learn templates, etc. ) and not so widely used, nor does Microsoft support it. Managed extensions are crap, pure and simple. If you want the .NET runtime, use C#.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Like Christian said, MFC is a OO library which makes it much easier to program windows.
If you want to start programming in C/C++, one of the books I've always liked is Let Us C[^]
There's Let Us C++[^] too, if you want a cpp book. I haven't read it, but judging by the first book, I think it should be pretty good.
Pointers in C and C Projects by the same author are also good.
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
Hi,
I have a class derived from CButton, CMyButton for the sake of discussion, and I would like to create a variable number of these controls on a dialog based on certain parameters. I have CMyButton* m_pButtons, where I've alloted memory with 'new'. I then try to do the following:
m_pButtons[0]=CreateWindow("BUTTON",0,WS_CHILD|WS_VISIBLE,nSomeX,nSomeY,nSomeWidth,nSomeHeight,this->m_hWnd,0,NULL,0);
I get this error:
error C2582: 'CMyButton' : 'operator =' function is unavailable
Is there some other way to approach this, or do I need to define a 'operator ='? If I need to define the operator, how should I do it? And is this enough information?
Thanks,
Aaron Stubbendieck
modified 12-Jul-20 21:01pm.
|
|
|
|
|
I have not checked your code. But I thought it should be changed to:
<br />
CMyButton* m_pButtons=new CMyButton;<br />
m_pButtons->CreateWindow("BUTTON",0,WS_CHILD|WS_VISIBLE,nSomeX,nSomeY,nSomeWidth,nSomeHeight,this,0,NULL,0);<br />
Or if you need an array of button:
<br />
CMyButton m_Buttons[10];<br />
m_Button[0].Create(...);<br />
m_Button[1].Create(...);<br />
....<br />
|
|
|
|
|
I think you're probably right on the the correct CreateWindow thing there, but I guess that's not how I should do it.
I've tried the m_pButtons[0].Create(...), and that works well, it just looks different from the other buttons. Also, debug assertions are caused in debug builds, but aren't a problem in release builds.
Is there a way I can fix the visual issues (flat button with border and the default system font) or do I just need to set those manually?
[edit]I just decided to manually add the styles and font and it works great. Thanks for your help![/edit]
Thanks
modified 12-Jul-20 21:01pm.
|
|
|
|
|
I can get the other exe's ocx control's handle.
I try to use handle to control's point,but it is error!
example:
p = (CSpreadSheet *)CWnd::FromHandle(glhTargetWnd);
//error,because the p is my exe, the ocx control is belong to the other exe,I cant use FromHandle.
How can I do?
Please help me!!!!
555555 7456
|
|
|
|
|