|
thank you suhredayan,before seeing this thread i have draw a diagram about commandlineinfo,now i see your answer i understand more clearly,your explanation is specific,i am working hard ,i believe i will make progress soon.;P
|
|
|
|
|
>thank you suhredayan
i ll pass that to Jeff Prosise.
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
Its a good one, but I was not the one who needed the anwser.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
A handy reference is MFC Internals[^]. It's got a lot more concrete information on how the framework is put together and how it works. I didn't feel I understood MFC until I read this.
The book is a little out of date now, having originally been written for MFC 4.0, but the fundamental operation of the framework barely changed from MFC 4.0 to 6.0 (indeed, versions 4.2, 5.0 and 6.0 were upwards-compatible in binary form - a program built with 4.2 could typically run unchanged on MFC 6.0's mfc42.dll). 7.x has had more changes to accommodate the merging of ATL and MFC.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi all,
I am trying to load a bitmap in my window but without success. I am using win 32 api. i want to load the image from a file ( path to the file is found out dynamically) and display it.
could someone help me with this
thanx
|
|
|
|
|
|
|
MSDN has a sample name LoadPic.exe. It can load gif, bmp, ico, jpg, bmp... and much image format.
---------------------------
Auto Debug for Windows
http://www.autodebug.com/
|
|
|
|
|
|
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
|
|
|
|
|
|