|
http://www.compilers.net/
wWw.KruncherInc.cOm - My cool programs
|
|
|
|
|
Hai,
I have created my own message box (a dialog with its proc). Now the problem is the control is not returning automatically to the original parent window after closing the message box unless I do some action like clicking a button in the parent window.What do I have to do.
Thanks a lot in advance.
|
|
|
|
|
Is the dialog modal or modeless? Did you specify a parent when it was created?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Yeah, I specified the parent. My dialog is modeless dialog.
What should I do? Thanks.
|
|
|
|
|
destory the child window, delete the object, and release the resourse automatically.
|
|
|
|
|
Hi, I have a CDHtmlDialog in a project and I'm trying to add frames to it. I use
<FRAME name="top" src="res:/HTML/#156" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
and when the dialog is displayed the frame only contains "The page cannot be displayed"
Anyone can help?
|
|
|
|
|
Write it like this:
<frame name="top" src="res:%23156" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
Hope that helps.
./regards
Florian
|
|
|
|
|
Hello, I want to have a command line program create a cpl (control panel applet)file of another executable. Does anybody have code that would let me do this? Thank you.
|
|
|
|
|
Remember that a Control Panel applet is just a DLL with a special function called CPlApplet() . When the Windows Control Panel starts up, it looks for .CPL files, and for each one found and loaded, it calls its CPlApplet() function with various messages, such as CPL_INIT and CPL_DBLCLK . Is that enough to get you going?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
yea that helps. I dont really want to use MFC. I dont know if that code was MFC or not. I was wondering if its possible to convert an exe to a cpl file. I want code that converts the exe to a cpl.
-Ryan M.
|
|
|
|
|
Ryan McDermott wrote:
I dont really want to use MFC.
MFC is not required, and would really be overkill anyway.
Ryan McDermott wrote:
I dont know if that code was MFC or not.
Which code?
Ryan McDermott wrote:
I was wondering if its possible to convert an exe to a cpl file. I want code that converts the exe to a cpl.
What do you mean by "converting?" The three requirements are that the applet must be a DLL, it must have a .CPL extension, and it must export a CPlApplet() function. My suggestion would be to create an application that met all three of these requirements. When CPlApplet() was called with a message such as CPL_DBLCLK , you would then use CreateProcess() to start the .EXE. Make sense?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
yes now it does. Thanks I can be dumb sometimes
-Ryan M.
|
|
|
|
|
Ryan McDermott wrote:
I can be dumb sometimes
I doubt it. Lack of experience is not the same as inability to learn.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
We have an application ("A") that pushes another application ("B") to target system and schedules it to be run by the Microsoft scheduler using credentials supplied by the user of "A". Whew! The first thing "B" does when it is fired off by the scheduler is to give the logged in user the ability to cancel the task ("B", that is) by virtue of a popup dialog. The problem is when the logged-in user is different from the user account that the task is scheduled to run as (usually 'administrator') the dialog doesn't appear (under Windows 2003) or parts of the dialog are transparent (under XP). Our task "B" does not who the logged user is.
Basically, the algorithm is:
1) LookupAccountName() with an empty user to get back the SID for the BUILT-IN domain.
2) GetProcessWindowStation()to get this thread's window station. Used later on exit to restore things
3) GetCurrentThreadId() to be used in...
4) GetThreadDesktop() to get this thread's desktop. Used later on exit to restore things
5) OpenWindowStation(L"winsta0", true, MAXIMUM_ALLOWED)to get the 'default' window station.
6) OpenInputDesktop(DF_ALLOWOTHERACCOUNTHOOK, true, MAXIMUM_ALLOWED) to get the desktop that is being used.
7) We make sure that SID that we retrieved from the call to LookupAccountName() is in the ACL for the window station we got from the call to OpenWindowStation().
8) We make sure that SID that we retrieved from the call to LookupAccountName() is in the ACL for the desktop we got from the call to OpenInputDesktop().
9) SetThreadDesktop() with the desktop we go back from OpenInputDesktop().
10) Popup our dialog.
11) Restore everything back to the way is was on the way out.
All the API calls return good values.
This works when the logged-in user is the same as the user that task "B" is scheduled to be run as. It doesn't when they're different.
Am I missing a step? What do I have to do to work with Windows 2003? I know that there was some new security features added. They seem to be hosing me up.
I've tried a hundred different permutations of getting/setting security attributes. None made a real difference.
Spike McFarland
|
|
|
|
|
I just noticed a mistake as soon as I posted:
Between steps 5 and 6 I call SetProcessWindowStation()
with the handle returned by OpenWindowStation().
Spike McFarland
|
|
|
|
|
hai,
If I want to create my own message box in my application instead of using MessageBox(), how do I do that .Do I have to create another dialog with a statictext and change its text each time? Is there any easy way to do it?
Thanks a lot in advance.
|
|
|
|
|
magee81 wrote:
If I want to create my own message box in my application instead of using MessageBox(), how do I do that .Do I have to create another dialog with a statictext and change its text each time?
Yes, that's the general recipe.
magee81 wrote:
Is there any easy way to do it?
That's about as easy as it gets.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
|
Hi, i want to split a line from a text file which i don't know it's length just i know that line has this format:
Welcom:2004-9-5:4 :1:23
but the numbers can be one digit or 2 and that is why i don't know the length. i will just parse line and will read it.
will appreciate any help, specially with few lines of code
really thank you
|
|
|
|
|
One way is with AfxExtractSubString() . Another is with strtok() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
thanks but can you explain more (alittle bit )
really thank you
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_strtok.2c_.wcstok.2c_._mbstok.asp
http://support.microsoft.com/default.aspx?scid=kb;en-us;200421
http://www.codeproject.com/string/split_cstring.asp?df=100&forumid=14815&exp=0&select=442099
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
thank you for information but my problem is that i have the file with more than 100 lines and i have to read and seprate each line with delim.
I can read each line and save it in string ptr but how to check it with a char ",".
really thank you
|
|
|
|
|
Oriocat wrote:
...but my problem is that i have the file with more than 100 lines...
It matters not if you are processing 10 lines or 10,000 lines, both of the functions I suggested can be used. After each line is read, simply call one of the functions the appropriate number of times.
BTW, is this an MFC application?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|