|
How can I make an editor, using C++? I know that I'll have to use graphics also. Bt plzzzzzzzzz guide me how to do this task. I've no idea abt it. Plzzzzz tell....
|
|
|
|
|
Why don't you start here[^], build some simple programs first, then work your way up.
|
|
|
|
|
Do you want to make a environment for run statements like Mel Script in MAYA that run codes
|
|
|
|
|
Problem:
We are Using a Sony Ericsson PCMCIA card(GC89) as a modem(WLAN) in vb.net
(tablet PC)application. One of the requirement is to show
connection(GPRS/GSM) strength in the application while syncronization of
data. Default software that got installed with the card "Wireless Manager"
also has this feature.
4 solutions:
1. By calling native API exposed by sony ericsson for this card. unfortunatly API is not publically available, we are trying to contact them
2. By using "AT" commands. Every modem supports this command. The problem is we have to talk at port level. And we can't issue any command if modem(its port) is already connected to network for syncronization of data.
3. By hooking at driver directly at User Mode or Kernal Mode using NDIS.
4. Windows using "Wireless Zero Configuration" service to talk to device drivers. Problem is it can only talk if underlying connection is on iEEE 808.11b standard. So i can get wifi signal but not GRPS/GSM. WRAPI library also supporting only iEEE 808.11b
You see any of above solution has some problem. Can anybody pls help me out here.
Appreciate quick response. Thanks
|
|
|
|
|
The only approved level is by the AT commands, APIs like that only tend to be made available to people working closely with the manufacturer.
How about seeing if you can monitor any windows messages that might show what the software is doing?
Elaine
|
|
|
|
|
AT Command: any work around for port problem, how can i access the port while its connected to internet?
Well, by hacking i don't mean to look into core detail of driver. But to see only those information which are normally available in all such application like Signal Strength, Provider.. status information.
|
|
|
|
|
Hi All,
I was looking at CMenuXP, which draw the entire menu. but the problem was it doesn't draw the arrow of the popup subitems. it lets windows to draw it by itself.
is there a way to bypass it? i need to draw the arrow with my own color (for enable and disable states)
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Do you need to shape of popup item?
|
|
|
|
|
I'm having a real hard time trying to understand the bitmap structure. I have created a function which takes a HBITMAP, I convert this to a DIB so that I can examine the pixels. My code is working, but I'm sure it's wrong.
HRGN CWinRgn::CreateRgnFromFile( HBITMAP hBmp, COLORREF color )
{
BITMAP bmp = { 0 };
GetObject( hBmp, sizeof(BITMAP), &bmp );
union {
BITMAPINFO bInfo;
BYTE pQuad[sizeof(BITMAPINFO) + 0xFF * sizeof(RGBQUAD)];
};
ZeroMemory(pQuad, sizeof(pQuad));
bInfo.bmiHeader.biSize = sizeof(bInfo.bmiHeader);
HDC dc = CreateIC( "DISPLAY",NULL,NULL,NULL );
GetDIBits( dc, hBmp, 0, bmp.bmHeight, 0, &bInfo, DIB_RGB_COLORS );
LPBYTE pBits = new BYTE[ bInfo.bmiHeader.biSizeImage ];
BITMAPINFOHEADER& bih = bInfo.bmiHeader;
GetDIBits( dc, hBmp, 0, bih.biHeight, pBits, &bInfo, DIB_RGB_COLORS );
DeleteDC( dc );
for ( int y = 0; y < bih.biHeight ; y++ )
{
for ( int x = 0; x < bih.biWidth; x++ )
{
int Offset = (bih.biHeight - y) * bmp.bmWidthBytes + x * bmp.bmBitsPixel / 8;
COLORREF pixel;
switch ( bih.biBitCount )
{
case 1:
I was under the impression that bitmaps could have either 1,4,8,16,24 or 32 bits per pixel. So I created these various bitmaps to test the code. I load the bitmap with the LoadImage() api and pass to the handle to my function, yet each bitmap is either 1 or 32 bbp. Can somebody please explain to me what the hell is going on?
-- modified at 2:53 Sunday 10th September, 2006
|
|
|
|
|
You're obviously running at 32 bit. You can call LoadImage to load a DIBSection, otherwise, you will load a DDB, which is a Device Dependant Bitmap. That means, you have an image the same depth as your screen, converting it to a DIB will keep that bit depth. A DIBSection is overall a better way to deal with an image so you can both draw it to a DC, and access it's bits directly. There are DIBSection wrappers available for download on CP, that's probably the best way to go.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I'm using LoadImage as a quick and dirty way to get a bitmap handle. In reality this handle could come from anywhere. So what you mean is, when using LoadImage in 32bit mode, it will convert the bitmap? Maybe I should start playing with my display settings.
Christian Graus wrote: There are DIBSection wrappers available for download on CP, that's probably the best way to go.
I have found many, trouble is they are all MFC which makes it just that little harder for me to understand exactly what the code is doing.
|
|
|
|
|
From top of my head, there is a LR_CREATEDIBSECTON flag you will have to pass to LoadImage to ensure that you get a DIB back. Good thing about getting back a DIB is that bitmap has the same color resolution as contained in the bitmap file without going through the color transformations when creating a DDB compatible to screen.
|
|
|
|
|
I thought about that, but I thought if I am going to understand this at all, i need to get down to the bytes. So a created a function to load from the file directly. Now I can be absolutely certain about what sort of bitmap I am dealing with.
|
|
|
|
|
If it is a bitmap file, I suggest you to read the bits of the file using the file operations rather than GDI functions. If I remember there is a sample in sdk for this.
|
|
|
|
|
In this instance, yes it is a bitmap file. But I am creating a function which is able to go through the pixels of any of the bitmap formats. So really, I don't need a function to load from a file, but for testing purposes it is probably the best way.
|
|
|
|
|
I use photoimpact for all of my drawing needs, this program allows me to save a bitmap into any given format. Now I know that bitmaps can be either 1,4,8,16,24 or 32 bits per pixel. Photoimpact only gives me the option to save the 16bbp as grayscale. Am I right in assuming all 16bit bitmaps are grayscale? And, it allows me to save as '48bit true colour' for which I am unable to find any documentation about how the bytes are structured.
|
|
|
|
|
First of all - a DIBSection is a HBITMAP that also has a pointer to the underlying bits. GetBitmapInfo is the name of the method that returns the pointer, but you need for the HBITMAP passed to it to be a DIBSection. Certainly taking a close look at any DIBSecton wrapper will help you to work this all out.
No, 16bpp are certainly not all greyscale, there is no greyscale only format, although any format apart from 8 bit is a waste of space, there are only 256 shades of grey.
48 bit is obviously a construct of Photoimpact, and if it's inventing a way to store more color info than your monitor/PC is capable of displaying, perhaps it's doing that for grey as well. In fact, non PC systems do display greater color depth and 16 bit grey is common in medical applications. This does not change that your PC has no way of displaying more than 8 bit grey, although tone mapping algorithms exist to improve the quality of 16 bit images when shown on an 8 bit system.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
G'Day I'am having a problem with a program that I'm working on for class. I do not expect to be given the solution. If someone could just steer me in the right direction.
An employee's gross wage is computed at the regular pay rate for the first 40 hours and 1.5 times the regular rate for each hour over 40.Thus, an employee who worked 50 hours at $5 per hour would have a
gross pay of $275.
For this part of the program I used an if/else statement:
if (hoursWorked <= 40)
{
grossPay = (hoursWorked * payRate);
}
else if (hoursWorked > 40)
{
grossPay = (hoursWorked * payRate) * 1.5;
}
This code compiles but does not give me the correct output. Any suggestions would be appreciated.
Thank - you,
billy73
|
|
|
|
|
you need to write like this,
if (hoursWorked <= 40)
{
grossPay = (hoursWorked * payRate);
}
else if (hoursWorked > 40)
{
int nHoursWithextraWage=hoursWorked-40;
grossPay = ( 40* payRate) + nHoursWithextraWage * payRate * 1.5;
}
I suggest following code will do,
int nHoursWithextraWage=hoursWorked-40;
nHoursWithextraWage= (nHoursWithextraWage < 0 ) ? 0 : nHoursWithextraWage;
grossPay = ( 40* payRate) + nHoursWithextraWage * payRate * 1.5;
|
|
|
|
|
If hours worked is neither less than or equal to 40 then it must be greater than 40 so the statement
else if (hoursWorked > 40)
is redundant. Just "else" will do
|
|
|
|
|
Wow. A one vote.
So whoever voted a one... so are you suggesting you program like this...?
if (true) {
} else if (false) {
}
how silly are we getting here. Sheesh!
|
|
|
|
|
billy73 wrote: grossPay = (hoursWorked * payRate) * 1.5;
Your problem is here. Do you really mean to pay 1.5x salary for every hour worked?
|
|
|
|
|
Hello guys.
I recently purchased a mouse for my laptop (MS notebook wireless optical 4000) it has a freat little feature, the mouse has a zoom button on the side of it, when its clicked a transparent window appears around the mouse pointer, and everything inside the window is magnified to the users preference. If you hold down the button, it gives you the ability to increase the zoom windows size and magnification via moving the mouse and the scroll wheel.
I also have a Intel Mac Mini dual Boot connected to my 32" HDTV, with this I use an Ione 2.4ghz wireless keyboard which has a little joystick to use as a mouse. The setup works great as a HTPC but when I do general windows tasks like browsing etc sometimes viewing can be alittle small from the couch potato position I sit at.
I recently connected my laptop to the screen and tried the MS mouse zoom from the same distance and it was a joy to use on the 32", however it wasnt really practical in the long run having my loptop connected up.
So im thinking what if I could take the features of ms zoom and create a small application to work with my wireless keyboard?
I know there are other 3rd party appz on the market, but none of them act quite like ms is one.
I have not been into my programming in a while, but I have just purchased VS2005 and will attempt the project in VC++ as its the only language I really know and I have the entire v6 reference Set gathering dust so I might aswell get some use out of it
Have any of you used a microsoft mouse with zoom onboard?
Im looking for tips on how to go about the project, Im very rusty and dont want to start off going down a dead end
|
|
|
|
|
wow thanks for all your help
|
|
|
|
|
hi, please comment if anyone knows or has encountered the following problems in VC++. ( i seriously doubt it though)
1. I have built an app with UNICODE enabled, and it has a treectrl. Strangely, when i set the text of items using any of the standard ways [ example text: (My group)]
the display shows the text as [((My group], that is, the bracket comes back in first place. This behaviour happens with almost all non-alphanumeric characters.
ALSO THIS HAPPENS ONLY on systems which have additional regional languages support installed from the control panel (Supplemental language support)
if you edit the item, or gettext,the text returns correctly. Build the MBCS version
or uninstall additional languages support, the problem goes away. I thought of reporting BUG to Microsoft in TreeCtrl, but before being called a stupid by MS people ...
2. When i call HttpSendRequest() using MBCS version, everything is fine, but building teh unicode application makes the POST data NULL. the data is passed correctly to the function, but on the server i get nothing in POST or GET or REQUEST. Serious help needed as i think i am missing some important clue here.
Thanks in advance.
|
|
|
|