|
But I say why and no because members of codeproject have full access to each section on the codeproject you dont need to search on the codeproject because it organizes its articles on the left panel you can see Tree Controls section so you should be say he is a hero on the codeproject!
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Um, I have almost no idea what you're saying at the moment.
But if I wasn't clear - I'm only teasing you about point to codeg(bleep). I occasionally visit there and find things myself.
I think CP is better, but it's not the One Truth<super>(tm)
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
I guess its a diversity so I used of codeguru instead codeproject but it seems you are angry and also I think Im lucy I'm live yet .
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hello All!
I have dialog with Menu. I want to remove the thin menu bar line (menu has bitmap on background, dialog, where's the menu is placed, also has a bitmap on background), however I still have thin line placed on the menu border.
It's looks like this:
http://www.rosco.vel.pl/img/menu_sample.jpg[^]
Please help
|
|
|
|
|
Hi,
I have one created one MFC AppWizard proect.. Then i got one default dialog box in application. Now i want vertical scroll bar on dialog box.
I want to create 10 group boxes with (419*70) pixels on dialog box, in one dialog it is not possible to create 10 group boxes with the mentioned pixels.
So i need to add vertical scroll bar, so whenever i have scroll down the remainig group boxes have to be displayed on the dialog box...
Can any one help me regarding this..?
Thanks,
Venkatesh.
|
|
|
|
|
You can insert WS_VSCROLL to your dialog with ModifyStyle or you can set Vertical Scrollbar to ture on the preoperty window of dialog.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi Hamid,
I have set the vertical Scrollbar parameter to TRUE to my dialog, it should move along with the mouse move movement right..? but it's not...
and one more thing as i mentioned in my previous thread i have to see remaining 5 group boxed when i sroll down..
Can you please tell me how i have to handle this scenario..?
Thnaks
Venkatesh
|
|
|
|
|
I think Iain answered to your question.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
There was an article posted on codeproject to do scrollable dialogs only a week or so ago.
http://www.codeproject.com/KB/dialog/scrollablechilddialog.aspx[^] is one example.
Have a look at the Dialogs and Windows[^] section, and search the titles for "scroll".
No point in people writing nice articles telling you lots of things, and then me writing pages of answers for you here!
Good luck,
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Hi Iain,
I have gone through the example given in the mentioned forum location, this answers my question, and i have tried the same thing in my application and it's working fine...
Thnaks you so much...
Thanks
Venkatesh.
|
|
|
|
|
I have gone through the example program given in the below mentioned site..
http://www.codeproject.com/KB/dialog/scrollablechilddialog.aspx[^] [^]
I am able to get Vertical Scroll bar successfully.. I have add OnPaint() massage handler for the CSrollbar dialog class, because i want to create check box dynamically in the OnPaint(). I am able to get the check box in the child window itself..
but whenever i have clicked on scroll down button on scroll bar, the check bax control is getting overlapped and the the control is getting collapsed..
How do i handle this situation..?
Thanks in advance..
Than ks
Venkatesh
|
|
|
|
|
That's only 700 pixels vertical height...I could fit almost twice as many on my screen.
One other thing to think about - are you using the most appropriate UI design - seems bad to be starting with a vertical scrollbar.
|
|
|
|
|
I need to draw line on picture control.
1st click is the 1st line start point.
2nd click is the 1st line end point.
3rd click is the 2nd line start point.
4th click is the 1st line end point.
.
.
.
and so on.
now i can't detect any message from picture control at all.
please give some tips or hints to me
thanks so much....
|
|
|
|
|
First you need to set Notify to true for your control and then you can use of LineTo/MoveTo.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
thank you
but i've got another problem.
how to get mouse position from picture control not my program position??
|
|
|
|
|
|
I assume that you are having a dialog based app with MFC support.
In the dialog, you are having a static rectangle (picture control) with SS_NOTIFY style (Notify can be selected in the Properties > Styles of picture control) named IDC_PIC.
You need to derive a class of CStatic. In that you can code for mouse events. Create a control variable of your IDC_PIC with this new class.
Hope now you can continue...
- ns ami -
|
|
|
|
|
1.Can i get a visible rectangle in a simple(typical win32)application?I wrote the code in WM_PAINT message as given below?I tried it but am not getting the
rectangle.Can any one help me in this?my code in WM_PAINT is
RECT rt,rtclient;
GetClientRect(hWnd, &rt);
SetRect(&rtClient,10,10,50,40);
wsprintf(buffer,"%d %d %d %d",rtClient.left,rtClient.top,rtClient.right,rtClient.bottom);
SetTextAlign(ps.hdc,TA_CENTER | TA_TOP);
ExtTextOut(ps.hdc,15,20,0,&rtClient,"RAM",3,NULL);
2.FORWARD_WM_CTLCOLOR()is not recognized in visual studio6.0.Is there any alternative function which does the same job?
|
|
|
|
|
1. What do you mean by visible rectangle? If you mean the client rect of your window, you already queried that here:
Abhinay Kumar wrote: GetClientRect(hWnd, &rt);
But note that in your code sniplet you get the client rect of the window into your rt variable and then you never use it, you explicitly define another rectangle called rtClient here:
Abhinay Kumar wrote: SetRect(&rtClient,10,10,50,40);
and then use that to draw the text. Shouldn't you either be uring rt instead of rtClient to draw OR use rtClient in GetClientRect?
2. What should FORWARD_WM_CTLCOLOR do in the first place?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Here i am giving it manual values but what if i want to draw a rectangle within the parent window.Therefore in GetClientRect(hWnd,&rt), i m geeting the coordrintes of parent window and then want to set the coordinates of the rectangle that i want within this window using SetRect(&rtClient,rt.left,rt.top,rt.right,rt.bottom); and display it using ExtTextOut().By Visible i mean
i am not able to see the rectangle within the window.Please reply.
|
|
|
|
|
I'm not quite sure what you mean, do you mean you want to know where a control is positioned in its parent's client area? If so, do something like this:
RECT controlRt;
::GetWindowRect(controlHWnd, &controlRt);
::ScreenToClient(parentHWnd, &controlRt);
Also note that to draw into the parent's client you need the parent's client DC, is that what you are using? If you did something like putting your drawing code inside the WM_PAINT of some control on that parent, did BeginPaint() and then you want to draw to the parent using the DC you got back, that won't work since the DC you get from BeginPaint will be "referring" to (and be clipped to) the client area of the window that got the WM_PAINT, not its parent.
If this is not what you meant, try to explain a bit more clearer what you need, please.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Please get it in simple terms that i want to draw a rectangle within the hello world window that should uses GetRect(),SetRect() and ExtTextOut().Is it possible?
|
|
|
|
|
Well, telling from this much information, it seems to be possible. Is this some school project?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Yes.Plz,plz tell me or if possible give me the code to do it in visual studio6.0
|
|
|
|
|
Well, first of all, the forum here isn't for doing other people's homeworks, if you can't do it yourself you are most likely have chosen the wrong thing to study. We will help if we can, but don't expect other people here to do your homework for you.
Anyways, do you have to do it using MFC or only API calls?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|