Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
N

novachen

@novachen
About
Posts
54
Topics
42
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Use office automation in batch
    N novachen

    Hi! I currently write an application as a server that translate user uploaded office files into html or pdf. I write it in VB now, but I am also a VC coder. My trouble is office will pop up dialog and wait for user to response sometimes. I trace the problems and do some prepare to make it not pop up. But I think I can't trace all the reasons to make office pop up. Is there any solution to make office work without asking question? I can accept it dont process on some file, but can't accept it stop working and have to press a button by human. If there isn't such a solution. I think I have to use another "police" server that kill the application and recreate a new process when the application seems blocked and don't work for a long time. I really wanna an elegant solution. Can any guru give me some suggestion?

    C / C++ / MFC question html sysadmin testing debugging

  • Get File name from HFILE?
    N novachen

    Hi! I face a trouble, pls help me. I wanna write a plugin for photoshop, but it call my plugin dll with a HFILE handle. But I should know the filename. Is there any way to get the file name from HFILE? Thank you!

    C / C++ / MFC adobe help question

  • dll eat my functions :<
    N novachen

    Hi! I think it maybe a question difficult to answer. But I hope there are some people share the same experience with me will give me some hint. I find one dll project very weird. There are some functions in the dll to be export. They are declare with _declspec(dllexport). But some function(about 5%) can't be find in the generated dll. (I used ultraedit to search for the name in the dll binary) I finally find out it have some relation to its parameter. for example int funcNoUse(long lRegionID) { return 0; } will be ok, it's generated in the dll. But if i change it to int funcNoUse(long lRegionID, long nPoints, float* pY, LPCTSTR szFlags, int makeCopy) { return 0; } it will not exist in the dll. I really don't know what's up. I have test it on two computer one with VS7 and another with VS7.1 have the same result. any idea?

    C / C++ / MFC question tutorial

  • how can i do profile on vc7?
    N novachen

    I used profile tool in vc6 to ananlyse the performance of c/c++ code. But I can't find it in vc7. How can we do profile in vc7? any other tools?

    C / C++ / MFC question c++ tools performance

  • How can i hide some exe file?
    N novachen

    I am working on a project that will need some command line exe act as a important role. But i don't like my client know those exe. Merging those tools all into a program will cost too much time. is there any tool can hide them but i can still run them from main program.

    C / C++ / MFC question tools

  • Trouble in warp a function in COM dll
    N novachen

    I have a class to wrap in COM dll. There is a c++ function declare void Draw(HDC hdc, int x, int y, int w, int h) I warp it in IDL as HRESULT Draw([in] int** hdc, [in] int offx, [in] int offy, [in] int width, [in] int height); STDMETHODIMP CImg::Draw(int** hdc, int offx, int offy, int width, int height) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); image->Draw((HDC)(hdc), offx, offy, width, height); return S_OK; } in this way, the hdc parameter will be IntPtr in C# so in c# code look like IntPtr hDC = e.Graphics.GetHdc(); if (img != null) img.Draw(hDC, 0, 0, 100, 100); e.Graphics.ReleaseHdc(hDC); sounds very pretty code. but when i turn to VB6, it doesn't work. I write the code Private Sub Form_Paint() Call g.Draw(hDC, 0, 0, 100, 100) End Sub but compiler complain it use some type that vb can't recognize What's the better way to make this interface be used by c#, vb6, dephi smoothly? Any idea?

    C / C++ / MFC csharp c++ com graphics

  • docking a modeless dialog
    N novachen

    sorry, what i wanna is just a modeless dialog not control bar. I write a large image's browser. There is a modeless dialog which show the overview of whole image. It is on top of all the views. Its size is about 200*200, if I take a docking control bar, it will take the space 1024*200 that waste two much space. It just like photoshop, the panels of all kind tool on top of image. But I wanna my modeless dialog has a docking capability. In fact, it is also acceptable to make this dialog just on the left corner of the free space in mainframe. But I need the rect in the mainframe beside the toolbar, for GetClientRect doesn't get rid of the space toolbar occupied.

    C / C++ / MFC tutorial question

  • docking a modeless dialog
    N novachen

    Hi! I read some articles about docing control bar. But that isn't what i need. I create a modeless dialog in mainframe. it is fixed size (for example 128*128), and on top of all childframe(views). I hope the dialog has the docking capability to align itself to some corner of the mainframe. But don't know how to do it. I try MoveWindow to 0, 0 (left corner of mainframe), but it cover the toolbar! the client rect of mainframe including the area toolbar accupied. But childframe is smart to know the right size and position when it resize to largest. How can childframe know the exactly free space in mainframe? Any suggestion for me? Thank you!!

    C / C++ / MFC tutorial question

  • height of the header of window
    N novachen

    HI! I face some trouble in set the window's size. It seems MoveWindow set the size of whole window including the header. But I try to set the window has the exact client size I want, for example 128*128. How can i realize it?

    C / C++ / MFC question tutorial

  • Float window in MDI application
    N novachen

    Hi! I write a MDI application to show large images. I also need a windows to show the overview of whole image. I dont know the best way to do it. One thought is build a spliter window, but that will waste some space. Because the overview is small, for example 128*128, when take a vertical splitter the remaider space (640-128)*128 will be wasted. Another is Draw the detail image and then draw the overview on left upper corner in OnDraw. But in my application, the image is draw by tile, not in once, so this method can't be accepted. Third I think is best. A float window always on top of image views, I can show the overview in it. But i dont' know how to realize it. Is there any resource and code I can take as a reference? Any idea? Thank you!!

    C / C++ / MFC tutorial question learning

  • weird break point
    N novachen

    Thanks for your response. But I still don't know what to do. I didn't modify any assembly's version manually yet. And don't know which one conflict. Can you describe some more detail for me? Thank you!!

    C# visual-studio question csharp com debugging

  • weird break point
    N novachen

    Hi! I have really weird break point. Look at my screen shoot http://www.mapsea.com/vs.jpg First break is normal and can stop when program run to that position. Second break show with a question symbol inside. move the mouse cursor over it. It say the break won't be hit for no runnable code associated with it. But I can stop at the first position and get to the second one by trace step by step. In fact, the lines below that has the same bad behaviour, the lines above it act as normal break. I really don't know what's wrong. Is it a bug of Visual Studio or a my own fault? It happens in several files in my workspace. I can't bear it any longer. I have rebuild the project several times, but with same result. Anyone know the solution to get rid of it? Thanks!!

    C# visual-studio question csharp com debugging

  • interrupt mousemove or scrollbar
    N novachen

    Hi! I am designing a graphics editor in c#. I face a trouble, if i drag a complex graphics item, it will be impossible to draw it once between two movemove event. But in normal solution, movemove event processed one by one, then it will be long delay before the graphics show on the place mouse cursor on for the program will first draw it on several useless places where mouse moved before. Is there any solution in dotnet to peek the message? If a new mousemove message arrived, the program should abandon the work it is doing and redraw on new place. I think it is the same when we move the scrollbar. Any idea or demo? Thanks!!

    C# csharp graphics question

  • Int* into IntPtr?
    N novachen

    Hi! I wanna wrap one c/c++ library into a COM dll to use in c# or vb. In Atl, "int*" will interept as "ref int" in c#. But i wanna it be IntPtr because I try to connect it with Bitmap's Scan0(which is a IntPtr). Any idea or suggestion?

    C# c++ csharp com graphics question

  • memory manager hate 1024 and 2048?
    N novachen

    In fact, i am working on a tiled image application, each tile sometime need several rows or columns of data in nearby tile. This is the reason i write the tester. In this situation, you will find 1024 is not a good selection, even you create a matrix with side of 1025 (but not use the extended 1 pixel) will work better than exactly 1024. I think i didn't turn on any special optimization. Just use the default release option as console in vs7. I also copy my tester to other pc. The result is almost the same. PS. my Os is win2k, CPU is P4 1.7G, Memory 512M

    C / C++ / MFC performance question

  • memory manager hate 1024 and 2048?
    N novachen

    The problem is not whether the script can be speed up or not. My script is just a speed tester. The main trouble in the second loop. Why 1024 perform much worse than 1023 and 1025 in the same program, even 1025 is bigger than 1024? Any idea?

    C / C++ / MFC performance question

  • memory manager hate 1024 and 2048?
    N novachen

    In fact, I can't believe the result myself. But from my simple test, i found the matrix with 1024 alike is much slowly in memory access than 1023 or 1025. I dont know the real reason. My test program is very simple. My aim is test the memory copy cost in a matrix. There are three parameters to used, M for the size of matrix, N for the rows or columns try to copy, and Z is make the program run longer to get a stable result. #include #include #include #include void main(int argc, char** argv) { int M,N,Z; M = atoi(argv[1]); N = atoi(argv[2]); Z = atoi(argv[3]); char *buf, *buf2; buf = new char[M*M]; memset(buf, 1, M*M); buf2 = new char[M*M]; memset(buf2, 2, M*M); int i,j,k; clock_t a = clock(); for (k=0; k

    C / C++ / MFC performance question

  • set environment variables at IDE?
    N novachen

    My application should properly setup with several environment variables. I must set these before i begin debugging so i debug in the dos command line now. How can i set the environment variables in the IDE of vc6 or vs7? Any idea?

    C / C++ / MFC question workspace visual-studio debugging

  • problem of ATL
    N novachen

    Hi! I have two ATL objects, A and B. object A can be create from a method of object B. the user of this COM, should not directly create A in its code, but get one from object B. I don't know how to stop the user from creating A directly. Any idea?

    C / C++ / MFC c++ com help tutorial question

  • ATL problem
    N novachen

    I dont understand. I try to convert IApple into CApple or CComObject. Any idea?

    C / C++ / MFC c++ help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups