|
Thats what I have now, thats equivalent to creating space between bitmaps. What I actually want to do is create a vertical line type of seperator somehow to identify sepearte bitmaps as seperate groups.
|
|
|
|
|
isn't this regulated by the "theme" of the application or OS ?
I just create a default application on VS2008 (with feature pack) and the separators are display as "vertical bars"
M.
This signature was proudly tested on animals.
|
|
|
|
|
I see. Thats what I thought too. I must be doing something thats making it not show.
|
|
|
|
|
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
if (!m_wndToolBar.Create(this) ||(
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME) ))
{
TRACE0("Failed to create toolbar\n");
return -1;
}
.......
Above works for one toolbar...
This will load the Main Frame tool bar, How do I load another toolbar next to it, I have (IDR_MAINFRAME2) as another smaller tool bar that i would like to have loaded next to the first one when I launch my app?
Thanks
|
|
|
|
|
Did you Create (in the resources and in the code) the second toolbar ?
After that, placing toolbars side by side, see this :
Docking Toolbars Side-By-Side[^]
This signature was proudly tested on animals.
|
|
|
|
|
|
You might also like to consider the CRebar class[^], which offers more possibilities.
MVP 2010 - are they mad?
|
|
|
|
|
I have dialog based application where I have a testbox / list box and I want to print the values entered in these controls. Pls let me know how to print the data as formated output.
SNI
|
|
|
|
|
The Printing Functions in Win32 are described here[^]. You have to set out your formatting in the same way as you would draw to the screen by using XY coordinates.
MVP 2010 - are they mad?
|
|
|
|
|
thanks for ur reply. I would like to know whether if I have a label / edit box on my dialog box how can I print the value. do I need to take HDC of my dialog and then print.
SNI
|
|
|
|
|
SNI wrote: do I need to take HDC of my dialog and then print.
I think you need to read the documentation in the link I gave you earlier. You will need to create a Printer device context and then display your data on that. It is not quite as simple as saying 'print' and expecting the dialog to magically appear on the printer.
MVP 2010 - are they mad?
|
|
|
|
|
Hi all, i am very very new to c++ hope u guys can pardon me.
I have a file called "newclass.h" which declares a few methods.
#ifndef _NEWCLASS_H
#define _NEWCLASS_H
#include <string>
using namespace std;
class NewClass {
public:
string symbol;
double lastTrade;
double changeValue();
double changePercentage();
void getDow(string symbol, double, double, double) const;
void getNasdaq(string symbol, double, double, double) const;
void getSP_500(string symbol, double, double, double) const;
void getFTSE_100(string symbol, double, double, double) const;
void getDAX(string symbol, double, double, double) const;
void getNikkei_225(string symbol, double, double, double) const;
void getHang_Seng(string symbol, double, double, double) const;
void getStraits_Times_Index(string symbol, double, double, double) const;
};
#endif
and the other file i have is "newclass.cpp"
#include <iostream>
#include "newclass.h"
using namespace std;
how do i continue writing the main function of the method in newclass.cpp
thanks
|
|
|
|
|
You seem to be really confused about a lot of basic concepts in C++. I strongly suggest you start by reading a book (from the begining) about the C++ language first.
|
|
|
|
|
something like :
void NewClass::getDow(string symbol, double value1, double value2, double value3) const
{
}
use the same pattern for the other methods.
Since I do not know what the 3 double variables are, I simply called them value1, value2, value3; I assume that they really mean something; and if they are "returned" values (i.e. variables that you will assign something to them), you better make them either references (prefered) or pointers.
good luck.
This signature was proudly tested on animals.
|
|
|
|
|
|
hi,all.i find a question today,showed below,and i donot know how to resolve it. the code is:
#include <stdio.h>
int main()
{
char ach1[] = {'h'};
char ach2[] = {'h','e'};
return 0;
}
the memory show:(VC++6.0)
ach2 0x0012ff78 68 65 cc cc
ach1 0x0012ff7c 68 cc cc cc
now, how can i do to make the stack memory layout like this:
(ach2)68 65 (ach1)68
need to change some Compiler Settings?
thank u.
|
|
|
|
|
Why do you need that?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
just want to know.
|
|
|
|
|
I don't think so, at least the way they are written; they will be declared as two distinct arrays in memory.
If you want to optimize memory usageage for shared strings, you can have a look at the Trie data structure[^].
This signature was proudly tested on animals.
|
|
|
|
|
thank u.
but i donot want to optimize memory usageage for shared strings only, i just want to optimize all my stack memories in use if i can...
|
|
|
|
|
Looks like alignment padding and shouldn't hurt anything, but can be confusing if you're looking at the raw data and not expecting it. If you really wanted to you could change structures to align on a byte.
|
|
|
|
|
yes,this is a good method.
but if couldnot change the structure,have any other good ways?
i think this is a good question now.
|
|
|
|
|
Unless you are forced to decide yourself the memory layout (for example to be compatible with some other pre-existing code) don't worry about that.
Your arch1 and arch2 are distinct arrays and the compiler place them at the beginning of a 32bit block so that the processor access speed can be optimum.
You can alter this behavior with the #pragma pack directive, setting the packing to 1 byte you'll get what you expected. But -if you're not explicitly required to do that- let the compiler to do its job and decide by itself how to place variables.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
pragma cannot resolve this question...
|
|
|
|
|
I need to change the playback rate of a video file. The IMediaSeeking interface has a SetRate method which is supposed to do this - but I get an E_INVALIDARG when I pass the new rate. I have FiltrGraph manager which has a Source filter (using the AddSourceFilter method), a GrabberFilter and a NULL Renderer. (Changing the Null Renderer to a default renderer did not change the result - I am still not able to show the video in slow motion or fast forward (speeded up). If SetRate is the correct way to do it, is there sample code I can look at? (Will be happy to post my code here if needed). If there is another way to do this, I am open to all suggestions.
Thanks in advance
|
|
|
|