|
Perfect Thanks...
Ryan Baillargeon
Software Specialist
Fuel Cell Technologies Inc.
|
|
|
|
|
arg.. i tried to replace my bitmap resource for my toolbar and now i crash everytime i get to the last line in red below.. can someone tell me what might cause SetBitmap() to crash like it is now?
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
HBITMAP hBmp = static_cast<HBITMAP>(LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDB_SCTOOLBAR),
IMAGE_BITMAP, 0, 0, LR_SHARED | LR_LOADMAP3DCOLORS));
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | BTNS_SHOWTEXT | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return -1;
}
<code>m_wndToolBar.SetBitmap(hBmp);</code>
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
the problem is specifically this line:
HBITMAP hBmp = static_cast(LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDB_SCTOOLBAR),
IMAGE_BITMAP, 0, 0, LR_SHARED | LR_LOADMAP3DCOLORS)); this function is setting hBmp to NULL now.. i have tried exporting from photoshop in 256 color, 16 bit, and 24 bit.. all of them crash.. any suggestions? basically all it is is a high color bitmap for my toolbar..
thanks in advance..
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
I want to callback a vc function from my VB com dll. How do I pass the address of this vc function to my dll?
Thanks,
ns
|
|
|
|
|
I want to track the progress of my function. It does 4 distinct 'jobs'. How exactly do I convert the time taken in doing these steps into the progress bars progress?
Thanks,
ns
|
|
|
|
|
u can use a time span CTimeSpan to calculate the time, then Step the progress accordingly, after few test, ull have a good statistic in order to smooth the progress appearence
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I've got a desktop application in development in VC++ 6 that processes data and creates an SVG file that can be seen in a local html file that was built to show the SVG file and some supporting info. No network connection needed, no server, just local desktop.
What I would like to be able to do is to use the Adobe SVG viewer as an ActiveX control to read the SVG file and do the rendering, but instead of displaying the SVG in the application, I need to be able to access the rendered bitmap and operate on the individual pixels. Even converting the SVG into a JPG would allow me to use the CxImage or FreeImage library to read the JPG file and have access to the individual pixels.
A search on Google provides many hits on converting SVG into JPG, but they're all Java, and that won't cut it. I need some C++ code.
Has anyone done something like this that would be able/willing to share some code to get me started, or point me in the right direction? I need to be able to load, create, and manipulate the SVG ActiveX control in a non-visible manner, and I need access to the rendered bitmap.
Thanks,
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
You might get something usable from libSVG.
|
|
|
|
|
I have started a MDI project with CFormView as the base class.
I have inserted a property sheet using the Menu item: Project¦Add to Project¦Components and Controls ->property sheet. But I cannot view the property pages nor the frame. I give access to CMyProjView class to have the property sheet embedded into the CFormView.
Any ideas how to activate this property sheet?
|
|
|
|
|
If you need the FormView only for containing the property page, you could also use this [^]
|
|
|
|
|
This does what I need it to do, but the code seems awfully longwinded for what it does. i.e. only 2 property pages.
|
|
|
|
|
Well, it has to simulate the property sheet with a tabbed control and a number of dialogs 'by hand'. The code itself is good and stable.
If you only need the PropertyView once, you maybe are better off embedding a sheet in the CFormView and handling OnSize() .
Construct the CPropertyPage s in your CPropertySheet -derived class, AddPage() them in OnIntitialUpdate() and the MUST be there.
|
|
|
|
|
Heya
I'm not too sure about your method (i've never done it that way), when i embed controls in views i do it this way ->
Create the property sheet as per normal and add it into your FormView as a member variable.
Overide the OnSize method for your formview and call
m_myspropsheet.MoveWindow(cx,cy) etc....
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
I have mainwindow.Inside that mainwindow there are various child windows which is having WS_CHILD style as like sqldiagram.When i move one child window sliding over the other as in sql Relationship Diagram,the window which i move should have the highest z-order i.e..the window which i move should be visible when i move over another child window ,but for me it is going behind the child window.
Sorry if iam not explaining properly.
If u still cant understand my quesiton,just open the Sql Server and see the relation ship diagram and move the tables.
|
|
|
|
|
If I understand what you want to do, you want a currently dragged child-window to get the "closest-to-viewer" Z-order?
SetWindowPos and HWND_TOP is probably what you're looking for.
|
|
|
|
|
Hello,
I have a console app that I can launch using CreateProcess() however I need to obtain the input and output stream from this app so I can do some processing on the data it provides (basically, automate the process of typing data in and reading the output from the console application).
I guess there are some useful articles out there in CP? Can someone point me in the right direction please??
Much appreciated.
Adam.
www.beachwizard.com/travelogue[^]
"I spent a lot of my money on booze, birds and fast cars. The rest I just squandered"
George Best.
|
|
|
|
|
|
Thanks Mike,
Appreciate it. Adam.
www.beachwizard.com/travelogue[^]
"I spent a lot of my money on booze, birds and fast cars. The rest I just squandered"
George Best.
|
|
|
|
|
Read "Creating a Child Process with Redirected Input and Output" from MSDN.
|
|
|
|
|
how to set the color of the items in the listbox.
|
|
|
|
|
http://www.codeproject.com/listctrl/lvcustomdraw.asp
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
hi..
I have got handle of the parent window..now i wnat to get the handle of the textbox in the parent window..the problem is it is a java class..so i don't know how to get the handle of textbox..pls help me.
|
|
|
|
|
Had the same prob, didnt found a kick solution but to send a message to this window that the tab key was pressed till i was in the texbox
|
|
|
|
|
i didn't get u..can u make it more specific........
|
|
|
|
|
I don't know whether my VC is messing up or if my MSDN is missing some entries.
I'm trying to handle the TB_THUMBTRACK message for my slider control, ClassWizard has no entry for it and although MSDN mentions it it doesn't specify the format of the handling function??
How do i handle this Message?
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|