|
there is an example in VC6.0 CD.
the example sets CToolBar on a dialog box, it must work on CWnd i think.
includeh10
|
|
|
|
|
Found the example and got it working, thanks
Scott
|
|
|
|
|
Hi all -
I'm looking for a way to automate a process I have right now. At the end of every month I need this to happen on my PC:
Open program
1. Hit enter 3 times (slight pause between each one)
2. Press “F7”
3. Enter password
4. Enter Date (hard Part because dates changes monthly) 07/01/02 next week would be 08/01/02 in this format (example: 07, tab, 02, return)
5. Press “Y” key
6. Press “5”
7. Press “1”
8. Press “enter”
9. Pause for 5min
10. Press “Esc” 3 times
That’s it. I would need this to work with DOS, NT, and 95/98. I normally work with Macs and on a Mac this work take to five min. to do. I’m hoping that’s the case for a PC. Anyways, I'm willing to pay the right person for this if you can send me a quote. I don't want to have to buy software like Quickeys (or I would use that to do it). I was thinking there has to be some kind of built in scripting software on these OS's.
The above process could change a little, but this should give you an idea.
Any help or direction would be great.
Thanks
|
|
|
|
|
I am using the CFontDialog dialogbox to give the user different font options to choose from for their printed reports. They can choose different fonts for headings, dates, text etc. I am passing default values to the font dialog. Problem is that the font appears HUGE in the font dialogbox. I'm am using the MM_LOMETRIC mapping mode for my printer DC. Does this have something to do with things?
|
|
|
|
|
I have a pdf file. I can convert it into a bitmap or ps file or differnet formats.
If it's a bitmap, I can print the bitmap and at the same time print text on top of the bitmap.
The problem is, the bitmap doesn't print that clear.
If I have a pdf or ps file, how can I print that file from a dos command and at the same time send a command to print other text so that it prints text on top of the pdf file.
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
i need to embed a combobox inside a list control (each row of list box includes a combo box).
i hope the combo box has no border.
do u know how to create a combo box with no border?
thx
includeh10
|
|
|
|
|
I created a dialog box which is for user to enter "File Directory" and "Start Vehicle Number". It contains the following:
1, Edit box for "File Directory"
2, Edit box for "Start Vehicle Number"
3, Button for "Done"
If the user hit "Done" when finished, both "File Directory" and "Start Vehicle Number" will be send to the parent window.
The problem is that when I hit "Enter" on the keyboard, "File Directory" will be NULL and "Start vehicle Number" is equal to 0.
Anyone please give me a suggestion on how to link "Enter" to "Done" button. Thank you!
|
|
|
|
|
|
i have suggestion but i need to know u use MFC or win32 first.
includeh10
|
|
|
|
|
I'm offering an interface with ProgID by an ATL service.
If i call CreateObject(ProgID) from an ASP script by Internet Explorer, keeping Ctrl+F5 pressed, the browser shows correct results for some time and "Page cannot be displayed" there after. Then, i can normally obtain a pointer from a VB application.
As it looks, the problem could come from the service - not related to what i wrote there - or from IIS.
Have you ever experienced something like this?
rechi
|
|
|
|
|
Have you ever needed radio buttons grouped together on a dialog? Just a single grouping is easy, but what about 3 or 4 mutually exclusive groups... Ever think you could just select the ones you want to group together and do the 'ole >>properties>> check "group" box and have them grouped together? Hahaha... Sometimes you will actually do something to get a group seperated and working on it's own, but you have no clue what it was that made it work... Maybe it was when you clicked "group" in the properties of the little group box you have around them! That's it, that must be it! Lets try it with the other group box, wow that was simple... (try the logical thing)... DOH! NOOOO!!!!! All this effort to no avail!!! ...
So after an hour or so, you decide to give up and use a combo box instead
Anyway... needed to vent. If you have mastered the art of radio buttons or if I am just plain dumb, lemme know...
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
Easiest thing is:
#1 Place a groupbox in the dialog.
#2 Place the radiobuttons in the groupbox.
#3 Set the "Group" property for the first radiobutton in the group.
None of the others in the group shall have that property set.
I guess #3 was your problem.
Cheers,
Fredrik
<right>Sonork ID: 100.11430:PhatBoy
"Felix qui potuit rerum cognoscere causas."
|
|
|
|
|
To group disjoint sets of radio buttons, do this:- Set the tab order of all controls within your dialog (ensuring that radio buttons within each group are sequentially ordered).
- Check the "Group" property of the first radio button in each group.
- Check the "group" property of the control that follows the last radio button in each group.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
|
last thing is select tab order.
radio button is very easy to be used in any group
includeh10
|
|
|
|
|
How can I eject a CD from the drive ???
Antony B.
|
|
|
|
|
http://codeguru.earthweb.com/misc/cdEject.html
"I'm from the South Bronx, and I don't care what you say: those cows look dangerous." U.S. Secretary of State Colin Powell at George Bush's ranch in Texas
|
|
|
|
|
See this article.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi All,
What's the simplest way to get the current date and time as a string that can be used in a filename? I have an app that spits out a lo every time it is run, and I need to make the filename unique for each run.
Thanks
|
|
|
|
|
CTime CurrentTime;
CurrentTime = CTime::GetCurrentTime();
CString strTime = CurrentTime.Format("%Y-%m-%d %H:%M:%S");
Cheers,
Fredrik
<right>Sonork ID: 100.11430:PhatBoy
"Felix qui potuit rerum cognoscere causas."
|
|
|
|
|
OK, thanks for your quick response. But, this is inside an ATL COM object where I don't have MFC. Do you know off hand what the corresponding Win32 calls are?
Thanks again,
aaron
|
|
|
|
|
I'm using MS VC++ 6.0 with MFC.
I want to load an XML string and analize it. So, i'm using msxml3 like this:
IXMLDOMDocument* xdoc;
HRESULT hr;
hr=CoCreateInstance(CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER,
IID_IXMLDOMDocument, (void**)&xdoc);
if(SUCCEEDED(hr))
{
BSTR xmlstr;
xmlstr=(unsigned short*)"<aaa>aa";
VARIANT_BOOL scc;
xdoc->put_async(FALSE);
xdoc->put_resolveExternals(FALSE);
xdoc->put_validateOnParse(FALSE);
xdoc->loadXML(xmlstr, &scc);
if(!scc) AfxMessageBox("Bad xml string");
else AfxMessageBox(" Xml string loaded");
}
else AfxMessageBox("Can't create object");
Problems: when I run it, I get the "Bad xml string".
Here is the debug window:
.....................................................
Loaded 'C:\Me\Documentatie\XML\new\msxml3.dll', no matching symbolic information found.
First-chance exception in TSTCON32.EXE (KERNEL32.DLL): 0xE0000001: (no name).
First-chance exception in TSTCON32.EXE (KERNEL32.DLL): 0xE0000001: (no name).
First-chance exception in TSTCON32.EXE (KERNEL32.DLL): 0xE0000001: (no name).
First-chance exception in TSTCON32.EXE (KERNEL32.DLL): 0xE0000001: (no name).
First-chance exception in TSTCON32.EXE (KERNEL32.DLL): 0xE0000001: (no name).
First-chance exception in TSTCON32.EXE (KERNEL32.DLL): 0xE0000001: (no name).
The program 'C:\Program Files\Microsoft Visual Studio\Common\Tools\TSTCON32.EXE' has exited with code 0 (0x0).
What's the problem ?
|
|
|
|
|
1. You don't create a BSTR like that.
Firstly, IIRC, BSTRs have the length embedded before the BSTR address (like Pascal strings), so either use ::SysAllocString or one of the BSTR wrappers in VC++ (_bstr_t or CComBSTR (well, that's in ATL, but hey!)).
Secondly, you can't just cast a char string (i.e. "aa") to OLECHAR* - OLECHARs on Win32 are wchar_t (16 bit), not char (8 bit), so you need to convert the ASCII string to a wide character string. There is an API function to do it, but it's more hassle than I can be bothered with , so I just use one of the wrappers, as they have a constructor to do the required conversion:
CComBSTR bs = "aa";
The wrapper also deallocates the BSTR afterwards, which helps.
2. You really want to pass VARIANT_BOOL values rather than BOOL values as boolean parameters - in this case, FALSE == VARIANT_FALSE, but using VARIANT_FALSE gets you in the right mindset.
3. (And this is the major reason it won't work as is!) "aa" is NOT a well-formed XML document (which is what loadXML expects). The following would be OK:
<aa/>
<aa></aa>
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
Hi,
Considering user interfaces for my (mfc) application.
Basically, the app gathers information from the user in a property sheet style, with about 10 pages. Thats pretty much all it'll do.
I was thinking it'd be rather nice to use some kind of html view, so that I could provide HTML source for each of the pages (probably as a string resource), including images in the html to make it look nice (images also from resource). The pages would consist of html forms, and when you filled them out and clicked submit, that would call functions inside of my code.
So all i really want to do is hijack IE's layout engine. I do not want users to be able to use my app as a web browser, and navigate to other places.
Is there a way to do this? i couldn't see a way of loading my own html source dynamically into CHtmlView.
Thanks
Jon
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
Well the simplest way would be to write your html output to a temp folder, and make the CHtmlView open that (remembering to delete the files afterwards)
--
Help me! I'm turning into a grapefruit!
|
|
|
|