|
mikobi wrote: But when I destroy it
If you destroy it, you will have to create it again and not just show it.
Nibu thomas
Software Developer
|
|
|
|
|
Did you understand first why it is not possible to write in others forms ?
I will try to create it now
|
|
|
|
|
This what i write but not success :
CMainFrame* pFrame = (CMainFrame*) AfxGetApp()->m_pMainWnd ;
CStatusBar* pStatus = &pFrame->m_wndStatusBar ;
CToolBar*pTool = &pFrame->m_wndToolBar ;
pTool->CreateEx(pFrame,TBSTYLE_FLAT,WS_CHILD|WS_VISIBLE|CBRS_TOP);
pTool->LoadToolBar(IDR_TOOLBAR1);
pTool->ShowWindow(SW_SHOW);
pTool->EnableWindow(true);
|
|
|
|
|
When I write this test
if (!pTool->LoadToolBar(IDR_TOOLBAR1))
AfxMessageBox("Failed to Load Toolbar");
I see that there is a problem, the Toolbar is not loaded, i don't know why ? What to do ? Why it is not loaded ?
|
|
|
|
|
Hi,
I have two views of CScrollView type open with tile effect.
I set SetScrollSizes(MM_TEXT, sizeTotal) . In first view I scroll and get the view to the area which should not be visible in second view. then I start drawing my graphic objects. I draw lines rectangle in one view and then call UpdateAllViews on document.
To my horror, I saw the graphic elements in other view too of same dimension.
relative offsets of these objects are same in both views from their top left corner or say bottom right corner. Update on both view causes both all graphic objects to be drawn all overlapped just like second view. They are not visible in the scrolled area.
Are these getting drawn in screen coordinates? Here which dunction need to be used.. screen to client.. how to have correct effect.
(mapping mode I am using is MM_TEXT)
Leya
|
|
|
|
|
hi all,
i have modified the style of the Property Pages to Bottom of the Property Page. I am able to look the Tabs down but when i click the Tabs only the Tabs are visible else they are not showing Properly.
code snippet
//=========================================================================
CPropertySheet dlg(_T("Hellow"), this, 0);
one a;
two b;
three c;
dlg.AddPage(&a);
dlg.AddPage(&b);
dlg.AddPage(&c);
dlg.SetActivePage(&b);
dlg.ModifyStyle( 0, TCS_BOTTOM ); // to modify the Tabs in Down Side
dlg.DoModal();
//==========================================================================
i am getting the Tabs Down wards by using ModifyStyle(...) but it clear only when I Click the Tabs.
please let me know any solution.
thanks and regards,
uday.
uday kiran
|
|
|
|
|
I am trying hard on changeing the menu's background..
But failed all the time...
Can anyone tell me how to change my menu's background to a bitmap
as below?
Thank you so much....
The picture is at
http://www.codeproject.com/useritems/Enhanced_Win32_Framework/RebarFrame.gif
|
|
|
|
|
|
Hi,
I'm using VC++ .NET 2003 with MFC and OpenGL to do some ghraphics programming and have come to a rather sticky mess with Splitter windows. No matter how many splitter windows i set up, the opengl graphics only every appear in the last "pane". currently i have assigned the same view with opengl drawing code to every pane, but its only the last pane which will display any graphics. the others never ever et updated, and dont even turn to a black colour. i.e. moving other windows over these panes leaves a mess behind.
has anybody had a similar problem and know of how to fix this?
any help would be much appreciated.
Thanks,
Paul
|
|
|
|
|
You need to make sure that your wglMakeCurrent stuff happens at the beginning and end of the draw function instead of at the beginning/end of the app. This is because openGL can only draw to the current rendering context - so at the moment thats probably the first view/dc that you set it up with.
Its probably better to use the forums at www.openg.org if you need any more help with this kind of stuff.
Hope that helps,
Kev.
|
|
|
|
|
|
i want to check if one field is left empty,
BYTE Field_1a, Field_1b, Field_1c, Field_1d;
updatedata()
cipaddress.getaddress(Field_1a, Field_1b, Field_1c, Field_1d)
if (Field_1a == NULL)
MessageBox("Error")
the problem is if the field is left empty the if statement is not run. what shoud i be checking to see if the field is empty?
thanks
|
|
|
|
|
viperlogic wrote: what shoud i be checking to see if the field is empty?
CIPAddressCtrl::GetAddress() returns the number of non-blank fields.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
i ve done a program where it can create a output file...now i want the same programe also can read frm a notepad..any idea on this...i paste my codes down..
-----------------------------------------------------------------------------<code>#include <iostream>
#include <string>
#include <algorithm>
#include <fstream>
using namespace std;
void DoStuff()
{
ofstream File("MyFile.txt");
cout << "Enter digit: ";
string s;
cin >> s;
cout << endl;
for (int i=0; i<5000000; ++i)
{
random_shuffle(s.begin(), s.end());
File << "Randomised: " << s << endl;
File << " : " << s << endl;
File << " : " << s << endl;
File << " : " << s << endl;
File << " "<< endl;
// File << "Single Row: " << s << " " << s << " " << s <<" " << s << endl;
File << " "<< endl;
}
}
int main(int argc, char* argv[])
{
DoStuff();
return 0;
}
</code> pls help me
|
|
|
|
|
use ifstream like that
ifstream fin;<br />
fin.open("MyFile.txt");
now use fin just like you use cin.
In case of any problem, let us know.
Good luck
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
thing how to change da string to fin!!
|
|
|
|
|
1. speak proper english
2. learn C/C++ before continuing asking questions like the ones you've been asking those days.
you seem to don't even understand what you do and what you want
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
can u u dont interupt....its like u r discouragin me..i m trying to learn ....if u dont like it....u no need to answer my doubts k...let other people who r willing to solve this problem help me..
|
|
|
|
|
He's not trying to discourage you. You will discourage yourself alone if you continue on this way. Learning a programing language is something long and hard. It takes a lot of time to get fluent with it.
The way you are learning it is not really good. In brief, you 'ask' people to do the job for you but you don't even understand what's going on.
I suggest you to find a good book (sorry, I don't know one) that explains everything with some examples. Then, start to do very simple programs that you FULLY understand (like asking the user for a value and displaying it back, opening a file and outputing its content in the console, ...)
If you try to go too fast, you'll be disgusted.
|
|
|
|
|
Bravo !!!
Maxwell Chen
|
|
|
|
|
yes like always
I see all posts in this forum and always Cedric is polite,
But toxcct is very good and he's very good programer.
|
|
|
|
|
thanks for your support Cedric.
i didn't want to offend (even if I knew while posting that it would), but it becomes boring to see that the best this guy can do to learn is reading a C++ book first.
and the other important point i quoted was his SMS'ed typing english, which is not very appropriate to an international forum like codeproject.
i appologize dude if you thought i wanted to discourage you (it's not the case), but consider taking my thoughts as good advices.
regards to all.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Smells like v2.5 beta
~RaGE();
|
|
|
|
|
|
makaveli_07 wrote: now i want the same programe also can read frm a notepad...
Use FindWindow() to get to get a handle to Notepad's top-level window. With that handle, call FindWindowEx() to get a handle to the edit control. Then you can send the edit control a WM_GETTEXT message to get the text contained within it.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|