|
dear all,
i have an mfc dlg based app which adds an icon in the taskbar, which on dbl clicking shows up a dialog box.
this dialog box is not the main window of my app.
the main window is a frame which is hidden (m_pMainWnd= CFrameObj) and this frame is also associated with the taskbar icon.
the problem is every time i dbl click on the icon, a new dialog box appears but i want only one dialog at a time
how do i go 'bout it?
|
|
|
|
|
|
my dialog is not the main window of application
so this can't work
any other way?
|
|
|
|
|
I use a static variable:
static HWND s_hWnd = 0; //window handle of this dialog
int CMyDialog::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if(s_hWnd) {
::SetForegroundWindow(s_hWnd);
return -1;
}
if(CDialog::OnCreate(lpCreateStruct)==-1)
return -1;
s_hWnd = m_hWnd
return 0;
}
void CMyDialog::OnDestroy()
{
if(s_hWnd==m_hWnd) s_hWnd = 0;
CDialog::OnDestroy();
}
|
|
|
|
|
Hi
i need Some good tutorial on MFC programming.
if u know any site or PDF file for this plz give me it's address.
thanks a lot.
|
|
|
|
|
www.codeproject.com[^]
They even have forums where you can ask specific questions if you get stuck.
msdn.microsoft.com[^] is a good reference, but no-where near as user friendly as www.codeproject.com[^]
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Nice answer!
Chris Richardson
Programmers find all sorts of ingenious ways to screw ourselves over. - Tim Smith
|
|
|
|
|
Check out the MFC tutorials on MSDN[^]. I got a pretty good jump into MFC with the Scribble tutorial, ages ago. Just make sure you're proficient in C++ before starting.
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
Hello
i have to open word,excel and powerpoint files without installing MS OFFICE( i.e no word,excel and power point is present) tell me is it possible?
|
|
|
|
|
I think it is not possible, At least you must have excel, word,.. installed.
|
|
|
|
|
Is it possible that we use word components etc i.e use them wothout installing word etc and then we can ship them with out product to client?
|
|
|
|
|
bazoon wrote:
Is it possible that we use word components etc i.e use them wothout installing word etc and then we can ship them with out product to client?
No. Your client would need to have Office installed on their computer, if you were using Office components in your code. At least that's what the last licence agreement I read for Office Developer said.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
Microsoft used to have Viewer applications for all these file types. Have a look on the office web-site. I know I downloaded a Powerpoint viewer a little while back.
Alternativly, have you looked at http://www.openoffice.org/[^]
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
I want to draw on the ActiveX control in Design Mode i.e
I placed a ActiveX control on the DialogBox, now i want to draw something on the control . How can i do this ?
Any help...
Thank you.
|
|
|
|
|
Hi , win98 doesnt support unicode right?
so how can Wordpad.exe draw unicode chars in win98.
if i would like to do the same how would that be done?
the textout api just draws junk if i pass it a unicode string..
//Roger
|
|
|
|
|
fro win98, you need to use the unicows libraries.
see this :
unicows at MSDN[^]
There's also a newsgroup on microsoft news server on the subject..
Max.
|
|
|
|
|
I wrote a program that one could choose items from a toolbar and put them on the document by clicking left
button of mouse on the view. I considered a CRectTracker variable for each symbol and in the OnDraw function I
draw each symbol's tracker's rectangle.And for selecting each symbol which is shown on the page I check if the
position of left click of mouse is in the tracker of any of the symbols or not.
At the beginning I used CView class but now I want to use CScrollView in order that my program could support scrolling.I changed the base class of my view class to CScrollView and write some lines in its OnInitialUpdate in order to set the size of scrolling.Even I changed coordinates with CDC::DPtoLP function.
Now I scroll my program but when I put an item on the page and scroll the page , in some places that my item doesn't
exist , it seems that its tracker exists .
Thanks
Azadeh
|
|
|
|
|
|
victor,
the problem is that the dialog is not the main window of my application.
so the 2 links u showed me won't work in my case.
any other suggestions
|
|
|
|
|
dear all,
i have an mfc dialog based application and i'm unable to set the correct taborder for the controls on the dialog. i'm from vb background and have no idea about this thing.
can anyone guide me!!!!!!!!!!!!!!!
my app read a text file (info. about some tasks to execute)
and then it starts the tasks at defined time periods.
it stores the info in a CArray object.
how do i restart my app stop execution and reading arrays agian and start execution again!!!!!!!!
i know this looks an awkward ques, but can anyone give me a clue.
thanx
|
|
|
|
|
In the dialog editor, press Ctrl+D to set the tab order. Each control will have a number by it, just click the controls to set their new order. (ie, the first thing you click will be #1, the next thing #2, and so on)
--Mike--
If it doesn't move and it should: WD-40. If it moves and it shouldn't: duct tape.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
thanx a ton!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
hi,
I'm developing ATL ActiveX EXE server that runs as a Window services using ATL wizard.
This server contains one ATL object (CTest).
How I can set the server so that when it started (via Window Services Applet), the server will :
1) initiate/create CTest.
2) Call method/function in this ATL object (CallMe).
3) destroy CTest when server stopped.
Thanx in advance.
Regards.
|
|
|
|
|
dear all,
can anyone tell me how do i package and create a setup for my VC app(mfc dialog based).
Plz. tell me the dependency files for my app.
thanx
|
|
|
|
|
There are numerous installer products, some free some not. InnoSetup, SuperPiMP, InstallShield, etc. You'll have to try them out and see which one you like best.
As for dependencies, run the Dependency Viewer found in the VC6->Tools program group.
--Mike--
If it doesn't move and it should: WD-40. If it moves and it shouldn't: duct tape.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|