|
I am looking for VC++ code on how to drag a rectangle. It must not be Managed C++. But something that will work with VS2003.
I have seen such code somewhere here on CodeProject but multiple searches hasn't revealed anything.
Anybody that can direct me please?
I am the handsome one in the crowd.
|
|
|
|
|
hello everybody,
My name is Srikanth.I am new to the discussion board.I have a problem in My application ie, i cant play ogg files. when i am rewinding or forwarding the file then an error is occuring and the error is "couldnt read from specified memory location" and i tried to find it but my effort was in vain. So I am in very much need of ur help.kindly help me.
srikanthrao
|
|
|
|
|
Hi everyone,
in a big appliaction, we have certainly 50 different Windows.
My application is an MDI-Style. So i need for example 50 CMultiDocTemplates for f.ex. 50 different MDI-Frames.
Is it the right way or is it easier to create dynamically an Frame and there'in creating his View ?
In all examples and books it's explained with Templates but is it also
used in professional-life ?
Thanks a lot
-- modified at 7:23 Monday 22nd January, 2007
|
|
|
|
|
i want a ebook i.e. soft copy of book on ATL COM , so please send me a link or book on my mail is tosachingupta@yahoo.com
|
|
|
|
|
Hello Sachin!
I've e-book of ATL. If u want it, come online at
jubinc@skype.
Come online at:-
jubinc@skype
|
|
|
|
|
hi,
can you mail me the book as well at je_shoaib@hotmail.com
thanks
|
|
|
|
|
Hi ,
I have a embededVC code something like this:
DWORD wc = WaitForMultipleObjects(
sizeof(hObjectList)/sizeof(HANDLE), // number of handles in array
hObjectList, // object-handle array
FALSE, // wait option
(DWORD) INFINITE // time-out interval
);
switch ( wc)
{
case WAIT_OBJECT_0:
break;
case WAIT_OBJECT_0 + 1: //Center button
if (WaitForSingleObject(hCenterState,0)==WAIT_OBJECT_0)
{
/*hCenterState button pushed*/
::SendMessage(hWnd,WM_TRIGGER_PULL,0,0);
}
break;
}
the above code is in a function which is on a thread (obviously) ...(. thread is initiaited on WM_INITDILAOG of the dialog.I pass the dialog handle to the creathread function)
Problem is that the SendMessage function posts a message WM_TRIGGER_PULL only for the first time i open the dialog.If i exit the dialog and then open it again , this time the SendMessage does not post the WM_TRIGGER_PULL message.
i cant get y it cant post the msg the second time.
Any body has solution to this is most welcome with a reply.
thanks in Advance
|
|
|
|
|
Please stop reposting.
Post a question once only, else people will ignore them.
|
|
|
|
|
|
|
And whats your question ?
|
|
|
|
|
|
how to map my database(ms -access)
to my project which is online
thanking u
bye
bye
|
|
|
|
|
Hi
Beginer question (I think;) - how to make my CListView columns (I use a report view) to fill in all available list width? (without adding scrollbar control at the bottom).
When I use m_ListView.GetClientRect() and then set my two columns width to the 1/2 of the returned value, I still get a scroll bar at the bottom...?!? (couple of pixels, but still...)
Is it possible to remove the last column's separator?? I could just shrink last column by 2-4 pixels and remove its ending separator to look nice;) How to do it??
Thanks for any help/comment.
|
|
|
|
|
PatrykDabrowski wrote: Is it possible to remove the last column's separator?? I could just shrink last column by 2-4 pixels and remove its ending separator to look nice;) How to do it??
You can use SetColumnWidth or specify the width when creating columns.
|
|
|
|
|
Yes, I'm already using SetColumnWidth(). My code works like this:
1) Get listView width by calling GetClientRect()
2) Call SerColumnWidth() for each (two in my case) column, setting (1/2*width) and (width-1/2*width)
...and still a scrollbar control appears at the bottom of my ListView control...?!?
|
|
|
|
|
PatrykDabrowski wrote: ...and still a scrollbar control appears at the bottom of my ListView control...?!?
There are some styles that you may like to look into
LVS_NOSCROLL but this disables scrolling.
Maybe you can pull the last column little bit more inside.
|
|
|
|
|
Yes, that's what I'm going to do - reduce last column by 2-4pixels...but that's some kind of a 'hack';) The goal is to create this listview without the scrollbar at the bottom but not by using LVS_NOSCROLL, but by resizing the columns. Of course the scrollbar should appear if I decrease the whole dialog window or change the column width using mouse....
Thanks for help anyway
|
|
|
|
|
Use LVSCW_AUTOSIZE_USEHEADER for the cx param when you set the size of the LAST column.
|
|
|
|
|
Hi
I have a toolbar with its own background (bitmap) on a ReBar object. This ReBas has olso its own background (the same bitmap). And again, the ReBar is on a dialog window with the same background. All three objects use the same background (CBitmap object) and use ON_WM_ERASEBKGND message to paint itself.
The problem is, when I place the manifest file next to the application exe, the toolbar loses its background?!?! The ReBar and dialog window remain untouched, only the toolbar becomes plain (no texture on it). What's more, this 'bug' doesn't depend on Windows themes. When I turn the XP themes on/off the toolbar remains plain...Removing manifest file helps in both cases... but I can't use XP-style controls. Do You have any idea what can be wrong???
If that could help, for toolbar I use:
m_Toolbar.CreateEx(this,WS_CHILD|TBSTYLE_FLAT|WS_VISIBLE|CBRS_TOP|CBRS_SIZE_FIXED|TBSTYLE_CUSTOMERASE);
and for ReBar:
m_ReBar.Create(this);
m_ReBar.AddBar(&m_Toolbar,NULL,NULL,RBBS_USECHEVRON|RBBS_GRIPPERALWAYS));
....
rbbi.fMask = RBBIM_CHILDSIZE | RBBIM_IDEALSIZE | RBBIM_SIZE | RBBIM_ID; //Bar info flags
Thanks in advance!
|
|
|
|
|
Why does an occasional sleep in your thread cause your cpu usage to drop?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
Because it's not doing anything while it's "sleeping".
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
But doesn't a Sleep(0) help too?
to take a situation where a tight loop in a thread hogs all the cpu? Yielding cpu seems to help....
Is that true?
And why?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
Sleep(0) gives up the remainder of the thread's timeslice, allowing another thread to run
immediately so, yes, it helps.
Check out Scheduling Priorities[^]
Mark
|
|
|
|
|
But it doesn't sleep 0 millisecs. It actually sleeps about 25 millisecs (and this value is dependent on your hardware).
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|