|
Hi all,
I'm really tired of looking for the solution of this annoying problem:
I have MFC application with CToolBar. In fact, I have CReBar and two CToolBars in it. I display few buttons with text in these toolbars (in single line). When user changes the size of main window and the width is not enough, I want toolbar to automatically wrap to more rows so that all buttons stay visible.
I don't want to use chevrons or floating toolbars. I create my toolbars with TBSTYLE_WRAPABLE and I tried to call SetRows(...), but it had no effect. Yes, it created as many rows as requested, but all buttons stayed in the first row even though if the size was too small to show them all.
Thank you all for any suggestion.
|
|
|
|
|
I seem to recall that toolbar button wrapping only occured at separators. Does it wrap if you add a few separators?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I tried that but no change. In fact, the toolbar gets wrapped when the size is too small, but it wraps to maximally 2 rows for me, although I call SetRows() with higher argument. Thus I think I'll have to get rid of it by writing my own code for wrapping the toolbar, since I haven't found any example on the web which uses toolbar wrapping for docked toolbar ![Sigh | :sigh:](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_sigh.gif)
|
|
|
|
|
Hi Im a c++ beginner, I was wondering if someone could help me with using pointers and triangular arrays. I would like to know how to define them correctly, accesing them and finally printing them with a for cycle. thanks!
links to faqs and tutorials are also greatly appreciated;)
|
|
|
|
|
Here is one solution.
char ***pArray = new char **[1];
pArray[0] = new char *[1];
pArray[0][0] = new char[32];
...
delete [] pArray[0][0];
delete pArray[0];
delete pArray;
Kuphryn
|
|
|
|
|
ok, now how would i point to a specific direction and print that? lets say^i have a an array[7][20][50]; and i would like to print it by pointers, how would i do that? or if i would like to print all rows position five etc...
thanks for your time![Laugh | :laugh:](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_laugh.gif)
|
|
|
|
|
int *iArray;
iArray = new int [7][20][50];
for (int x = 0; x < 20; x++)
{
for (int y = 0; y < 50; y++)
{
}
} Hope that's helpful.
If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
If I wanted to find all the child windows on a dialog that were edit controls should I be able to use the following code
FindWindow ("EDIT", NULL); If so should this code work in the first WM_PAINT message that a dialog receives? I ask because I try it and when it executes it returns NULL. I do have edit controls on my dialog. Any help is appreciated. Thanks.
- Aaron
|
|
|
|
|
|
Thanks for the information. One question...how do I inspect the window class to see if it's an edit control? How do I get the window class information from the hwnd value? Thanks again.
- Aaron
|
|
|
|
|
Try:
TCHAR buff[ 32 ];
GetClassName( hWnd, buff, sizeof( buff )-1 );
if ( stricmp( buff, "edit" ) == 0 )
;
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
Works beautifully. Thanks Neville.
- Aaron
|
|
|
|
|
Neville Franks wrote:
www.surfulater.com
Looks nicer by the day, Neville!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
I have the followings:
1. A Dll with a custom control (ControlDll.dll)
2. A dll with a dialog using the custom control (DialogDll.dll)
3. An exe that uses the dialog from DialogDll.dll
The control is register nicely like all custom controls using AfxRegisterClass...
When i run the exe, it failed (the dialog was not displayed), what i did is the following:
Checked teh 'no fail create' to see where it failed, and found out it could not find the control from the ID while in 'PrepareCtrl' of the DDX_Control of my custom control.
I then created another dialog, this time in the exe, which uses the same custom control from the ControlDll.dll, and it worked!
It seems that the nesting of dll within dll, and the custom control registration some how got lost
Any help will be wolcomed
10x
ronhash
|
|
|
|
|
I use Timer in my service prog like that:
timer2ID=SetTimer(NULL, 0, INTERVAl,Timer2);
when compile Debug ,it is perfect.but when complie Release,show the error :
D:\Microsoft Visual Studio\VC98\MFC\INCLUDE\afxwin2.inl(469) : error C2039: 'OnTimer' : is not a member of 'CWnd'
D:\Microsoft Visual Studio\VC98\MFC\INCLUDE\afxwin2.inl(470) : error C2065: 'Default' : undeclared identifier
I don't use CWnd class in my prog.what is the problem?
appreciate any help!!!
|
|
|
|
|
timer2ID=::SetTimer(NULL, 0, INTERVAl,Timer2);
if you use windows api functions but i am not shure what classes and functions you have because you include mfc library.
|
|
|
|
|
Hi All!
Can Any one tell me how to luanch an application by double clicking a file which is associated with the application's icon
Thank Y'All !
|
|
|
|
|
One possible solution is RegisterShellFileTypes().
Kuphryn
|
|
|
|
|
I can't get to my Visual Studio right now, but i had the same problem. there's a function of CWinApp called enableShellOpen or something like that. put that function in your app's initinstance function and it should work.
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Hi,
I have a 3 way split window, horizontal and vertical.
1st on the left is a FormView, containing a lot of edit and radio buttons, suppose to display the different cordinates.
2nd, first row on the right, which is the main view class has a ScrollView.
3rd, second row on the right, has a FormView.
I need to capture the mouse click and movement on the 2nd window and display the coordinates in the edit boxes in 1st window.
Can anyone help
lvidot
|
|
|
|
|
One solution is to add a message handler for the mouse move message in the view class.
Kuphryn
|
|
|
|
|
Thanks,
I'm new to this environment....
So how do I go about that?....
Any help will be most appreciated...
|
|
|
|
|
What are the steps to save the content of the CDC to the Bitmap file?
Well going through the MSDn and web articles i found some of the handy tools that are used for saving the content of Memory device context to bitmap file are:
1.0 Fill the BITMAPHEADERINFO structure
2.0 uSE THE GetDIBits() function
3.0 Use of CreateDIBSection to write
Problem Statement: I am having a global Memory device context. In a function i am initialising it as Mem. DC by calling API -> CreateCompatibleDC().
All the drawing stuff is drawn to it.
Now on Save i have to save the content of the MemoryDevice Context ( MemDC) to a Bitmap file.
Any solution,idea and guidelines to do this.
Leave your mark wherever you go
|
|
|
|
|
codeproject
MFC / C++ >> Bitmaps & Palettes
CxImage
CDibData
A DIBSection wrapper for Win32 and WinCE
etc...
INTP
|
|
|
|
|
Why sometimes when i press . or -> the intellisense will pop-up a menu, but other times it does not. Is there a problem with vc++6? I'm definitely sure that particular object has that member function, but intellisense fails to bring the pop-up menu, all options are enabled btw.
Anyone experienceing same prob like me?
|
|
|
|