|
All Photoshop does is hide the details from you. There ONLY way Windows can deal with a bitmap is as an array of scanlines, which may or may not be padded, depending on bit depth. They are always rectangular. End of story.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003
|
|
|
|
|
I was created toolbar using CToolbarctrl.I was used Loadimages for loading the Single Bitmap,having no of different bitmaps.Then I was used TBBUTTON structre.
b[0].iBitmap=0; ie means I was assigned index of the bitmap resource.
This program sucessfully run on WIN98.But while running the on WIN2000
Bitmaps are not appeared on the bitmap.what shall I do?Please tell me
changes?
|
|
|
|
|
Hi,
I work on a project composed with several libs including MFC's and resources on visual c++ V6.0
i have a toto.lib and toto.res that i link with others but i saw that all resources was present in toto.res AND in toto.lib. I would like to trash toto.res and use only resources included in toto.lib but the linker want absolutely toto.res. I can't find a way to link with toto.lib only and load resources from this static lib.
Any solution?
Thanks
|
|
|
|
|
If .lib your are talking about is surrogate created to link to some DLL then you have no choice.
If you are talking about true static lib there could be no resources in it, even though it can reference one.
Anonymous wrote:
load resources from this static lib
This statement is confusing - please clarify what is it you are trying to do?
|
|
|
|
|
Hi,
I have strange problem with my dialog based app.
I use modified PropertySheet/PropertyPages on main dialog
Base is StackDialog by Zoran M.Todorovic, found on codeguru or maybe on codeproject.
In some moment i realized that when I close application, no one get focus.
Alt+Tab combination don't work. Alt+Esc stil can to open start meny, and after that Alt+Tab work well.
Main dialog have added menu, tooltips...
I try to set focus to the previous application in ExitInstance
Question is
1. How to repair application to exit properly
2. How to find which app is behind my app, (in z-order)
e.g. how to force regular exit
thanks for every suggestion
|
|
|
|
|
Im trying to undefine a setting from a function one file
that calls another file where the actual #define is used.
the problem is much the same as this code.
I know you can fix this by putting the volume code
below main() but is their any way around this other than
moving the code ?
<br />
#define VOLUME_UNITS 1<br />
<br />
int volume ()<br />
{<br />
#ifdef VOLUME_UNITS<br />
return 10;<br />
#else<br />
return 20;<br />
#endif<br />
}<br />
<br />
int main(int argc, char* argv[])<br />
{<br />
int vol;<br />
#ifdef VOLUME_UNITS<br />
#undef VOLUME_UNITS<br />
vol = volume ();<br />
#define VOLUME_UNITS <br />
#else<br />
vol = volume ();<br />
#endif <br />
<br />
printf ("%d\n", vol);<br />
<br />
#ifdef VOLUME_UNITS<br />
vol = volume ();<br />
#endif <br />
<br />
return 1;<br />
}<br />
|
|
|
|
|
Little bit confused as to what you are trying to do, but just looking at the code, the #ifdef and #undef's in the main funtion don't really serve any purpose. Any #directive is dealt with by the compiler, not the linker or at runtime. I'm guessing by the bit of code that goes (code is paraphrased!):
#ifdef VOLUME_UNITS
#undef VOLUME_UNIT
vol = volume()
#define VOLUME_UNITS
...
#endif
... you are trying to turn off the VOLUME_UNITS for that particular execution of volume(), won't work - the evaluation of VOLUME_UNITS will only occur when compiled, not when volume() is executed. In effect, the code above is equivalent to:
main ()
{
int vol;
vol = volume ();
:
#ifdef VOLUME_UNITS
vol = volume ();
#endif
}
If you want something evaluated runtime then the only thing is to do it runtime (extra argument, an 'if' statement etc)! Alternatively, I may have misunderstood your question...
|
|
|
|
|
What segment of the SDK needs to be updated to get the gdi+ lib, dll and header files?
I need to know this as i wont have enough hd space for the full SDK platform upgrade. (Note I am assuming GDI+ is in one of the platform upgrades)
|
|
|
|
|
Is this a wise thing? I have a heap of little tables that would never have more than 100 or so entries so did not want to use a database like Access or MSDE.
I was thinking of using XML to store the data and DOM to access it, I basically need to be able to add/modify/delete records and do some simple queries, e.g. "give me all records where this element equals this value", this should all be possible using DOM?
|
|
|
|
|
yes, this is possible, but you won't be able to use automated queries, stored procedures... having less work in order to connect to the database (because there is not a database at all), but having more work in order to make it give you the right results because you'll need to make all the normal database stuff for yourself...
Hope this helps...
|
|
|
|
|
For years now we have all been working with two software configs
Debug and Release (cross product with other things like Unicode,
or various languges etc.)
I have been thinking about adding an additional type of config
to my projects, and wanted your opinions. Debug, of course, is
overloaded with extra debugging checks, ASSERTS, ASSERT_VALID
and so forth. Consequently, it is loaded down with extra stuff
that makes it run slow. (Also the optimizer is generally off
to make single stepping code easier.) Release turns off all that
stuff to maximize the speed of the program (which, BTW, usually
means mimizing the size of the program rather than the number of
instructions on modern CPUs, but that is a different issue.)
I have been considering an intermediate type of configuration,
call it Rebug a combination of Release and Debug. This tool
keeps all the ASSERTS and other debugging tools, but redefines
them to log as errors, and dump minidumps as opposed to breakpoints.
Similar with unhandled exceptions etc. Rebug is also stripped
of symbols (though I keep a pdb.)
What is the purpose of Rebug? Well it is released as part of
the install, and installed right next to the release version.
If a bug happens in the field, the user can switch to the
Rebug version (presumably through a menu command in the Release
version), recreate the bug, and generate all sorts of tracking
information for the debugger back at home base. In particular
it catches problems early, by detecting failed assertions,
uncaught exceptions, and so forth. Rebug would also include
various options like range checking, stack frame checking,
dog tags and so forth. It would allow the generation of
a good debug run in the field for debugging without sending
out the debug version, and having a breakpoint fire in the
middle of a real user session.
Why not just use the standard XP mechanism for handling crashes?
Because the Rebug version can potentially catch the problem
early enough that it is readily apparent what is happening,
rather than looking at a static picture where the data set is
already screwed up.
I wonder what y'all think of this idea?
|
|
|
|
|
We have been using this sort of setup for a few years now, and it is very usefull indeed. In fact, we usually have more than just debug,release and the one you call "rebug". We also have Debug Optimised, ( "Derel" ? ), which is the full debug-build with optimisation turned on. When you have something which only crashes in release, it can be good to go backwards towards the normal debug build through these two extra targets.
The only problem with the scheme is that multiple configurations like these are poorly supported by VC...well, at least VC 6. It's a hassle to maintain and there are bugs which will mess up your configurations when you alter options in the menus. The configuration manager in VC 7 seems better.
-=jarl=-
|
|
|
|
|
DOS prompt
i use VC++ 6.0, what header can i include and what command can i use to copy the contents of a DOS screen to a file, like if i wanted to copy the directory of a folder to a file.
EMAIL
i made a program that displays info and i just copy and paste it to an email, is there anything i can do to just directly send the info to the email? i doubt it's possible, i want to send it to NETSCAPE COMPOSER, thanks
|
|
|
|
|
It's very simple. In DOS world, try this:
c:\> dir *.* > myfile.txt
In this manner, all of reports from dir command will be redirect to myfile.txt
you can use ShellExecute or ShellExecuteEx API to do that for you. Remember that "*.* > myfile.txt" is argument of dir command.
A. Riazi
|
|
|
|
|
in order to access the menu items in an MDI app would you call getMenu() on the child frame or the parent frame?
Ben
Oh wow
|
|
|
|
|
How can i associate a file type with my application.
|
|
|
|
|
Depends on OS. For NT5+ you can use the commands assoc and ftype at the command prompt.
If you're willing to do it manually, use Regedit.
|
|
|
|
|
Please let me know path of the registry key or where i can find the information
|
|
|
|
|
How can i convert char into hex and print on text box.
|
|
|
|
|
|
char MyChar='a';
m_MyTextBox.Format("0x%x", MyChar);
UpdateDate(FALSE);
In this case, m_MyTextbox is your member varible with variable type CString to attached to TextBox.
A. Riazi
|
|
|
|
|
Hiya I have only started to learn SQL in MFC/C++. I have a program that opens a ACCESS DATABASE and I can do queries on it no problem using SQL - using CDatabase and CRecordset. My question is how is a SQL server accessed??
Is it the same as I have accessed the ACCESS DATABASE?? Normally on a SQL server, are the files all kept as databases and that is how you can access them the same??
Can anyone give me some info on accessing a database on a SQL server..
Thank you.
grahamoj.
|
|
|
|
|
Basically, the answer is yes, it is the same. In days gone by
(Visual C++ 6.0) a separate set of classes were used for access
called DAO classes, specifically CDaoDatabase and CDaoRecordset,
however those are no longer "supported" in Visual C++ .Net.
However, Access is an ODBC source, which is what CDatabase and
CRecordset use. Consequently, Access works with these classes.
SQL Server (and MSDE) also are ODBC sources. To access them you
need to do one of two things: either use the wizard to generate
the classes and select the SQL DSN as the data source, or
alternatively open the database with the appropriate DSN for
the SQL Server database.
HTH.
|
|
|
|
|
hi,
i'm having problem getting odbc to retrieve paragraph of text from a ms access.. whenever, odbc attempts to read the paragraph text, it alwasy crash.. however, i have no problem storing the paragraph text into the database.. anyone know any solutions?
thanx in advance!
|
|
|
|
|
Have you the Exception handling built in and working? ->Message leads to error.
Is there a supplied buffer for text and the data type right, there a some tricky things in this way
Try this @ home. (B&B)
|
|
|
|