|
My point was for clarity, not efficiency.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
|
It must have worked okay, cause all the spaces are gone.
Chris Meech
I am Canadian. [heard in a local bar]
Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
Looks like MS isn't going to update this anymore. What are the other available options?
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
This may help [^]
onwards and upwards...
|
|
|
|
|
if i add a string to combobox, like
m_combo.AddString("text");
its throwing "Assertion Failed" error.. y?
regards,
Rookie
|
|
|
|
|
Where are you adding this row? If it's in a dialog it has to be not before OnInitDialog.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
I mainly use mc++ but can use standard c++ if needed. I am simply trying to get a consol to open and then open the cmd.exe process withing the consol window. I can only seem to open the consols in separate windows. I just need to send a string to the cmd.exe and have it execute the string and the prompt. Any suggestions? I have done multipal searches but they havent really helped. Thanks in advance.
|
|
|
|
|
Lagwagon56 wrote:
I just need to send a string to the cmd.exe and have it execute the string and the prompt.
What are you trying to do at the command prompt? Perhaps there is a better way.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
You could do like this:
1. Create a console which you attach to the process using AttachConsole[^]
2. Run the commandline by passing it to CreateProcess[^] and give it your stdout handle which you can obtain from the GetStdHandle(STD_OUTPUT_HANDLE) function.
That should execute the commandline and output its output to the console window you created... But it wont give you a promt!
I hope I've given you some ideas...
"There is an empty room full of people who think you are creative"
|
|
|
|
|
Thanks for the suggestion. I'll give it a go. Looks like it will work well. Thanks. A friend of mine wants to play an old dos game that he just found in an old pile of software. It will not run correctly under XP. I located a file that fixes it but it needs to be loaded via cmd prompt and then the game must be launched via cmd prompt. It's easy to do manualy i just wanted to make a single exe that he could click and launch everything needed to run the game.
|
|
|
|
|
Ehm,...
Have you tried using a .bat file?
Or a regular shortcut?
"There is an empty room full of people who think you are creative"
|
|
|
|
|
Regular shortcut does not seem to work. Didn't try at .bat file. I am unfamiliar with .bat. Could you point me to a good resource? Thnaks
|
|
|
|
|
It's just a file which contains a number of commandlines that will be exeuted...
Try writing in notepad e.g.:
dir
pause
and save it to a file ending with .bat...
"There is an empty room full of people who think you are creative"
|
|
|
|
|
.bat did the trick, Thanks!
|
|
|
|
|
Hi,
I have created one class for thread and another class for HTTP client request and response both GET and POST methods. I have created 5 objects for thread and made the 5 client request for different web sites and I want to update response to text boxes or variables. I used SDK APIs (CreateThread). How do update the worker thread result to User interface controls.
Which is the best methods for multithreading mutiple client request?
Quote your thoughts...
Regards,
inba.
|
|
|
|
|
I usually accumulate the data in a data container class that has synchronization object protection. The worker thread writes data to the data ccumulator and then posts a message to the UI object when new data arrives. The UI object can retrieve the data from the data container class.
It is a best practice, to me, not to directly couple the UI object to the worker thread's activities - in other words, when data is ready, don't have the worker thread attempt to directly update the UI object.
You data accumulator can be a list or queue or stack or whatever makes sense for you to choose, and protect access to its data and operations with a critical section.
|
|
|
|
|
Hi there.
I want to create a dialog, with a menu ( file, help, edit etc.), and with tabs on the dialog. Basically like the display properties dialog that you get when you right click on your windows desktop, just with a menu added. Also, I want to add dialogs as the tabs, dialogs that I created separately.
Now if I use a CPropertySheet class, this allows me to add and display the dialogs, right? But how do I get a menu on the main dialog. And what if I want to add a button and a combobox on the main dialog, not on one of the tabs, but on the part of the main dialog that is not tabs.
Thanks for the help!!
|
|
|
|
|
Mmm this is a difficult one...
|
|
|
|
|
The book The MFC Answer Book by Eugene Kain has simple instructions for adding a property sheet to a dialog (and then the dialog could hold other controls that are outside of the property sheet, one of your other points). The book VC++ MFC Extensions by Example by John Swanke has simple instructions for putting a menu in a dialog. I have found both of these books, as well as Swanke's Visual C++ MFC Programming by Example extremely helpful over the years. They contain many, many practical helpful things that you wish you knew how to do, on a wide variety of MFC subjects.
I'm sure that you could find instructions on the internet for these also with a little searching
|
|
|
|
|
i'm trying to get a IHTMLWindow2 object to use it's Scroll method. It's realy weird but it doesn't work. Here is the code i used.
m_pWebBrowser is IWebBrowser2* and has been corectly initialized...as in i can use it to control the IE window (Navigate...parse the source...).
[CODE]
HRESULT hr;
IDispatch* pHtmlDocDispatch = NULL;
IHTMLDocument2 * pHtmlDoc = NULL;
IHTMLWindow2 * p = NULL;
hr = m_pWebBrowser->get_Document (&pHtmlDocDispatch);
if (SUCCEEDED (hr) && (pHtmlDocDispatch != NULL))
{
hr = pHtmlDocDispatch->QueryInterface (IID_IHTMLDocument2, (LPVOID *) &pHtmlDoc);
if (SUCCEEDED (hr) && (pHtmlDoc != NULL))
{
pHtmlDoc->get_parentWindow(&p);
// this is were i get the error. p remains null
if(SUCCEEDED(hr) && p)
p->scrollTo(x,y);
}
}
[/CODE]
I realy hope some1 can help or at least give me an alternative way to scroll the IE window..other then sending keys.
|
|
|
|
|
|
// MessageId: E_NOINTERFACE
//
// MessageText:
//
// No such interface supported
//
#define E_NOINTERFACE _HRESULT_TYPEDEF_(0x80004002L)
thats the HRESULT returned. Any idee what it means?
|
|
|
|
|
Does anyone have any idea how I can load the images in a CImageList dynamically as the user scroll the list?
I need to do this becuase if the list contains many images (e.g privewing thumbnails of a dircetory with a lot of pictures in it) It consumes a lot of memory.
An example for such image thumbnail previewing can be found at:
http://www.codeproject.com/vcpp/gdiplus/GdiPThumbnailsViewer.asp[^]
|
|
|
|
|
IN MFC...
Plz guide me how can i apply a bmp on Tab control on all tabs including the upper tab label. Current application has bitmapped dialog box which is used in each tab but the label of tabs should also be bitmapped.
|
|
|
|