|
Hi !
I have a homework about placing bitmaps on menus. In fact it is menu elements made of bitmaps entirely (Like in the Petsholts' book). If anyone could show me a sourcecode for this I would be greatfull;
(Both Mfc and c source acceptable)
Thanks.
|
|
|
|
|
The folks at Code Project don't mind helping with homework assignments, but you need to at least try to do it yourself first. You've apparently seen some source code (e.g. your reference to Petzold's* book), so you at least have an idea of what you need to do. Get the project started, and if you get stuck with a specific problem, feel free to ask.
* Note how the man's name is spelled
Software Zen: delete this;
|
|
|
|
|
I've tryed to find information and/or codesamples om how to create binary registry key/value, but with no luck.
Yes, I'm a newbie! But I'm trying...
All I've found so far, is information and codesamples on how to create strings and dword registry entries. I've tryed to study the MSDN help as well. But with my level of VC++ knowledge, this is quite cryptic for me.
Is there any savior out there that could just give me a short sample on how to create binary registry key. For example:
Create:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Test
Value(hex): a4,9d,bd,32,84,95,cb,01,fa,98,6d,5d
Best regards,
Peter
|
|
|
|
|
Try the following:
RegSetValueEx(key,name,0,REG_BINARY,data,data_size)
where key is the registry key you want to write, name is the name of the value, REG_BINARY indicates a binary value, data is a pointer to the data, and data_size is the size of the data in bytes.
Software Zen: delete this;
|
|
|
|
|
Cheers!
I'll try that. Thanks a lot.
Peter
|
|
|
|
|
hai,
We customized the default open dialog by deriving the class from
cfiledialog . These are the issues that we faced.
Issues:
1. How to handle the default messages in cfiledialog class?
2. In Win'2000 & above, we tried to change the listview style to
LVS_REPORT using Modifystyle method The style is changed, but the files and
column headers are not displayed.
3. In Win'98, how to remove the separator in toolbarwindow32.
Please give me the solution as early as possible.
sureshb
|
|
|
|
|
1. How to handle the default messages in cfiledialog class?
Make a new class inherited from CFileDialog, that would solve.
2. In Win'2000 & above, we tried to change the listview style to
LVS_REPORT using Modifystyle method The style is changed, but the files and
column headers are not displayed.
Call the member function InsertColumn(...).
And 3.... I dont know...
Maxwell Chen
Lets make bugs better!
|
|
|
|
|
What do i need to have for programming a program like CD Box Labeler Maker. if you have some sample, it very useful for me. Or what's the library i need?
|
|
|
|
|
MFC. Seriously, it's pretty simple, standard stuff. Everything you need is in articles on this site.
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
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Can you tell me some exactly sampler, which you ask in MFC
|
|
|
|
|
MFC is the Microsoft Foundation Classes, and I honestly could not create an example without doing the whole thing. Look at some samples on printing and on GDI ( graphics ).
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
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I am thinking about building a firewall and was looking at Winsock SPI. What I want is opinions on weather it is a good idea to do it with a LSP or if there is a better way of doing it.
P.S. if I finish it I will post it on CP
- Matt Newman / Windows XP Activist
"Well, the guy that's giving you a hard time is a f***in moron, and you can tell him thats straight from another Linux user." - John Simmons on Linux Users Just do the American thing and shoot him... - Jim Crafton on Linux Users Wh3n my l33t skillz 1mpr0v3, I w1ll h4ck M$, 4nd th3n wh0 w1ll b3 l4ugh1ng ? N0t Bill. H4 h4 h4 h4 h4 h4 h4. - Christian Graus
|
|
|
|
|
Personally I wouldn't bother since HW firewalls are so cheap today.
If you really must do it, http://www.ndis.com/papers/winpktfilter.htm[^] seems to be a good place to start looking at options.
"You can stand all night at a redlight anywhere in town, hailing Marys left and right but none of them slow down. I've seen the best of men go past. I don't wanna be the last..."
|
|
|
|
|
I have thought about NDIS but I am wary of using the DDK. As far as HW firewalls I have seen plenty of router/firewalls but all I want is a HW firewall that is easily configurable and cheap.
- Matt Newman / Windows XP Activist
"Well, the guy that's giving you a hard time is a f***in moron, and you can tell him thats straight from another Linux user." - John Simmons on Linux Users Just do the American thing and shoot him... - Jim Crafton on Linux Users Wh3n my l33t skillz 1mpr0v3, I w1ll h4ck M$, 4nd th3n wh0 w1ll b3 l4ugh1ng ? N0t Bill. H4 h4 h4 h4 h4 h4 h4. - Christian Graus
|
|
|
|
|
Check the link again, it covers a lot of different ways to do packetfiltering (including SPI).
"You can stand all night at a redlight anywhere in town, hailing Marys left and right but none of them slow down. I've seen the best of men go past. I don't wanna be the last..."
|
|
|
|
|
Does anyone know why my program will stop runing after calling CAutoComplete::Init(reg_key_that_is_valid)..
I think it stops at:
CoCreateInstance(CLSID_AutoComplete, NULL, CLSCTX_INPROC_SERVER,
IID_IAutoComplete2, (LPVOID*) &m_pAC);
The only solution is to clean out the registry key.. is there any other way?
-Steven
CP Addict
By reading this message you are held fully responsible for any of the mispelln's or grammer, issues, found on, codeproject.com.
For those who were wondering, actual (Linux) Penguins were harmed in creating this message.
|
|
|
|
|
I've created a makefile project add the .mak file it contains :
path=C:\GBA\bin
gcc -o pixmanip.elf pixmanip.cpp -lm
objcopy -O binary pixmanip.elf pixmanip.bin
when I rebuild all I get this error
path=C:\GBA\bin
pixmanip.mak(2) : fatal error U1034: syntax error : separator missing
|
|
|
|
|
Hi,
I got a problem with the toolhelp32 functions.
I made a snapshot to get info on all the processes threads and so on. The thread-info seems to be correct, but the module id and default heap id member of the processentry32-struct is 0 for every process. I get a heap list (heap32listfirst) for my app but I don't think the values are correct because I don't get the heap-blocks (heap32first).
can anybody help me ?
thanks
widi
winxp home, vc6 sp5 std.
-
|
|
|
|
|
Hi there,
Can anyone help me with this program? It compiles perfectly in Visual C++ without any errors or warnings. It runs fine too but instead of showing the results of calculations from 2 of it's functions, it outputs the value of their memory addresses (that's what I think the output is). I've copied all the code below.
Thanks.
#include <iostream>
using namespace std;
class PayDay
{
public:
double HoursWorked(double Hours);
double PayRate(double Rate);
double GetSalary();
double PayTax();
private:
double Hours;
double Rate;
double Tax;
};
int main()
{
PayDay weeklyPay;
double Hours = 0;
double Rate = 0;
double Tax;
Tax = Hours * Rate * 25 / 100;
cout << "Enter your hours:" << endl;
cin >> Hours;
cout << "Enter your pay rate:" << endl;
cin >> Rate;
cout << "This week's payroll information:" << endl;
cout << "Your gross weekly salary is:" << "$:" << weeklyPay.GetSalary() << endl;
cout << "Your net weekly salary is:" << "$:" << weeklyPay.PayTax() << endl;
return 0;
}
double PayDay::HoursWorked(double Hours)
{
return Hours = Hours;
}
double PayDay::PayRate(double Rate)
{
return Rate = Rate;
}
double PayDay::GetSalary()
{
return Hours * Rate;
}
double PayDay::PayTax()
{
return Hours * Rate - Tax;
}
|
|
|
|
|
the big problem here is that you're not setting the weeklyPay member variables to anything (there's no constructor, you're not initializing anything and you're not setting Hours and Rate into the object) . so, the output is just uninitialized garbage data.
-c
I'm not the droid you're looking for.
|
|
|
|
|
Hello
I would like to save html source with pictures as the function "Save as " of Internet Explorer
I have no problem to save Html code with function like OpenRequest or InternetWriteFile but I don't arrive to save pictures.
Thank you for help
Nexus
|
|
|
|
|
First of all, Internet Explorer does not expose any (supported) API to save the current web page with all images, or even as a single-file archive.
You have workarounds, however :
- If InternetExplorer (stand-alone or web control) is visible on screen, then you can request the SaveAs dialog box, and automatically fill the appropriate values in it. Read this[^] article for more details.
- As soon as the web page is displayed on screen, it's available in the cache. It happens that there is an API dedicated to reading the cache. Be sure to understand that all pictures from a given web page share the same web page URL (obvious in the namespace extension when you browse the temporary internet files folder). For more info, lookup this API method in MSDN : FindFirstUrlCacheEntry.
|
|
|
|
|
Hi, I'm a student using Visual C++ to program regular C programs for school and I can't seem to figure out how to do something like
"a.out < 100.txt"
in Visual C++ (in other words, a.out would normally take input from stdin but in this case would take it from 100.txt). or even if someone could tell me how set command line input, that would be really helpful.
For instance, if my program were designed to take input specifically from a file, whose name should be the second argument in the command line, how do I specify the file name in Visual C++?
I am using a win32 Console Application type project.
Any help that can be given would be VASTLY appreciated.
Thank you.
|
|
|
|
|
DOS uses the same syntax for redirecting input and output
silverthread wrote:
designed to take input specifically from a file, whose name should be the second argument in the command line, how do I specify the file name in Visual C++?
Again, same way as Unix, the argc and argv parameters to main() .
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hello there.
Well when I try to load my VC6 project in VC++.NET everything is ok, but the buttons are still these bad-looking Win98 Buttons.My application is Dialog-Based....
When I try to do the most simple dialog app in VC++.NET I got the new-style buttons.
My question is how to port my dialog-bassed app written in VC6 to VC++.NET so it haves th WinXP buttons look ?
Thanx in advance...
|
|
|
|