|
16 bit bitmaps do not use a BYTE for each colour, they use 5 bits per colour and one spare. 8 bit bitmaps use a palette and one byte to store each colour, which is a lookup value into the palette.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
What can you advise?
What i need to change in my code to work with 8 and 16 bitmaps.
I don't know how to work with 8 and 16 bitmaps.
Thanks for your help!
Sergei
|
|
|
|
|
Does the structure, for example 8 bpp bitmap, goes thus:
Red;
data+=byte;
Green;
data+=byte;
Dark blue;
data+=byte;
// Miss of reserve
data+=byte;
If so, whence to take colours?
Willn't structure RGBQUAD help any more?
I.e. what analog will be to string:
Red = Quad->rgbRed?
There can be I are mistaken?
In what my error?
|
|
|
|
|
My app creates a modless dialog and enters the message loop etc. Why when I do a 'Minimize All Windows' on the Taskbar, does my application not minimize ...?
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
The Window needs the the style 'overlapped' doh!.
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
well i just went through some of the codes available for graphical displays , however didnt find ne in which we can simply draw graph using the mouse .... and the then can easily get the respactive co-ordinates ....
need guidance on how to achieve this ... maybe some reference or sth ,....
Thanks in advance ...
|
|
|
|
|
You want the mouse to actually plot the graph ? If so, look at my Doodle example for using the mouse to draw, it's easily converted to GDI if you don't need GDI+. To get the co-ordinates, I'd look at the filled shape code in that sample, it shows how you can build a path from the movement of the mouse, which I would think is the easiest way to get co-ordinates out at the end.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hello folks,
I'm currently working on my own Unhandled Exception Handler in order to provide me more information regarding the crash occurred and make a 'grateful' crash .
When checking the DGBHELP-library (MSDN) it also provides " User-mode Minidump Files" (crash dumps), that can be loaded within a debugger (like WinDBG).
Now my questions:
1. Very little info is provided in MSDN about these MiniDumps: what exactly do they dump and how to use it (is it usefull)?
2. MSDN states: "You can use this function on versions of Windows prior to Whistler without redistributing DbgHelp.dll. To do so, link with the static library MiniDump.lib, which is included in the Platform SDK."
No way I can find the Minidump.lib in the latest SDK, or more information about this. What about this library?
Any info about this MiniDump is highly appreciated!
Thanks,
EiSl
|
|
|
|
|
Which files of the ATL DLL project I need to provide for Delphi except MyAtl.DLL ???
Because in client program in VC++ I need also :MyATL.h and MyATL_i.c.
What in another languages ?
|
|
|
|
|
Delphi should just need the .DLL and .TLB files. Visual Basic is the same. As long as the DLL is registered on the system, you should be able to see your component in the Visual Basic References dialog.
Michael
|
|
|
|
|
|
I am trying to stream some text into and then out of a text string using STL. The following lines of code indicate how this is being done at the moment:
struct MyStruct {
string el1;
string el2;
};
string text;
char tab = 0x9;
MyStruct myStruct;
myStruct.el1 = "Some text";
myStruct.el2 = "Some more text";
ostringstream output (text);
output << myStruct.el1 << tab << myStruct.el2;
text = output.str ();
istringstream input (text);
input >> myStruct.el1 >> myStruct.el2;
I have two questions. Firstly, am I doing the output part correctly? It seems bizarre that I should create an output string stream passing it a string and then have to assign the stream contents to the string
Secondly, how do I get the input part to read in the text ignoring whitespace until it finds the tab delimiter?
Derek Lakin.
Salamander Software Ltd.
|
|
|
|
|
You don't need to pass a string argument to the ostringstream constructor. You can discard stuff from an istringstream just like from an ordinary istream , e.g.
input.ignore(numeric_limits<std_streamsize>::max(),'\t');
|
|
|
|
|
|
Unfortunately that doesn't seem to work.
Now it ignores the first bit of text up to the delimiter and then ignores the delimiters and uses space as a delimiter
The struct members are added with a tab to separate them. The struct members can (and do) contain spaces. The text must be read back into the struct such that all the text up to a tab is put into the specified struct member.
So, spaces are not delimiters, they are part of the text string. The tab is the delimiter between struct members.
Any more ideas?
Derek Lakin.
Salamander Software Ltd.
|
|
|
|
|
Sorry, I didn't read your first question carefully enough. If the struct is stored in a std::string , use std::string::find() to find the separator and then std::string::substr() to extract the struct member.
|
|
|
|
|
I was hoping this wasn't going to be necessary. Oh well, we live and learn.
I must admit I'm a bit miffed that it's really easy to write it to the stream, but bags of effort to read it back in again
Derek Lakin.
Salamander Software Ltd.
|
|
|
|
|
iam doing on sqlwindows. iam trying to check some functions like,
1.sWinFindwindow
2.cbFindexact
3.lbFindexact
present in what dlls.when iam trying it by using dumpbin.exe using /exports option iam getting error like:
ur .dll file is an NE executable,use EXEHDR to dump it.
can anyone help me in this regard...
thanks in advance.
chands.
chands
|
|
|
|
|
Hi!
i have a dialog on which i want to show the contents of my computer /Network Neighbourhood and my documents in the listbox. Please tell me that how to get the contents as i m using SHGetSpecialFolderLocation API to get the path of other folders like Favouite and other...
but it doesnt work in case of the my computer. tell me how to do this...
Thanks in advance
|
|
|
|
|
I am trying to programmatically create menus in SDI.
The error message I get is "failed to create
empty document."
I started with a SDI application that was working fine
with menus created by menu templates in the
.RC file. The only thing I changed was to remove the
menu templates in the .RC file. I left the menu
resource definition for IDR_MAINFRAME in
Resource.h. I also left the reference to IDR_MAINFRAME
in InitInstance:
///////////////////////////////////////////////
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CSdiDoc),
RUNTIME_CLASS(CMainFrame),
RUNTIME_CLASS(CSdiView));
//////////////////////////////////////////////
Question 1) Is this use of IDR_MAINFRAME correct?
Question 2) If not, what is supposed to be the second
argument instead of IDR_MAINFRAME?
I placed the following menu creation
commands in the OnCreate function of the frame window
.cpp file, but OnCreate never gets called by InitInstance.
////////////////////////////////////////////////////////////////////////////
CMenu mainmenu; // create main menu
mainmenu.CreateMenu();
CMenu menuPopup; // create the popup menu
menuPopup.CreatePopupMenu();
menuPopup.AppendMenu(MF_STRING, ID_COLOR_RED, "&Red");
menuPopup.AppendMenu(MF_STRING, ID_COLOR_YELLOW, "&Yellow");
menuPopup.AppendMenu(MF_STRING, ID_COLOR_GREEN, "&Green");
// attach popup menu to main menu using menu handle
mainmenu.AppendMenu(MF_POPUP, (UINT) menuPopup.Detach(),
"&Colors");
// the next line is a *complete guess* as to how to load the menu
mainmenu.LoadMenu(MAKEINTRESOURCE(&mainmenu));
AfxGetMainWnd()->SetMenu(&mainmenu);
////////////////////////////////////////////////////////////////////////////
Question 3) Are these menu commands correct for
creating & loading menus?
From what I can tell, the application gets only partly
through InitInstance, specifically up to this command:
if (!ProcessShellCommand(cmdInfo)) return FALSE
It returns false & OnCreate is never called & the
frame window is not created.
Question 3) What else am I doing wrong?
thank you for your assistance.
mary, houston, texas
|
|
|
|
|
I *suspect* it's failing because it cannot find the menu you deleted. Why not try leaving the resource there and deleting it's contents ?
Why do you want to do it this way - is your menu so fluid that greying items is not an appropriate solution ?
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
great idea! I left the barest skeleton of a main menu,
& the menu is loaded, but what do I use for the name of the
CMenu class object with AppendMenu() assuming the
following code remains in OnCreate?
////////////////////////////////////////////////////////////////////////////
CMenu mainmenu; // create main menu
mainmenu.CreateMenu();
CMenu menuPopup; // create the popup menu
menuPopup.CreatePopupMenu();
menuPopup.AppendMenu(MF_STRING, ID_COLOR_RED, "&Red");
menuPopup.AppendMenu(MF_STRING, ID_COLOR_YELLOW, "&Yellow");
menuPopup.AppendMenu(MF_STRING, ID_COLOR_GREEN, "&Green");
// attach popup menu to main menu using menu handle
mainmenu.AppendMenu(MF_POPUP, (UINT) menuPopup.Detach(),
"&Colors");
AfxGetMainWnd()->SetMenu(&mainmenu);
|
|
|
|
|
CMenu* pMenu = AfxGetMainWnd()->GetMenu();
gets you a pointer to the existing menu, then use InsertMenu to insert your created menu (menuPopup) into it.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I'm trying to modify the icecast server so that i can be used as a service. When I use the SC_HANDLE to declare a variable, the compiler gives me a:
error C2275: 'SC_HANDLE' : illegal use of this type as an expression
error. I don't understand what i'm doing to cause that. Here it is in context:
int
main (int argc, char **argv)
{
g_bService = FALSE;
g_bStop = FALSE;
SC_HANDLE hManager;
SC_HANDLE hResult;
SC_HANDLE hService;
hManager = OpenSCManager(NULL,NULL,SC_MANAGER_ALL_ACCESS);
if (hManager)
{
hService = OpenService(hManager,"icecast",SERVICE_ALL_ACCESS);
if (hService)
{
g_bService = TRUE;
SERVICE_TABLE_ENTRY DispatchTable[] =
{
{"icecast", IcecastMain},
{ NULL, NULL}
};
if (!StartServiceCtrlDispatcher(DispatchTable))
{
SvcDebugOut("[ICECAST] StartServiceCtrlDispatcher error=%d\n",GetLastError());
}
}
}
else
{
IcecastMain(argc, argv);
}
startup_mode ();
return 0;
}
It give me an error on the first 3 variable declaration of SC_HANDLE.
Here is the SC_HANDLE declaration from winsvc.h:
DECLARE_HANDLE(SC_HANDLE);
typedef SC_HANDLE *LPSC_HANDLE;
Any Help would be greatly appreciated.
Stephen Caldwell
Blackfission, CEO
http://bf.steffc.yi.org:81
|
|
|
|
|
Hi all.
I'd like to know how it is possible to know the (x,y,cx,cy) of a menu (CRect information ?) or do i have to count the number of item * Item Heigh ?
Who knows ?
|
|
|
|