|
You must insert a static control of Toolbox and set bitmap property on the property of control and use of SetBitmap() for insert image file to this control.
|
|
|
|
|
Did you try on the WM_PAINT or WM_ERASEBKGND whats result?
|
|
|
|
|
Hi All
I have a property sheet, with 3-4 Poperty pages in it.
Used CTabCtrl Class to make property sheet...
Now I want to add feature that somone could be able to drag n drop a page from the sheet to the outside window.
Please tell me that how to solve this problem..
Thanks & Regards
|
|
|
|
|
Find a library that implements tear-off pages, or tear-off panes and use it. You can also research implementations of tear-off pages/panes, like at: http://www.codeguru.com/cpp/w-d/docking/openfaq/article.php/c7271/[^].
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Hi All
Infact what kind of activity I need is that...
As in Google Talk there is a Buddy List and if click on any of the buddy name then a Chat Dialog is popped up.
Similar kind of work I need in a Tabbed dialog where a dialog contains a CListCtrl and when any item is clicked then a tab (child dialog) is created now what I want is that when click on a list item then a dialog should be popped up and secondly
As told that in my case in the tab control after clicking on the list item a child dialog is created now I want to give the feature that user can drag and drop the child dialog, and the same time both Tab Control and child dialog should be active...
Please reply that how to proceed for this...better if provide some example..
Thanks & Regards
|
|
|
|
|
Similar functionality can be implemented just using non-modal dialogs. When an item is selected you create an instance of your non-modal window. The user will be able to move this window around as necessary.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
I want when I click on a row in a list box all of data in row be bold but only data in first column of row is bold
Agh
|
|
|
|
|
You can do this by using the custome draw( NM_CUSTOMDRAW ) in listcontrol. Search in the CP for custome drawn list controls.
|
|
|
|
|
If you mean full row selection;
DWORD dwExtStyle = m_listCtrl.GetExtendedStyle();
m_listCtrl.SetExtendedStyle(dwExtStyle | LVS_EX_FULLROWSELECT);
--
=====
Arman
|
|
|
|
|
Hi all,
I have a program that does all kinds of graphical stuff. It calls classes from classes, etc. On the deepest level, something may change which requires the mainroutine to redraw the image. Currently, I pass all these classes a pointer to the parent class, and call "m_Parent->SendMessage (XL_REDRAW)". In the main class, I catch this message and perform the necessary drawing actions. However, this causes the program to crash in the release version. Everything goes well in the debug version however.
Please note that the subclasses are no windows in their own right, but are basically just called from the parent class and may in turn again call sub classes themselves.
Anyone any idea why this approach does not work? (and of course most of all: how to solve this)
Thanks in advance
William
|
|
|
|
|
If multi threading is involved then remember that SendMessage halts the caller until the message is processed and it returns. In this scenario PostMessage is your friend.
Either way you'd probably be better off doing an Invalidate or InvalidateRect when the message is sent rather than trying to draw directly. This will cause Windows to send you WM_PAINT messages at its convenience which generally works a lot better. If Debug builds work and Release builds don't then it's usually a timing or memory overrun problem. This one looks more like timing/synchronisation but I couldn't be sure wihtout the code
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
If you are using VS6.0 with MFC, there may be a problem with how your message handlers are written. The version of MFC that ships with 6.0 is very tolerant of mismatched signatures with the message handlers.
For example, when you create an ON_MESSAGE handler, the function used with it is supposed to have a signature of LRESULT func( WPARAM, LPARAM ) , but if you created the function as void func( WPARAM, LPARAM ) , it would/may still compile and run correctly in debug, but would crash quickly in release.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Hi,
I have written my MFC application and I have list of dependency dll's for my application. I have written my application in VS2005. To run my application in test PC wht are the default dependency files required.
can anyone plz help me
Rgds
Trinadh
|
|
|
|
|
run depends.exe to view a list of files on which your application is dependent. From the command prompt you can directly type "depends" to open the dependency walker.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanx for your response.. it has solved my problem
When I am trying to run my application (console) as service it is not starting
and getting error like this :
Could not start the <applname> service on Local Computer
Error 1067: The Process terminated unexpectedly
Can you plz tell me wht is the possibility of getting error.
Rgds
Trinadh
|
|
|
|
|
trinadh_t wrote: Thanx for your response.. it has solved my problem
trinadh_t wrote: and getting error like this :
Could not start the service on Local Computer
Error 1067: The Process terminated unexpectedly
This information is just not enough to get to the root of the problem. Can you provide some more details about your application, what it does, where do you expect the error to be etc etc? Then probably someone here will be able to help you out.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
trinadh_t wrote: When I am trying to run my application (console) as service it is not starting
and getting error like this :
Could not start the service on Local Computer
Error 1067: The Process terminated unexpectedly
Are you actually trying to start it using the Service Control Manager / the Services applet? A plain-old console app is not a windows service. There are requirements for programs that want to be used a service. http://msdn2.microsoft.com/en-us/library/ms685967.aspx[^]
Judy
|
|
|
|
|
trinadh_t wrote: I have list of dependency dll's for my application
How you have obtained it ? If it's using dependency walker, you need , all these dlls present on machine, to run the application.
Prasad
MS MVP - VC++
|
|
|
|
|
trinadh_t wrote: To run my application in test PC wht are the default dependency files required.
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello
I have a custom control which uses GDI+. I have declared a member variable for the custom control. Now, the problem is that GDI+ is supported from Windows XP, and not in Windows 2000. Though GDI+ dll is a redistributable compontent, I dont want to ship it along with our product.
Now, wat I was looking for a solution wherein I first detect the OS on which my Application is running and if its Windows 2000, I dont want to display my custom control which uses GDI+. ie. I was looking as something a conditional variable declaration based on the OS type, because once the variable gets declared it means it wud require GDI+ components and hence my App will not get loaded due the absenceo of GDI+ dll.
Can somebody tell me a why out of this one ??
Thanx.
|
|
|
|
|
Why dont ship the GDI+ stuff? It would be nice for your kings (costumers)
I do such stuff via a global pointer which has 0 as start value.
CMyCtrl *gpCtrl = 0;
if( IsGdiPlus() )
{
gpCtrl = new CMyCtrl;
}
....
if( gpCtrl )
{
gpCtrl->Show();
}
Greetings from Germany
|
|
|
|
|
GetVersionEx() will return the current verion of the OS.
|
|
|
|
|
Try delay loading GDI+ - see here.
|
|
|
|
|
If you want to run on both GDI+ and non-GDI+ systems, you will either have to write two sets of drawing code (one old GDI or DirectDraw, the other GDI+, possibly abstracting the difference into classes), and no longer implicitly link with the GDI+ library. You would have to explicitly look for the GDI+ DLL and if found, load its API from the DLL using GetProcAddress(...) , or use the old GDI code if not, but this is harder than it might first seem due to how GDI+ has a C++ class-like interface.
FWIW, I believe that like others here, including the merge module in your installer for GDI+ is the best idea. It provides the easiest way to get your app to work on the most platforms with the least amount of work. This is no different than requiring an updated ODBC driver or service pack level.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
I have a dialog based project.
The program would crash after just a short moment(no longer than 1 min).
There had an assert at the 895th line of "wincore.cpp":
#ifdebug
CWnd::AssertValid()const
{
...
...
line 892: ASSERT( (p = pMap->LookupPermanent(m_hWnd)) != NULL ||(p = pMap->LookupTemporary(m_hWnd)) ! = NULL);
.......
}
Why?
And how to resolve it?
Thanks.
GOOD LUCK
|
|
|
|