I've never tried anything like this, but my first attempt would be to set some sort of filter (i.e., WHERE clause), like:
SELECT * FROM table WHERE 1 <= rownum AND rownum <= 100 // thread 1
SELECT * FROM table WHERE 101 <= rownum AND rownum <= 200 // thread 2
SELECT * FROM table WHERE 201 <= rownum AND rownum <= 300 // thread 3
Does that sound plausible?
"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
"Man who follows car will be exhausted." - Confucius
I have a CFormView where I want to display an image and show some buttons over the image. I get the device context for the view, create a compatible bitmap, use the LPPICTURE Render(*) function to display the image file into the DC, then use BitBlt(*) of CDC to display the image. The buttons are placed onto the form. This kind of works, although if I display another window over the form, or move the cursor into the title bar or the system status bar, all the buttons disappear. I would like to place the buttons dynamically, and tried to use SetWindowPos(*) for one of the buttons. But when I called SetWindowPos(*) for that button, everything (image and other buttons) disappeared. Is there a proper way to display buttons over an image so they don't disappear, and also to do so dynamically?
There are four questions :
- where do you draw (what function of the view) ?
- where do you create the buttons ?
- how do you create the buttons ?
- what can you see at the places of the "hidden" buttons ?
I call the functions to draw in the OnDraw(CDC* pDC) function of the CFormView
The buttons are put on the form with the resource editor, then I assigned names with class wizard.
The image is displayed correctly so it looks like the image is overwriting the buttons.
Interestingly, when the cursor is moved to the title bar, the OnDraw gets called, and the buttons disappear. I put in code to detect when the cursor is in the title bar and call Invalidate() in the form to cause OnDraw to be called again, then the buttons are displayed.
Oops, I was a little hasty. I also show static text below the button. I call OnCtlColor(*) and set the hbr (HBRUSH) returned to a hollow brush. The text is then displayed over the image. After setting WS_CLIPCHILDREN, the text background is no longer transparent but light gray.
Hello, I have been working on an MFC project that looks like a registry editor which have a treeview on the left side and listview on the right side. Once the user sets focus on one item in the listview and clicks ctrl+c, how do we add a functionality to copy the listview item text into the clipboard? please help.
There is a volume in my hard drive that currently does not has any drive letter. I need to assign a drive letter to this volume. Please suggest me some way to do so.
If a volume has any drive letter already then I can change it's drive letter by getting it's GUID and assign any other drive letter easily. But if the volume does not has any drive letter then how can I get its GUID to assign a drive letter.
If there is any other way to do this please suggest me.
Thanks & Regards
Last Visit: 31-Dec-99 18:00 Last Update: 1-Aug-21 8:24