|
Hi,
I have a thread that needs to update a dialog.
When I use UpdateData(false) from the thread I will get an exception.
Any idea why ?
Thanks,
Shay
|
|
|
|
|
Ideas Why:
1) Not a UI Thread
2) Not the thread that owns the dialog
Possible Solutions:
1) shared memvar, updated by the thread and monitored by the dialog.
2) PostThreadMessage()
|
|
|
|
|
What kind of thread is it? If it is a worker thread, one solution is messages. Send a message to main frame and have it update the control.
Kuphryn
|
|
|
|
|
hello
i have add a DIALOGBAR and i have add in SLIDER. i want to attach one variable to this
SLIDER but when i go to the ClassWizard and i choice classename:CMainFrame i can't find
the the obectID IDC_SLIDER1 but i find it in the Classname :CAboutDlg.and i want to use
it in the calss CMainFrame.
and when i click on MessageMaps and choice class CMaiframe i can't add any variable??
|
|
|
|
|
Hi,
I'm not sure of what you trying to explain here. You use somebody else app? If it's an app that you have created with the wizard then the first "dialogbar" that is created is not a "dialogbar" but it is a toolbar. You have the choice not to use it into your app in the MFC wizard.
Everything's beautiful if you look at it long enough...
|
|
|
|
|
I have been given a VC++ 6 dll which has no documentation and no code. I need to find out what functions are available in this dll. Does anyone know of a utility somewhere that can show you the public functions of a dll?
Something similar to Lutz Roeder's .NET Reflector[^], but for a VC++ 6 dll.
Thanks,
Mark Sanders
|
|
|
|
|
|
or the Dependency Walker tool that comes with VC 6
|
|
|
|
|
How would I force an Edit box or MSFlexgrid Cell/ Cells to be in currency format in VC ++ ?
|
|
|
|
|
A formatted edit control is something you'd have to create, or use one of the many available here at CP.
|
|
|
|
|
Hi,
I am trying to create a program that will prevent a user from closing an external application (i.e. Word).
I am not sure what approach I can take as I have little control over this app.
Trying to hook and trap messages seems like a good idea but not all apps use WM_CLOSE and by the time they receive WM_DESTROY it is too late.
If anyone has seen this done or have any idea of how it can be done please let me know.
|
|
|
|
|
Hi,
Can anybody help me with my problem?
How to load RTF file with pictures in CRichEditCtrl?
I know how to insert picture (BMP) file in my CRichEditCtrl.
I also know how to save the contents of the CRichEditCtrl as RTF file.
I need to load a RTF file with pictures (BMP) in it, in my CRicheEdit control,
but I don't know how to do that.
Can you help me?
Thanks!
Yasen
|
|
|
|
|
I have a dialog in which i create buttons dynamically, i have derived my own class called CBokningsButton from CButton... here's the problem, i get an assertion error when i try to do: m_tooltip.AddTool(GetDlgItem(9001 ,"hey"));
the assertion error is: ASSERT(::IsWindow(m_hWnd));
the wierd part (or the part I find wierd) is that i can do this if i double create the buttons. it hard for me to explain exactly how i mean but ill try:
When i run the prog it creates some buttons then if the user change some stuff it deletes the buttons and create new ones. each button represents a different time in a day, depending on which day the users select the buttons can have a different layout depending in the information i get from a mysql database.
So before i create buttons i delete the old ones like this:
CBokningsButton* ptrButton;
for(int t=0;t<200;t++)
{
if( (ptrButton = (CBokningsButton*)GetDlgItem(9001+t)) != NULL)
{
// button exists
ptrButton->DestroyWindow();
}
}
now i know this i like the worst solution ever to delete buttons but never mind that now, the thing is that if i replace the DestroyWindow() line with my AddTool line i get the tooltips to work the second time i create the buttons (rember that now the old ones hasnt been deleted so the new are just printed on top of the old ones).
If i try to do the AddTool any place else in the program i get the assertion error...
i thought it to be most logical to do AddTool at the same time i create the button but that gives me the same error
does anyone know what im talking about and if so can you help me?
thanx
/Eric
|
|
|
|
|
Hai everybody..
I want to make the FlexGrid cell as EditBox...I have wtitten the code for this but when move out of that cell after editing cell is not getting its border back...can anybody help me???
ThomasKennedyBose
|
|
|
|
|
How are you doing this because I have played with this option just for fun so I could be able to help.
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
I have Dockable Window...Iam placing FlexControl over it...when the user clicks on it(on a perticular cell),..it should be able to act as a EditControl and when the user leaves the cell or enters into next cell previous cell sholud be filled with the text and all the border lines should appear...I have created a Edit control and placing over the cell where the user will click..getting the string from it placing the on same cell(its border lines are not appearing properly)when the user leaves or enters the next cell.
I couldn't find much documentation on this FlexGrid any where...can u please help me !thanks in advance.
ThomasKennedyBose
|
|
|
|
|
Actually when I asked you I meant to see some source code because I can't really guess, but from your description my initial guess is that the Redraw property might not be set to true. If you don't know what that is go to the RC editor, right click on the grid and select PROPERTIES and there the tab ALL. Scroll down and find Redraw and make sure that is set to TRUE.
If that doesn't help, then show me some source code (please only the relevant parts) like when you enter the cell, how do you create the edit controll, and what do you do when you leave the cell.
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
I am using ShellExecuteEx to open files (any type), but need a reliable process handle returned - I am finding that if the file is already open, then the handle returned is NULL, which isn't a lot of help.
Any suggestions?
Thanks in advanced.
|
|
|
|
|
If the file is already openned, does the process that ShellExecuteEx() spawned open the file at all? In other words, what does the spawned process do? If ShellExecuteEx() returns a NULL, then I suspect that the spawned process is terminated.
Kuphryn
|
|
|
|
|
Hello, I have a question for you. I have an application wrote in Visual C++ .NET and I have a Sql-Server 2000 database. How can I read and write records in sql-server db with MFC classes of Visual C++ ? I didn't find any class that allow this. I can't use ODBC. Does exist some classes that allow to use SQL Statement to perform operations ? Can I "bind" my variable ? Does exist, at least, a class like CDaoRecordSet ?
Thank you very much for any answer.
Andrea
|
|
|
|
|
CDaoWorkspace
CDaoDatabase
CDaoRecordset
...
|
|
|
|
|
Why not use ODBC? It is fairly simple to develop a thin, wrapper class around it and completely shield your app from the ODBC API. Been doing this for years and works great (actually, just as fast as the native driver implementation and supports the new varchar(256+) ).
|
|
|
|
|
Hello Everyone
I am looking for a way to make transparent icons for a VC++ application. These icons will be used in a CTreeCtrl object so as the empty space of the icon gets the background colour of the frame.
Any help or suggestions is highly appreciated.
Thanks
Ankush
|
|
|
|
|
Hi,
When using icons into resource editor, look for the "transparent color" into the palette.
Everything's beautiful if you look at it long enough...
|
|
|
|
|
Hi
I cannot seem to find the option of "transparent color" in the palette. Can you please give more details.
Thanks
|
|
|
|