|
is there anything like zindex in MFC? i'm not sure..
Regards,
V
|
|
|
|
|
Vivekuniq wrote:
like zindex in MFC
Zindex or Z-order is way application windows are placed in Windows Enviornment
"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
|
|
|
|
|
void MyDlg::OnPaint()
{
CPaintDC dc(this);
ShowBitmap(&dc);
}
this is the only paint you need to do...
NG
|
|
|
|
|
I have a set of activeX controls. These controls are invisible at runtime. i have to create a project that use them like the follow way.
The methods defined in the activeX controls will be utilized by some aplication. They(ActiveX controls) will call methods in a dll. This dll makes interface with some devices, like printers.
I'm not knowing how to create the correct projects in The Visual C++ and how to link ocx and dll.
P.S.: If helps, all this is about OPOS DRIVER!
I wait for reply!
Greatiful!
Hélio
|
|
|
|
|
Hello guys,
In my dialog based MFC application I have two Static Control in which I saw text.
There is no menu and nothing else on that dialog box.
Now I want to put some code so that I can terminate the application by pressing any key or key combination with Alt or Ctrl key or some Function key.
For that I have tried WM_KeyDown and OnKeyDown and OnChar() functions but as focus is on Static control I m not able to capture that KeyDown event.
Some one suggested me to use Accelarator but that also I am not sure will work or not ? If yes then is there any simple example how to attache accelarator to my dialog(or static control )?
Thank you very much
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
I'm not sure of the exact name, but it's **_NOTIFY. you have to add this to your style for your static control either in the resource.h file, or in the create() statement (if you create it dynamically). Static controls won't process any clicks, keypresses, or anything until you add this to the style argument.
My articles
BlackDice
|
|
|
|
|
void CYourStatic::PreSubclassWindow()
{
// TODO: Add your specialized code here and/or call the base class
CWnd::PreSubclassWindow();
ModifyStyle(0, SS_NOTIFY);
}
NG
|
|
|
|
|
Hi
I have a dialog based MFC application. In this I want to color my dialog, but I don't want to color whole dialog, instead i want to leave a some pixels of border on all four side of dialog.
I am able to color my dialog by putting this code into my MyDlg.cpp file
HBRUSH CMyDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
hbr = CreateSolidBrush(RGB(255,0,0));
return hbr;
}
How can I leave the border around my dialog ?
Any help..
Thankx in advance..
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
here you have a memory leak
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
hbr = CreateSolidBrush(RGB(255,0,0));
return hbr;
creating a brush every time that a control of dialog, request it
do on OnPaint()
{
CPaintDC dc(this);
CRect rc;
GetClientRect( &rc );
rc.DeflateRect(10,10,10,10);
dc.FillSolidRect( &rc, RGB(0,0,0));
}
NG
|
|
|
|
|
Simple. Just looking for a good site that goes over all the basics of MFC, possibly with some good tutorials. Any help?
Danny
|
|
|
|
|
|
CodeProject is awesome. I'd say the best part about this site is the forum for programmers to answer other programmer's questions. The articles are great, too, but at times too specialized for what I'm looking for. I mean, beyond the basic listing of member functions that MSDN gives me, a site that really teaches all the basics of MFC. I have some great sources here in the office, but I don't like to bug them for help when I'm trying to learn a new control or feature. (new = I haven't used it yet)
Danny
|
|
|
|
|
where were u toxxct? i haven't seen u for couple of days or so.. or u OK?
V
|
|
|
|
|
yes yes, i'm there, every day, but as there are not always good posts, and as i have to work hard...
but if you search a bit more (my posts are here[^]), you'll see that i am still active...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
ohh.. ok .. i felt i missed the bright organge colored text on few pages..
V
|
|
|
|
|
It would be nice to be able to find aritcles by beginner/tutorial classification.
The tigress is here
|
|
|
|
|
|
Codeproject ?
|
|
|
|
|
Have you seen the Scribble tutorial on MSDN? It starts from scratch and builds up to a very detailed application.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
codeproject? no no.. let him go to Google first . its the best for all kind of needs.. for MFC google will take him to the best place on earth.
[edit]we'll meet him back here in five minutes[/edit]
regards,
V
|
|
|
|
|
Thanks, I'll take a look.
Danny
|
|
|
|
|
I know you didn't ask for a book, but I really think you should treat yourself with "MFC Internals" by George Shepherd and Scot Wingo. It's very old (1996), covers MFC 4.0 (many versions back) but it is still the bible of MFC programming. It covers all the fundamental functionalities of MFC and gives you an in-depth understanding of the framework. And MFC really haven't changed that much since 4.0. I regularly read it although I've been programming MFC for 10 years. You can get some used copies for about $7 at Amazon.
Another must-have book is "Programming Visual C++" by Kruglinski, Wingo and Shepherd, also available used at Amazon (<$5)
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Thanks, I like to use books better actually. I've spent all my money for this month (literally), so I'll have to wait 'till next month to see if I have money, but I'll look into it.
Danny
|
|
|
|
|
Hi all,
I have a dialog box which has rich-edit as child control inside it.
When i click inside the rich-edit box, focus is in the rich-edit.
Now when i press 'Tab' key from here, then text in rich-edit is highlighted.
But focus does not move outside rich-edit. Instead i want the focus to move to other controls in the main dialog, when i press 'Tab' key inside rich-edit.
Please suggest on how should i handle Tab key notification for rich-edit in this dialog.
Thanks in Advance
Abhijeet Jadhav
|
|
|
|
|
use LayOut-->TabOrder (ctrl+D) menu.
set ordering.
|
|
|
|