|
So, the answer is "it depends" right? I am wondering whether there are any related resources (tutorials, ...) that I can make a reference about this topic. Any recommendations?
regards,
George
|
|
|
|
|
Hi
I have a property sheet with tabbed property pages
When the property sheet is opened up, depending on some user settings some pages
are not displayed
When the property sheet is created, i add all the pages
the in OnInitDaig, i remove the pages i dont need with
RemovePage(&m_Page1);
this works fine, if i only open the sheet up once
If i try to open again, i get an expection error on RemovePage line
anyone any ideas
thanks
si
|
|
|
|
|
si_69 wrote: If i try to open again, i get an expection error on RemovePage line
this is because you trying to remove the page which doesn't exist at all!
"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
|
|
|
|
|
How load a bitmap from bmp file at run time
|
|
|
|
|
::LoadBitmap and optional CBitmap::FromHandle can help.
|
|
|
|
|
Viorel. wrote: ::LoadBitmap and optional CBitmap::FromHandle can help.
you can't load Image from File using these function!
"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
|
|
|
|
|
You are right. The image can be loaded from separate file using ::LoadImage function with LR_LOADFROMFILE flag, as was answered by sujtha.
|
|
|
|
|
but LoadBitmap(bitmap resource);not file
whitesky
|
|
|
|
|
You are right. The image can be loaded from separate file using ::LoadImage function with LR_LOADFROMFILE flag, as was answered by sujtha.
|
|
|
|
|
Viorel. wrote: You are right. The image can be loaded from separate file using ::LoadImage function with LR_LOADFROMFILE flag, as was answered by sujtha.
Isn't i answered before Ms Sujtha ?
"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
|
|
|
|
|
ThatsAlok wrote: Isn't i answered before Ms Sujtha ?
Yes, I missed your message, sorry.
|
|
|
|
|
WhiteSky wrote: ut LoadBitmap(bitmap resource);not file
After long time i win the Leg Race
"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
|
|
|
|
|
Hi ThatsAlok, how are you,you are absent here !?
i think now you are very fast man not me and one thing where i write ut i write but
whitesky
|
|
|
|
|
WhiteSky wrote: i think now you are very fast man not me and one thing where i write ut i write but
"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
|
|
|
|
|
anilksingh wrote: How load a bitmap from bmp file at run time
will LoadImage api help?
"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
|
|
|
|
|
LoadImage(NULL,szFilename, IMAGE_BITMAP,0,0, LR_LOADFROMFILE|LR_CREATEDIBSECTION);
|
|
|
|
|
<br />
(1) CImage m_Image;<br />
m_Image.Load(filename);<br />
-------------------------<br />
(2) CBitmap m_Bit;<br />
m_Bit.Attach((HBITMAP)::LoadImage(AfxGetResourceHandle(), <br />
filename,IMAGE_BITMAP,0, 0,LR_DEFAULTCOLOR |LR_LOADFROMFILE));<br />
whitesky
|
|
|
|
|
Since my application should handle different types of document with different toolbars , how can I make one toolbar visible or not after the user creates a new document or switches between documents of different types? Please, help me for it. Thanks
|
|
|
|
|
See the scope of you toolbar variable and ....You can modify the toolbar items...
Second: Yopu can create toolbars you want and then you can Load and Unload thm as the document opens of respective type.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
My application supports two document types.I would like to prompt the user for the type of the document he is going to create with appropriate strings, but I don't know how to insert the strings in the default dialog of CWinApp::OnFileNew(). Please, help me for it. Thanks
|
|
|
|
|
I think the strings can be affected by adding new "document template" objects to your application. See the sample and related descriptions for CWinApp::AddDocTemplate function in MSDN.
Perhaps, found the place where the wizard inserted the primary document template for you (somewhere in InitInstance ), and add your own templates there.
|
|
|
|
|
i make a dialog box on which i made edit boxes
now i made a menu in another dialog box menu contain two commands add data
and update data
now i want that when i click on add data menu the dialog box open with all edit boxes enable
and when i click on update data menu the dialog box open with some edit boxes disable
plz tem me how it could be possible
send me code for this
Please mail me
|
|
|
|
|
Give the proper explanation....
You might have disabled them on the UPdate Data. Go through the code again Debug it well and then If you find the problem you can explain it well.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
where should we mail the code to you dear.
You haven't confirmed the mail id .
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Before showing your second dialog, set a boolean flag, for instance:
CMyDialog dlg;
dlg.mDisableSomeControls = true;
dlg.DoModal();
where mDisableSomeControls is a new member of your CMyDialog , of boolean type, initialized to false in CMyDialog constructor.
Next, in CMyDialog::OnInitDialog function, check the mDisableSomeControls value and disable needed controls, for instance:
BOOL CMyDialog::OnInitDialog()
{
. . .
m_cMyEditBox1.EnableWindow(! mDisableSomeControls);
m_cMyEditBox2.EnableWindow(! mDisableSomeControls);
. . .
}
Hope it helps.
-- modified at 7:26 Monday 12th June, 2006
|
|
|
|