|
Hello comunity,
i need to look for a Users homepath, i need them when the user dont have an admin rights, and need to save programsettings to a ini-file, so i want to look for hims homepath, wich funktion i need for this???
regards
break;
-- modified at 3:18 Wednesday 19th April, 2006
|
|
|
|
|
Use LPVOID GetEnvironmentStrings(void)
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
|
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/getenvironmentstrings.asp
You can find some more help on this site
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
|
|
|
|
|
My MDI application needs the main title of the application in different color
I can not find WM_NCPAINT in MainFrame. So how to go about it.
Leya
|
|
|
|
|
|
I have to programatically simulate toolbar button click for all toolbar buttons present in a window. I cld successfully get the toolbar handle, and controlid of each toolbar button on the window so i use SendMessage with TB_PRESSBUTTON to simulate toolbar button click but button click does not happen and window attached to a toolbar button is not launched?
Currently am using EnumChildWindows() to get handle of the toolbar control attached to the window.
i use SendMessage(hwnd, TB_PRESSBUTTON, ibuttonid, TRUE) with TB_PRESSBUTTON having got the toolbar handle and each toolbar button controlid, to click each toolbar button but button click does not happen and the window attached to the toolbar button does not get launched.
with TB_PRESSBUTTON i see the effect of each button being greyed only but not clicked.
Am i missing something. Pls suggest how do i programatically simulate each toolbar button click to launch the window associated with resp toolbar button?
Waiting for a response.
Thanks.
Sincerely
Giftsana
|
|
|
|
|
Sorry, I was wrong about TB_PRESSBUTTON earlier. I saw the message and thought it was similar to the property sheet/wizard message that actually does simulate a button press.
I don't see anything in MSDN about simulating clicks. If you know the command IDs, you can just send the main window WM_COMMAND messages, which is what the toolbar would do anyway.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Hello Michael
Thanks for the reply.
I got it working using
SendMessage(hWnd,WM_COMMAND,IDC_QUOTE,MAKELPARAM(GetDlgItem(hWnd,IDC_QUOTE),BN_CLICKED));
Thanks again for the suggestion.
Sincerely
Giftsana
Singapore
|
|
|
|
|
Hi freinds,
Why C++ constructor's does not have address ?
above question may be iterative..the answers I have got from internet/subordintaes are very generic like
1) They are special functions implemented by compiler
2) compiler may optimize constructors based on platform achitecture
3) Constructor call special memory routines so can not be exposed with address
4) constructor address is not needed at all, so why bother?
5)Any function which has return types must have address. and constrctor is not having return type and so the address.
I am not convinced by this generic statments. Experts can u please help me to have some precise/practical answers or with examples?
VikramS
-- modified at 2:56 Wednesday 19th April, 2006
|
|
|
|
|
Hi all,
Can we add two dialogs to the same class?
Consider two dialogs A and B of class clz.
now if i make a call as
clz obj;
obj.DoModal();
here which dialog is invoked.
Thank u.
More Relaxed the person high is his status.
|
|
|
|
|
I am not sure if you can -- I personally would avoid trying.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
Hello Peter,
I have such an requirement and should invoke dialog A and B as required.please suggest regarding this.
HEllo
|
|
|
|
|
I would recommend something more straightforward -- like creating 2 additional classes -- one for each special dialog you must show. The primary class contains no dialog, but initiates the additionals...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
First of all you can't add two dialogs at the same time to a class. If you try doing the same the message to change the dialog is popped up
SO there is no question that you can invoke two dialogs at the same time through the same class variable.
How ever you can create two dialogs from a dialog
These dialogs can be modeless or one whatever you decide.
now use
Create function and pass the id of the dialog to create the dialog
Create(IDD_DIALOG1,this);
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
|
|
|
|
|
I just tried we can add two dialogs to the same class.
HEllo
|
|
|
|
|
Can you tell me how you did that because the compiler itself asks you to change the id of the dialog when we try to do the same
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
-- modified at 2:35 Wednesday 19th April, 2006
|
|
|
|
|
Just give different ID to the dialogs.
HEllo
|
|
|
|
|
HI ,
Have you tried to add the same class to the two dialogs using the class wizard.
Try doing this
I am using VisualStudio6.0
Create two dialogs and associate a class to any one
Now try to add the second dialog to the same class
The class wizard prompts to change the resource id of the dialog
SO the second dialog is associated to the class and not the first one.
Please try this and tell me what other steps are you using .
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
|
|
|
|
|
yes harshndu,
we can add two dialsgs in one class. for it just create a dialog based project with About box Option. This class is nothing but adding two dialog box in a same class.
good luck.
thanks,
uday.
uday kiran
|
|
|
|
|
please be more specific in your post
|
|
|
|
|
Please tell me the things i need to elaborate.
HEllo
|
|
|
|
|
Explain what you mean by adding two dialogs to the same class. For me, that means this:
class CYourClass
{
CDlgA DlgA;
CDlgB DlgB;
}
Where CDlgA and CDlgB are classes inherited from CDialog. So, I added an instance of each class to the CYourClass class.
|
|
|
|
|
Cedric
I think he wan't to create another files for dialog2 because
I think that codes in Dialog1 and Dialog2 are same maybe a little different
|
|
|
|
|
yes harshndu,
we can add two dialsgs in one class. for it just create a dialog based project with About box Option. This class is nothing but adding two dialog box in a same class.
good luck.
thanks,
uday.
uday kiran
|
|
|
|