|
Hi,
You have a MainFrame than, there-in you have a Client-Area. In this Client-Area you put a ( or more than one, in MDI ) CChildWnd derived Class ( a derived CMDIChildWnd-derived for MDI ).
In this Frame you put a View. You can arrange all controls by programmation. But you can also create
a Dialog in the Ressouce-Manager and create a class from it, there you choose CFormView.
Then you accord the View with the Frame and ready ...
I also don't use Doc's. I also don't use DocTemplates. I create each Child dynamicaly.
Greetings
|
|
|
|
|
Are you saying that I can create several CFormView's with different layout, then choose one of them on runtime?
|
|
|
|
|
I have create a Universal-Frame, which can be loaded with a specific View.
I self i switch different Views in i subcontrol ( a Tab-Control )
UniChild *NewChild = new UniChild("Customers"); // thats the call to open the child
in the constructor i test the String an if it's f.ex. "Customers" i create the view like this :
CCreateContext CC;
CC.m_pCurrentFrame = this;
CC->m_pNewViewClass = RUNTIME_CLASS ( FKundensucheView );
Act_View = DYNAMIC_DOWNCAST( CWnd, this->CreateView(&CC) );
But you can look here :
http://www.codeproject.com/docview/MultiView.asp
I use this method, it works and till now i don't have trouble
|
|
|
|
|
Hi all,
I have a requirement of logging an error event from win32 application. This log message should be visible from Event Logger from control panel -> admin tools. I found one api LogEvent(...) but i don't know how to get first argument (handle for resource id).
Kindly do any help on this
-----
pavan
|
|
|
|
|
|
http://www.codeproject.com/system/xeventlog.asp
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
To log the event, u can u RegisterEventSource()/OpenEventLog() and ReportEvent() .
Come online at:-
jubinc@skype
|
|
|
|
|
|
In my application i need to show user some html pages for that i need to open the default internet browser. Pls could someone tell how to open internet browser.
-Vikram.
|
|
|
|
|
|
Locate the htmlfile subkey under HKCR in the registry. Then open HKCR\htmlfile\shell\open\command using APIs.
--Default string of command contains the default internet browsers.
Come online at:-
jubinc@skype
|
|
|
|
|
vikram Verma wrote: i need to open the default internet browser. Pls could someone tell how to open internet browser.
if defualt is FireFox.. what would will your app do...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
this code opens up mozzilla (if its the default browser)..
ShellExecute(NULL, "open", "iexplore.exe",
"http://www.microsoft.com", NULL,
SW_SHOWNORMAL);
|
|
|
|
|
Hi All,
I have a requirement for a program (service) to start as early as poosible during boot. I was looking for some references on "driver service" as mentioned in Services[^] and boot time services (start type of SERVICE_SYSTEM_START or SERVICE_BOOT_START.
In the case of SERVICE_BOOT_START, it appears a driver is required since it is started by IoInitSystem.
Should I be deeper in the DDK at this point? I found a very nice article by Tim Deveaux[^].
Jeff
|
|
|
|
|
Exactly. SERVICE_BOOT_START is for Device Drivers. Instead, u should use SERVICE_SYSTEM_START. It gets started before logon.
Come online at:-
jubinc@skype
|
|
|
|
|
Hi Don,
Last question then - does SERVICE_SYSTEM_START conform to userland Service requirements?
Jeff
|
|
|
|
|
Looking at various Boot Services (for example, installed by Norton AntiVirus) using dumpbin, the answer is No.
|
|
|
|
|
Does anyone know Add/Remove programs interacts with the .Inf Files(which seem to follow a syntax similar to the Old .Ini Files)
I feel that these files speak an 'instalation language', interpreted by AddRemove Programs,Hardware Wizzards, Etc.
Does anyone know how this works, or, where to find out how it works.
regards
LateNightsInNewry
|
|
|
|
|
I am writing a program where two different times in a day are giving and the program will solve how many hour and how many minutes.
For example:
input start time
input end time
output duration
or
input 5:30
input 6:40
output 1 hour 10 minutes
can anybody help me?
|
|
|
|
|
What have you written so far ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Compare the hour value and use the bigger hour minus the smaller hour, let this be h. If both are the same hour, just subtract the minutes. Next, use the minutes from the "bigger" hour to minus the minutes from the "smaller" hour, let this be m. If the m is negative, subtract 1 from the h, and add 60 to m.
|
|
|
|
|
I am trying to program a Network Monitoring software using the C++ language for MS Windows and having trouble with monitoring the network activity in live. I want to display a messege box everytime a program is starting to listen for connection or starting to connect to another server. And also want to find out the IPs and ports (Local and Remote) involved in this activities. The think is a user should be able to allow or block the activity (just like the Norton and PC-Cillin do). 'IMPORTANT THINK IS I DO NOT WANT TO USE MFC AT ALL'
Thanks.
It's me
|
|
|
|
|
Hi,
I would really appriciate som help with a difficult task regarding WMI and C++.
I would like to call the Method GetOwner() from the Win32_Process Class after query on a process.
This is the equavilent Visual Basic code:
Public Function getownerwmi(ByVal pid As Long, ByRef wmiowner As String) As Long<br />
Dim colProcessList<br />
Dim objprocess<br />
Set colProcessList = GetObject("Winmgmts:").ExecQuery("Select * from Win32_Process where processid = " & pid)<br />
If IsObject(colProcessList) Then<br />
For Each objprocess In colProcessList<br />
<br />
ret = objprocess.getowner(struser, strdomain)<br />
wmiowner = struser<br />
getownerwmi = 1<br />
Next<br />
End If<br />
Set colProcessList = Nothing<br />
Set objprocess = Nothing<br />
End Function
I have looked throught these articles but I cant figure out where to call the GetOwner method:
MS Article:
http://msdn2.microsoft.com/en-us/library/aa384833.aspx[^]
MS Article 2:
http://msdn2.microsoft.com/en-us/library/aa390421.aspx[^]
Article on Code project:
http://www.codeproject.com/system/UsingWMI.asp?df=100&forumid=185770&exp=0&select=1509450#xx1509450xx[^]
Any help would be really appriciated!
|
|
|
|
|
|
Hi,
Yes i Looked at that article but it only describe how to get the information using a query, I cant figure out how to run a method liked the "getowner" method on my VB example.
If anyone have done this or know how, please post a short example.
|
|
|
|