|
I build an ATL control, but after fresh many time, it will crash.
I find that column "Gdi objects" in "Task Manager" will be 9999.
I doubt that there are some problem in below code:
Line1 HRGN rgn = CreateRectRgn(...);
Line2 SelectClipRgn(hdc, rgn);
Line3 Draw Something;
Line4 SelectClipRgn(hdc, NULL);
Line5 DeleteObject(rgn);
I find that column "Gdi objects" will increment randomly after execute Line1; but when execute Line5, the column value be always unchanged(I assume it will decrement).
Is there any relationship between "Gdi objects" and windows gdi objects?
and why?
|
|
|
|
|
I am not able to use various commands,macros, project settings and all other stuff of Visual Studio. Like yesterday i come to know TRACE is very usefule but yet not able to use it. Similiary many hidden. Do help me for proper use of Visual Studio tools.I work with VC++ using MFC and win32 API.
Thanks for kind help
Moyeen
Sr. Software Design Engineer
|
|
|
|
|
Moyeen_VC++ wrote:
...but yet not able to use it.
Why?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi friends,
Windows handles are always unique for the specific OS instance.Anybody is having idea from where this uniqueness coming from?
|
|
|
|
|
|
Well,
That Explains a lot
|
|
|
|
|
A window handle isn't really anything, but it could be an integer. If you increment the integer by some arbitrary value every time CreateWindow succeeds, you get reasonably unique values...
Steve S
Developer for hire
|
|
|
|
|
I have started programming one year ago; using vc, but now i have come to know that in VB one can also call APIs; which mean we can do all low level tasks.
Then why VC is considered more powerfull?
Is it a reality or just a result of good marketing?
|
|
|
|
|
Yeah VC is considered More Powerful as it give rawower to every thing.
windows Handle ,Dll etc.
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
its sometimes not wot you do but how you do
There is no spoon.
mail
|
|
|
|
|
Didn't I just see this same post in 'The Lounge'?
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
sorry for that; I should have deleted it from their.
|
|
|
|
|
I am using installshield; version which comes with visual studio 6;
How can I register/unregister AX controls and dlls using it;
I donot want to use any other installer/un installer; just above mentioned version of installshield.
plz help.
|
|
|
|
|
using this
to register
ShellExecute(NULL,"open","regsvr32.exe"," yourCom.dll",NULL,SW_SHOWNORMAL);
to register silently
ShellExecute(NULL,"open","regsvr32.exe"," \s yourCom.dll",NULL,SW_SHOWNORMAL);
to unregeister
ShellExecute(NULL,"open","regsvr32.exe","\u yourCom.dll",NULL,SW_SHOWNORMAL);
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
hai Frens. . .
Can any one guide me how to enable a multiple row selection in MSFlexGrid in VC++.
I should allow user to select multiple rows when the Ctrl key is pressed.
Thanx
|
|
|
|
|
Let ToolBarCtrl's buttons have diffrent size icons in ONE bitmap source.
Help me please!
|
|
|
|
|
Let ToolBarCtrl's buttons have diffrent size icons in ONE bitmap resource.
Help me please!
|
|
|
|
|
this is what I used in my CMainFrame class's OnCreate() handler function. My bitmap has 9 32 x 32 bitmaps in one image.
<code>
HBITMAP hbm = (HBITMAP)::LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_BITMAP1), IMAGE_BITMAP, 0,0,
LR_CREATEDIBSECTION | LR_LOADMAP3DCOLORS );
CBitmap bm;
bm.Attach(hbm);
int ret = m_ilToolBar.Create(32,32,ILC_COLOR8 | ILC_MASK,1,0);
ret = m_ilToolBar.Add(&bm,RGB(0,0,0));
m_wndToolBar.GetToolBarCtrl().SetImageList(&m_ilToolBar);
SIZE szButton,szImage;
szButton.cx = 39;
szButton.cy = 38;
szImage.cx = 32;
szImage.cy = 32;
m_wndToolBar.SetSizes(szButton,szImage);
m_wndToolBar.GetToolBarCtrl().AutoSize();</code>
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
Sorry,but I can't exactly understand the codes.
Have you seen the "Google Toolbar" in IE?The icon in the first button("Google" button) is rectangle and much longer than the others.I want to implement a toolbar just like that.I mean that my first icon may be "100x20" pixels,and my second icon may be "20x20" pixels,and so on...
|
|
|
|
|
Hi Guys ...
All those lovers of conio.h of borland C , I have got a gift for you ...
Yeah I know you have been missing all those functions of conio.h
I recoded them....
You can get library at my personal site www.maxpert.tk in downloads section...
I hope you love it ...
Waiting For Your response
|
|
|
|
|
IMHO
Wrong forum...
How do I print my voice mail?
|
|
|
|
|
Conio.h in Windows Enviornment CoOL
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Conio.h in Windows Enviornment CoOL
Any wAy thanks
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
you can already include conio.h in VC++ or at least in my version (VS.NET 2003)
ALL YOUR BASE ARE BELONG TO MICROSOFT!
Demonware Studios Leader
|
|
|
|
|
EDIT: This wasn't it either Turns out an application cannot select more than one bitmap into any one device at a time...i'll look into this more carefully now...
What causes SelectObject to fail???
I am trying to select a BITMAP into a memory DC I created using CreateCompatibleDC but it returns NULL...?
I can however select Pens, etc into the DC and everything is cool...why would a bitmap fail???
The bitmap is actually loaded my an imagelist and is retreieved using:
GetImageInfo(nImage, &ii);
CBitmap* pBmp = CBitmap::FromHandle(ii.hbmImage);
I'm inside a derived CImageList::Draw()
The memory DC is created from the pDC passed in as the first parameter to Draw .
All the handles and pointers to everything else are cool...for instance ii.hbmImage is not NULL...
I've tried using PJ Arends HBITMAP viewer, but can't get it working...
Any reason why SelectObject() would fail on BITMAPS??? I've tried MFC objects and SDK handles...still no go...
The only thing I can think of is...initially I first had one of my icons in the imagelist as an 24x24 32bit image...and the rest were normal 16x16...but i've since removed that 32bit image and still nothing...i've rebuilt and everything...?
Would SelectObject if a BITMAP is invalid or something??? What the heck is going wrong...any ideas???
Thanks
How do I print my voice mail?
|
|
|
|