|
I used LoadImage but am finding difficulty in displaying the image.
hbitmap = (HBITMAP)LoadImage(hinst,szFileName,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
i am not sure how to proceed after this
plz help me out with this
cheers
|
|
|
|
|
I used LoadImage but am finding difficulty in displaying the image.
hbitmap = (HBITMAP)LoadImage(hinst,szFileName,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
i am not sure how to proceed after this
plz help me out with this
|
|
|
|
|
|
Hi !!!
this is what I have been working on
hdc = BeginPaint(hWnd, &ps);
hdc = GetDC(hWnd);
hbitmap = (HBITMAP)LoadImage(NULL,szFileName,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
if(hbitmap==NULL)
MessageBox(hWnd,"coudnt load ", "error ", MB_OK);
break;
// this doesnt return NULL , so the image is getting loaded properly ????
HDC hdcMem = CreateCompatibleDC(hdc);
GetObject(hbitmap ,sizeof(bmp), &bmp);
SelectObject(hdcMem, hbitmap);
BitBlt(hdc, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY);
DeleteDC(hdcMem);
EndPaint(hWnd, &ps);
it would be great if you could help me out with this. thanx in advance !!!
|
|
|
|
|
hdc = BeginPaint(hWnd, &ps);
hdc = GetDC(hWnd);
hbitmap = (HBITMAP)LoadImage(NULL,szFileName,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
if(hbitmap==NULL)
{
MessageBox(hWnd,"coudnt load ", "error ", MB_OK);
break;
}
HDC hdcMem = CreateCompatibleDC(hdc);
GetObject(hbitmap ,sizeof(bmp), &bmp);
SelectObject(hdcMem, hbitmap);
BitBlt(hdc, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY);
DeleteDC(hdcMem);
EndPaint(hWnd, &ps);
Rest everything looks fine.
Gurmeet S. Kochar If you believe in God, it's because of the Devil
My CodeProject Articles: HTML Reader C++ Class Library, Numeric Edit Control
|
|
|
|
|
it loads fine ! thanks a million !!!
|
|
|
|
|
Why is the item of "IDR_***TYPE" more than "IDR_MAIN_FRAME"?
|
|
|
|
|
when our application is SDI,in working region ,in menu resource of resource,
there is only a "IDR_MAINFRAME",but if your application id MDI,this time,
you can find "IDR_MAINFRAME"and "IDR_****TYPE",then in app.cpp correspondingly,you will see when SDI,
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(C***Doc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(C****View));
AddDocTemplate(pDocTemplate);
but when MDI,
pDocTemplate = new CMultiDocTemplate(
IDR_***TYPE,
RUNTIME_CLASS(C***Doc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(C***View));
AddDocTemplate(pDocTemplate);
IDR_MAINFRAME is for matching with mainframe,IDR_***TYPE is for matching with ChildFrame,but only when MDI there is ChildFrame
|
|
|
|
|
Where can i get info about the timer capable of running in 10 ms(not MMtimer)
|
|
|
|
|
have a look at OnTimer() /KillTimer() function in the MSDN...
boring...
TOXCCT >>> GEII power
|
|
|
|
|
OnTimer() is limited to 55 milliseconds regardless of the time-out value you set, so this will not work.
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnargame/html/msdn_dos2win.asp
The Multimedia Timer. The multimedia extensions to Windows include a high-resolution timer, invoked with timeSetEvent, that has a resolution of 1 millisecond. Besides having this higher resolution, the timer can produce more accurate results because it does not rely on WM_TIMER messages sent through the queue.
In fact, each multimedia timer is put in its own thread, and the callback function is invoked directly regardless of any pending messages or other things that may be going on. That's an important point, because it means you have to be careful about accessing global data—a variable could be changed by your timed procedure, for example, just as some other function called in the normal message-processing loop is using that data. If you do set up a multimedia timer, make sure you understand about synchronization, semaphores, and all the other apparatus of multithread programming. (Schildt [see bibliography] gives a good overview.)
To use timeSetEvent you must include MMSYSTEM.H and link in WINMM.LIB.
|
|
|
|
|
|
i think our CP guys already posted some good articles here.
pls browse through..
I want to change Myself..Can u help me?
|
|
|
|
|
See if this article helps.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi, I'm a newbie in developing mobile applications. I've recently installed eVC4.0, and created a simple "Hello World!" application. I don't have any handheld device. When I try to execute this application, I get a dialog box "Connecting to the device" which ultimately fails. The Active Configuration is WCE Emulator Debug , and Default Device is STANDARDSDK Emulator . Can some one please tell me:
1. What am I doing wrong ?
2. How to connect to the emulator ?
3. Configuring Platform Manager (available in Tools > Configure Platform Manager)
Thanks in advance.
Gurmeet S. Kochar If you believe in God, it's because of the Devil
My CodeProject Articles: HTML Reader C++ Class Library, Numeric Edit Control
|
|
|
|
|
|
Try the Embedded/Mobile forum, you'll have more succes there
|
|
|
|
|
try this website
http://www.pocketpcdn.com/qa/emulator_loopback.html
rzn
|
|
|
|
|
The emulator needs an active TCP/IP connection, as you've discovered. The simplest way to handle this is to install the Microsoft Loopback Adapter and configure it.
See Installing the Loopback Adapter[^] for details.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hey that was of great help. Thank you very much.
I am posting the solution below in case any one else also has the same problem:
To install the Microsoft Loopback Adapter in Microsoft Windows XP
1. Open Control Panel, choose Add Hardware, and then choose Next.
2. Choose Yes, I have already connected the hardware, and then choose Next.
3. From the Installed hardware list, select Add a new hardware device, and then choose Next.
4. Choose Install the hardware that I manually select from a list (Advanced), and then choose Next.
5. From the Common hardware types list, select Network adapters, and then choose Next.
6. From the Manufacturer list, select Microsoft.
7. From the Network Adapter list, select Microsoft Loopback Adapter, and then choose Next.
8. Choose Next, and then choose Finish.
To install the Microsoft Loopback Adapter in Microsoft Windows 2000
1. Open Control Panel, choose Add/Remove Hardware, and then choose Next.
2. Choose Add/Troubleshoot a device, and then choose Next.
3. From the Devices list, select Add a new device, and then choose Next.
4. Choose No, I want to select the hardware from a list, and then choose Next.
5. From the Hardware types list, select Network adapters, and then choose Next.
6. From the Manufacturers list, select Microsoft.
7. From the Network Adapter list, select Microsoft Loopback Adapter, and then choose Next.
8. Choose Next, and then choose Finish.
Thank you very much Mike
Gurmeet S. Kochar If you believe in God, it's because of the Devil
My CodeProject Articles: HTML Reader C++ Class Library, Numeric Edit Control
|
|
|
|
|
i am learn splitter window and many views in <<inside vc++6.0="">>version 5,
where to find useful material and information of splitter window and many views?
and i don't clearly understand "onupdate()"and "oninitialupdate()",although i have seen msdn,but i want to find practical example to understand,can you give me some instruction and information?if you do,thank you ,progress need communication.
|
|
|
|
|
I want my project to get installed on PC's rather than i dump the *.exe file on the PC's.
|
|
|
|
|
why don't you get a information about install sheild
let me sleep
|
|
|
|
|
try Installsheild for vc++ or SMS installer.
SMS installer is kinda simple ..try that
I want to change ..Can u help me?
|
|
|
|
|
|