|
I am developing an application which has a Scrollview - derived Control. Using the normal drawing functions i´m drawing into this DC. With the API ::SetWorldTransform i´m zooming in and out.
Works perfectly until now.. the only problem i have got is that i would like to center the whole shista when i´m zoomin in and out.
I´ve tried a couple formulas.. and didn´t get it going to set the scrollbars correctly.. so that i can zoom in and out and stay in the middle of the document. (the scrollbars get smaller if i´m zoomin...)
Another problem is that i would like to center the pic in the view (when the zoom - factor is so small, that i don´t need the scrollbars.
I hope at least some of you could understand my question... and i hope someone could help me out.
thanx in advance
the visual c student
|
|
|
|
|
Another problem is that i would like to center the pic in the view (when the zoom - factor is so small, that i don´t need the scrollbars.
CScrollView has an undocumented protected data member m_bCenter that does exactly that.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
We are using NT and dialogic board. I am interested in getting the callerid using TAPI. Could you explain it?
We have the caller id enabled in the exchange and also with our telephone. We could get the caller id using a sample dialogic program ( the dialogic program uses dialogic api's whereas we are looking for a TAPI based solution). Now if you could explain it, it would be great.
Thanks
P.V.V.
|
|
|
|
|
Firstly do you have a TAPI Service provider for the dialogic board? If not then you won't get very far.
Basic overview
-----------------
Initialise TAPI with lineInitalizeEx
Open the device with lineOpen
When you receive the LINE_CALLINFO message make a call to lineGetCallInfo.
The CallerID is in the LINECALLINFO structure.
sCallerID = (LPSTR)((DWORD)m_lpCallInfo+
(DWORD)m_lpCallInfo->dwCallerIDOffset);
http://www.julmar.com/samples.htm has some source code that might help.
|
|
|
|
|
Hi ,
I've Created an application that puts up an icon in the system tray. If I close that application by sending WM_CLOSE or WM_QUIT messages from another application the tray icon disappears normally ,but if i use terminate process from another application the tray icon remains until I move the Mouse Pointer above the Icon after which it disappears Is there anyway to refresh the system tray ??? Please help out
|
|
|
|
|
As MS would say, that behavior is by design. The tray icons don't do anything until you move the mouse over them.
--Mike--
http://home.inreach.com/mdunn/
Sometimes, arming yourself with a big pointy stake just won't do you any good.
|
|
|
|
|
Duh! How in the world do you get a COleCurrency object to look like money with 2 decimal places (in an edit box, for example)? I feel really stupid having to ask this one. Please be gentle!
Richard
|
|
|
|
|
|
I have created a docking window. And, in the docking window created a listctrl.
I can add items to the list control from within the Create function in my docking window class. No problems there.
However, when I try to add an item to my list control from a menu command within my MainFrame class it fails in IsWindow(m_hWnd).
How can I get a valid pointer to my list control so that I can add items to it without failing because of an invalid window handle?
Thanks,
Frank
|
|
|
|
|
I've set up a bitmapped background for my Win32 (no MFC) dialog based app.
The dialog handles WM_CTLCOLORSTATIC by
- SetBkMode (hdc, TRANSPARENT);
- return GetStockObject (NULL_BRUSH);
This -does- let the background show thru like I want.;)
BUT, when I update the static controls' text,
the old foreground is left and the new foreground text
is stamped on top of it makin a MESS.
Someone else MUST have run across this, right?
Could ya help me out? Thanks!
...SteveH http://hazels.freeservers.com
|
|
|
|
|
|
Rats. Didn't work after all...
I'm doin this:
::SendMessage (statctl, WM_SETTEXT, (WPARAM) 0, (LPARAM) txt);
::InvalidateRect (statctl, NULL, TRUE);
I would think that SendMessage would already invalidate the
whole control...?
Either the background ain't gettin erased by the dialog's
WM_ERASEBKGND
or the control is getting it's draw messages messed up
or somethin???
One last thing - should I be invalidating the whole dialog when
I need to change the static's text?
Thanks for the help tho!
I could send you my src if that'll help...
...SteveH http://hazels.freeservers.com
|
|
|
|
|
Did you try to call UpdateWindow(statctl); after that??
Mh2!
|
|
|
|
|
Here’s my scenario: I have an application that can save/load project files. I want to be able to register the icon and file extension (*.kkp) with the system so that you can open them directly from within Explorer, and have my app load, but not try to load the project as a document. Instead, I need to be able to detect the file is a project file and then handle it myself.
I know this is possible – I even managed to do it in a previous app I was working on, but now I can’t remember how to do it. Can anybody help?
Yours,
Peter
P.S. Sorry for posting this again, but it got buried under a whole load of other questions as soon as In asked it!
|
|
|
|
|
All Explorer does is run your app with the filename as a command line parameter (or whatever you set in the ...\shell\open\command key). How you handle things once you get the filename is up to you. There's nothing requiring you to handle the file as a document.
--Mike--
http://home.inreach.com/mdunn/
Sometimes, arming yourself with a big pointy stake just won't do you any good.
|
|
|
|
|
I have editBox (read only) with spin.
the variable of the editBox is int in range 10 - 2000
and the range of the spin is same.
and all is right.
But when the user try to up the number in the editBox over 999
he gets a error messageBox: "Please enter an integer."
WHY ?????????????????????????????????????????????????
_____________________________________________________________
I ask you about it already and Michael Dann answer me so:
Uncheck the No Thousands property of the spin control - this prevents the control from adding a thousands separator (period or comma) to the number.
_____________________________________________________________
But I did not understand this answer.
Please HELP
|
|
|
|
|
I guess it must be trying to put 1,000. "," is not an integer. What Michael Dunn is suggesting is to uncheck that option.
|
|
|
|
|
I have a button on a dialog bar, what needs to be done to activate it so it can be clicked?
This is the first time creating a GUI in C++. I have my dialog bar, and want to be able to create message handlers, and edit text in the text boxes, check items....etc in my controls in the dialog bar. Do I need link my dialog bar to a class who's base class is CDialog and access the controls through there....or how else do I got about it?
I was unable to set/clear check buttons either....
|
|
|
|
|
Hi,
this is my first post.. i am new to Visual C++..
i want to write a html copiler like html2exe..
how do i proceed?? can some one give me some resources as to wehre to start from..
i have got some info.. about self extractor..will this help in some way..
please help!!.
Subhro
|
|
|
|
|
Would you please clearify what it is you would like to do? I don't understand what you mean by an HTML compiler.
|
|
|
|
|
html2exe is a way to make e-books for offline purposes..
i select a list of html files along with the jpg, gifs etc. and the program gives and .exe file, which when clicked shows the files in it browser..
u can download a trial version from the link below.. i dont want it so complex...
http://www.html2exe.com/
subhro
|
|
|
|
|
IE 5 already has this built-in. You can save a web page as an .MHT file, which contains everything on the page. If you need to do this programatically, look into the IE automation interface docs, and see if saving to .MHT via automation is supported.
--Mike--
http://home.inreach.com/mdunn/
Sometimes, arming yourself with a big pointy stake just won't do you any good.
|
|
|
|
|
now this is all greek to me.. Michael..
can u be more clear please????
this is the functionality that i am looking for..
1) I run myEBookMaker.
2) It prompts me to select the files/directories that i want to include in my application. I assume there is a file called index.html.
3) After selection i press compile..
4) It prompts me for a file name of my ebook. i enter it.. eg: ebook1
5) A file named ebook.exe is dunped on the disk.
6) When i click on ebook.exe, a window opens which displays index.html, just like in an IE browser.
i hope now i am a little more clear..
thanx for your earlier response.. but i couldnt find anything after searching the M$ site.. on IE automation interface..
please help .. !!!
Subhro
|
|
|
|
|
Hi,
I would like to know how can I do for transfert a data from a editbox in a TAB PAGE (CTabCtrl) to a dialogbox.
I make this but nothing:
TabPage1 :
EditBox : CString m_edit1;
DialogBox (where the CTabCtrl is) :
EditBox : CString m_edit2;
Button : "handler" CLICK : UpdateData(TRUE);
I create a member variable for the TABPAGE1 :
CTabPage1 m_TabPage1;
Now I can in the DialogBox receive normaly the data from the m_edit1 with this:
m_edit2 = m_TabPage1.m_edit1;
UpdateData(FALSE);
But nothing.
And I make with the pointer to the Class from TabPage1:
CTabPage1 *m_TabPage1;
for TabPage1
and for the DialogBox :
m_edit2 = m_tabPage1->m_edit1;
UpdateData(FALSE);
But nothing.
Please help me for this.
youssef
|
|
|
|
|
CYourDialog dlg; //(CYourDialog is the class where the CTabCtrl is)
CEdit* pEditdlg = (CEDit*)dlg.GetDialogItem(IDC_EDIT); //Is the Control Id in the tabcontrol
CString str = _T("");
dlg.GetWindowText(str); //Ready
Cheers!!!
Carlos Antollini.
|
|
|
|