|
You're in college now studying computers in some technical fashion and didn't already know simple programming when you started? Way behind the curve.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
vtech22 wrote: ive read every chapter shes told us to read. yeah i understand what there saying in the book but the book we were required doesnt so much as teach you how to code as tell you the different names for things and why there used if my assignment was to right the deffinitions to different programming terms id have no problem
OK, so the teacher was useless and the book is useless, so you now have two reasons why you think we should do your work for you. May I suggest you try a simpler course, more in keeping with your abilities and willingness to learn.
|
|
|
|
|
Hello,
I need to have a hor. scrollbar, even if there are not enough columns to fill the window. By starndard it disappears in this situation.
Can anyone help?
Thanks, GE
|
|
|
|
|
gerens wrote: ...even if there are not enough columns to fill the window.
What would you expect it to do in this situation?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
He probably wants to have the scrollbar shown all the time. When there are not enough columns to fill the window, the scrollbar is just disabled but still shown.
|
|
|
|
|
I have a CListView with fixed columns on the left side. Works fine with the keyboard. But if I scroll at the end of my list, I cannot scroll back to the beginning with the mouse (because the scrollbar is not shown).
Thanks, EG
|
|
|
|
|
gerens wrote: But if I scroll at the end of my list...
You indicated earlier that there are not enough columns to fill list control, so what's to scroll?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
An example:
I have 8 columns. 2 of them fixed, 6 others shown and 2 outside the window.
If I scroll one column to the left, everything is ok. HScrollbar is showm and I can scroll back.
If I scroll two columns to the left, all columns are now within the window, the HScrollbar disappears and I csn't scroll back with the mouse (only with the keyboard).
Of course it would be a solution to always fill the window with empty colums (like in Excel), but I hope there is another way.
Thanks, GE
|
|
|
|
|
Hi,
If there 2 windows T1 and T2. How T1 will notify T2 by sending a message?
How 2 achieve this 1) if they are child and parent windows or
2) both are independent windows
Thanks in advance
MSR
|
|
|
|
|
Message can be sent to a window using SendMessage or PostMessage .
Both these functions take the handle of the destination window as a parameter.
So as long as you have the handle to a destination window, it doesn't matter if the windows are independent or have a parent-child relationship.
|
|
|
|
|
There's SendMessage[^] (which blocks until the recipient window process the message and returns a value) and there's PostMessage[^] which is a non-blocking call and therefore returns immediately. Based upon your requirements, choose one.
Additionally, RegisterWindowMessage[^] would help you register a unique message, which you might want to post or send.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Hi,
I have my CListBox, and it is displaying different groups of data. I would like each group header to be emboldened, but I am struggling to get any bold text.
If I had a CListCtrl I could use OnCustomDraw, but that functionality doesnt appear available to either my CListBox, or the parent Dialog.
What I want to achieve is this
Header1
Data1
Data2
Header2
Data1
Data2
Any help would be much appreciated
TIA
Tony
|
|
|
|
|
What you can do is to use owner-draw listbox:
• Derive a class from CListBox and override CListBox::MeasureItem(), CListBox::DrawItem(), and PreCreateWindow() (to add LBS_OWNERDRAWFIXED or LBS_OWNERDRAWVARIABLE).
• Create an object of this class and call its Create() or CreateEx() function to create this control.
Note:
The parent of this list box will get one WM_MEASUREITEM for the whole list box if LBS_OWNERDRAWFIXED is used or one WM_MEASUREITEM for each item of the list box if LBS_OWNERDRAWVARIABLE is used. MFC will call the virtual function CListBox::MeasureItem(). The parent also gets WM_DRAWITEM, while MFC calls the virtual function CListBox::DrawItem(). Although the above two messages are sent to the parent, the virtual functions make it possible to handle some useful things by the list box. Through overriding these two functions, the self-controlling of the drawing process can be achieved for the list box.
|
|
|
|
|
|
Thanks for the link Superman, but that seems to relate to CListCtrl whereas I'm using a CListBox
Tony
|
|
|
|
|
Hello,
for my application's needs, I am trying to capture the whole desktop (including children windows), except the active window. I have the capturing code working, but I cannot find reference on how to ignore the active window. Can someone assist me?
This is on Win32, C++, No MFC.
Thank you for your time
|
|
|
|
|
Do you mean you need to capture the IMAGE of the whole desktop except the active window? The active window (shown on screen) will block the view of the desktop (such as windows behind it). When you say "except" the active window do you mean you want to capture the desktop as if the active window is not there (hidden)?
Your program can briefly hide the active window to capture the image, then restore the display status of the active window. But that will cause ugly view experience while it is doing this. I am not aware of a method that you can use to capture whatever image that is behind a certain window.
|
|
|
|
|
If it is desktop wallpaper that you want, you can get it using SystemParametersInfo with the SPI_GETDESKWALLPAPER parameter.
|
|
|
|
|
Hi,
Is it possible to set the size of the tab spaces on a CListBox? e.g. in Visual Studio you can configure the number of spaces that a Tab simulates - can this be done within a CListBox?
TIA
Tony
|
|
|
|
|
You cannot type within a CListBox , can you? So what sense does it make to have the number of spaces tab would simulate within a CListBox ?!
Pressing tab would take the focus to next control in the tab order by default. I'm not sure I understand your query well...
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Hi,
I probably didn't explain it well enough.
You can add strings to a List Box that contain \t to represent tabs. Currently the \t symbol translates to about 8 spaces, whereas I could do with it being about 4 spaces.
As an example, I am currently displaying something similar to this
Header
Data1
Data2
BUT I really would prefer something like this
Header
Data1
Data2
Any ideas?
Tony
|
|
|
|
|
Problem Solved,
I missed SetTabStops when looking at the ListBox members...
Thanks for focussing my thoughts
Tony
|
|
|
|
|
Hi,
I want to transform a black&white image into a binary image. I would like the background (black)to have 0 and the foreground(white) to have 1. I do not know how to proceed. I am implementing in C++ (QT).
Thanks in advance,
franckesh
|
|
|
|
|
franckesh wrote: I want to transform a black&white image into a binary image.
I am not sure what you are trying to achieve here, can you clarify your question?
|
|
|
|
|
Actually I have 2 images with black background and the object on the images are white. What I am trying to do is to compare them with an XOR. In order to do that I need to have them in a binary form(Black = 0 and White = 1). With The XOR operation the results will be "1" where the pixels do not match (1 XOR 0 = 1).
So now I want to figure out with QT how to have these images in a binary form and to perform XOR afterwards.
Thanks for the reply,
Franckesh
|
|
|
|